Visualize URDF(Unified Robot Description Format) file.
urdf-viz
is written by rust-lang.
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
cargo
If you are using rust-lang already and cargo
is installed, you can install by cargo install
.
bash
$ cargo install urdf-viz
cargo
bash
$ curl https://sh.rustup.rs -sSf | sh
and follow the instruction of the installer.
If you don't want to install rust
and cargo
, you can find
binary urdf-viz
for Ubuntu16.04/14.04 64bit here.
For example, if you want to use v0.1.2 and Ubuntu16.04,
bash
$ wget https://github.com/OTL/urdf-viz/releases/download/v0.1.2/urdf-viz-0.1.2-ubuntu16.04-x86_64.tar.gz
$ tar xvf urdf-viz-0.1.2-ubuntu16.04-x86_64.tar.gz
$ ./urdf-viz $(rospack find pr2_description)/robots/pr2.urdf.xacro
assimp
cannot be used on OSX or Windows.
You can disable assimp by disable assimp
feature which is enabled in default.
It can handle .obj
files even if you disable assimp
.
$ cargo build --no-default-features
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
.
bash
$ 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
.
bash
$ urdf-viz XACRO_FILE.urdf.xacro
For other options, please read the output of -h
option.
bash
$ urdf-viz -h
In the GUI, you can do some operations with keyboard and mouse.
Up
/Down
keyCtrl
+ Drag to move the angle of a joint[
and ]
Shift
+ Drag to use inverse kinematics(Y and Z axis)Shift
+ Ctrl
+ Drag to use inverse kinematics(X and Z axis),
and .
r
key to set random joints
urdf-viz
is strongly depend on kiss3d
, which is super easy to use, great 3D graphic engine.urdf-rs
.kiss3d
supports .obj
files natively, but urdf contains dae
or stl
files. These files are converted to kiss3d mesh model by assim-rs