All Projects → openrr → Urdf Viz

openrr / Urdf Viz

Licence: apache-2.0
visualize URDF/XACRO file, URDF Viewer works on Windows/MacOS/Linux

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to Urdf Viz

Robotics setup
Setup Ubuntu 18.04, 16.04 and 14.04 with machine learning and robotics software plus user configuration. Includes ceres tensorflow ros caffe vrep eigen cudnn and cuda plus many more.
Stars: ✭ 110 (-26.17%)
Mutual labels:  robotics, ros
Se2clam
SE(2)-Constrained Localization and Mapping by Fusing Odometry and Vision (IEEE Transactions on Cybernetics 2019)
Stars: ✭ 116 (-22.15%)
Mutual labels:  robotics, ros
Awesome Robotic Tooling
Tooling for professional robotic development in C++ and Python with a touch of ROS, autonomous driving and aerospace.
Stars: ✭ 1,876 (+1159.06%)
Mutual labels:  robotics, ros
Roslibpy
Python ROS Bridge library
Stars: ✭ 146 (-2.01%)
Mutual labels:  robotics, ros
Urdf Loaders
URDF Loaders for Unity and THREE.js with example ATHLETE URDF Files
Stars: ✭ 129 (-13.42%)
Mutual labels:  robotics, ros
Grl
Robotics tools in C++11. Implements soft real time arm drivers for Kuka LBR iiwa plus V-REP, ROS, Constrained Optimization based planning, Hand Eye Calibration and Inverse Kinematics integration.
Stars: ✭ 105 (-29.53%)
Mutual labels:  robotics, ros
Dolly
🤖🐑 It's a sheep, it's a dolly, it's a following robot. Dolly was born to be cloned.
Stars: ✭ 113 (-24.16%)
Mutual labels:  robotics, ros
Rvd
Robot Vulnerability Database. An archive of robot vulnerabilities and bugs.
Stars: ✭ 87 (-41.61%)
Mutual labels:  robotics, ros
Rclnodejs
Node.js version of ROS 2.0 client
Stars: ✭ 126 (-15.44%)
Mutual labels:  robotics, ros
Cleanit
Open-source Autonomy Software in Rust-lang with gRPC for the Roomba series robot vacuum cleaners. Under development.
Stars: ✭ 125 (-16.11%)
Mutual labels:  robotics, ros
Flexbe behavior engine
Contains the behavior engine FlexBE.
Stars: ✭ 101 (-32.21%)
Mutual labels:  robotics, ros
Rosnodejs
Client library for writing ROS nodes in JavaScript with nodejs
Stars: ✭ 145 (-2.68%)
Mutual labels:  robotics, ros
Evo
Python package for the evaluation of odometry and SLAM
Stars: ✭ 1,373 (+821.48%)
Mutual labels:  robotics, ros
Robotics Coursework
🤖 Places where you can learn robotics (and stuff like that) online 🤖
Stars: ✭ 1,810 (+1114.77%)
Mutual labels:  robotics, ros
Webots
Webots Robot Simulator
Stars: ✭ 1,324 (+788.59%)
Mutual labels:  robotics, ros
Stereo dense reconstruction
Dense 3D reconstruction from stereo (using LIBELAS)
Stars: ✭ 113 (-24.16%)
Mutual labels:  robotics, ros
Ros Openpose
CMU's OpenPose for ROS
Stars: ✭ 81 (-45.64%)
Mutual labels:  robotics, ros
Navigation
ROS Navigation stack. Code for finding where the robot is and how it can get somewhere else.
Stars: ✭ 1,248 (+737.58%)
Mutual labels:  robotics, ros
Ros2learn
ROS 2 enabled Machine Learning algorithms
Stars: ✭ 119 (-20.13%)
Mutual labels:  robotics, ros
Aikido
Artificial Intelligence for Kinematics, Dynamics, and Optimization
Stars: ✭ 133 (-10.74%)
Mutual labels:  robotics, ros

urdf-viz

Build Status crates.io docs

Visualize URDF(Unified Robot Description Format) file. urdf-viz is written in Rust-lang.

Install

Install with cargo

If you are using rust-lang already and cargo is installed, you can install by cargo install.

cargo install urdf-viz

(FYI) Install cargo

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

and follow the instruction of the installer.

Pre-requirements for build

On Linux

If you have not installed ROS, you may need cmake, xorg-dev, glu to compile assimp-sys and glfw-sys.

sudo apt-get install cmake xorg-dev libglu1-mesa-dev

On Windows

You need freetype.lib in your PATH, which is required by freetype-sys. You can find binaries here

On MacOS

Install freetype by brew.

brew install freetype

Download binary

If you don't want to install rust and cargo, you can find binary releases of urdf-viz for Linux, macOS here.

How to use

urdf-viz command will be installed. It needs rosrun and rospack to resolve package:// in <mesh> tag, and it uses xacro to convert .xacro file into urdf file. It means you need $ source ~/catkin_ws/devel/setup.bash or something before using urdf-viz.

urdf-viz URDF_FILE.urdf

It is possible to use xacro file directly. It will be converted by rosrun xacro xacro inside of urdf-viz.

urdf-viz XACRO_FILE.urdf.xacro

For other options, please read the output of -h option.

urdf-viz -h

If there are no "package://" in mesh tag, and don't use xacro you can skip install of ROS.

GUI Usage

In the GUI, you can do some operations with keyboard and mouse.

  • l key to reload the urdf from file
  • c key to toggle collision model or visual mode
  • Move a joint
    • set the angle of a joint by Up/Down key
    • Ctrl + Drag to move the angle of a joint
    • change the joint to be moved by [ and ]
  • Inverse kinematics (only positions)
    • Shift + Drag to use inverse kinematics(Y and Z axis)
    • Shift + Ctrl + Drag to use inverse kinematics(X and Z axis)
    • change the move target for inverse kinematics by , or .
  • r key to set random joints
  • Move view point
    • Mouse Right Drag to translate view camera position
    • Mouse Left Drag to look around
    • Scroll to zoom in/out

Web I/O interface

You can set/get the joint angles using http/JSON. Default port number is 7777. You can change it by -p option. (jq is used for JSON formatter in the following examples)

Set joint angles

POST the JSON data, which format is like below. You have to specify the names of joints and positions (angles). The length of names and positions have to be the same. You don't need write all joint names, it means you can specify a part of the joints.

{
  "names": ["joint_name1", "joint_name2"],
  "positions": [0.5, -0.1]
}

You can try it using curl.

$ curl -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{"names": ["r_shoulder_yaw", "r_shoulder_pitch"], "positions": [0.8, -0.8]}'  http://127.0.0.1:7777/set_joint_positions | jq
{
  "is_ok": true,
  "reason": ""
}

Get joint angles as JSON

The result JSON format of getting the joint angles is the same as the Set method.

$ curl http://127.0.0.1:7777/get_joint_positions | jq
{
  "names": [
    "r_shoulder_yaw",
    "r_shoulder_pitch",
    "r_shoulder_roll",
    "r_elbow_pitch",
    "r_wrist_yaw",
    "r_wrist_pitch",
    "l_shoulder_yaw",
    "l_shoulder_pitch",
    "l_shoulder_roll",
    "l_elbow_pitch",
    "l_wrist_yaw",
    "l_wrist_pitch"
  ],
  "positions": [
    0.8,
    -0.8,
    -1.3447506,
    -1.6683152,
    -1.786362,
    -1.0689334,
    0.11638665,
    -0.5987091,
    0.7868867,
    -0.027412653,
    0.019940138,
    -0.6975361
  ]
}

Set Robot Origin

curl -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '{"position":[0.2,0.0,0.0],"quaternion":[0.0,0.0,0.0,1.0]}' http://127.0.0.1:7777/set_robot_origin

The order of the quaternion elements is w, i, j, k.

Get Robot Origin

$ curl http://127.0.0.1:7777/get_robot_origin
{"position":[0.2,0.0,0.0],"quaternion":[1.0,0.0,0.0,0.0]}

features

default features is ["assimp"]. If you don't use mesh except for .obj files, you can skip install of assimp by disabling the feature like below.

cargo build --no-default-features

Gallery

sawyer_1.png sawyer_2.png

nextage_1.png nextage_2.png

hsr_1.png hsr_2.png

ubr1_1.png ubr1_2.png

pepper_1.png pepper_2.png

pr2_1.png pr2_2.png

thormang3_1.png thormang3_2.png

Dependencies

  • kiss3d: urdf-viz is strongly depend on kiss3d, which is super easy to use, great 3D graphic engine.
  • nalgabra: linear algebra library.
  • k: kinematics library which is based on nalgabra. It can load URDF files using urdf-rs.
  • assimp-rs: assimp rust interface. kiss3d supports .obj files natively, but urdf contains dae or stl files. These files are converted to kiss3d mesh model by assim-rs
  • urdf-rs: URDF file loader.
  • structopt: super easy command line arguments parser.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].