In this tutorial, I’ll show you how to use ROS 2 and RViz to visualize the WidowX 250 Robot Arm 6DOF by Trossen Robotics (Interbotix).
Prerequisites
- (Optional) You have completed this tutorial in which I build a URDF file from scratch for the myCobot 280 by Elephant Robotics.
Useful Links
Below are some helpful reference links in case you want to learn more about this robotic arm.
Install the interbotix_xsarm_descriptions Package
The first thing we need to do is to install the interbotix_xsarm_descriptions package. You can see the official GitHub repository here, but we will use the apt package manager to install everything as shown below.
cd ~/ros2_ws/src
git clone -b ${ROS_DISTRO} https://github.com/Interbotix/interbotix_ros_manipulators.git
rm -rf interbotix_ros_manipulators/interbotix_ros_xsarms/examples/
I removed the examples package above since it has build dependencies we don’t need right now.
cd ~/ros2_ws/
colcon build
source ~/.bashrc
If you have build issues, do this:
cd ~/ros2_ws/
rm -rf build/ install/ log/
colcon build
source ~/.bashrc
Check to see if the interbotix_xsarm_descriptions is installed.
ros2 pkg list
Visualize the URDF File
To visualize the URDF file, open a terminal window, and make sure the urdf_tutorial ROS 2 package is installed.
sudo apt-get install ros-${ROS_DISTRO}-urdf-tutorial
Now visualize the URDF.
ros2 launch urdf_tutorial display.launch.py model:=/home/ubuntu/ros2_ws/src/interbotix_ros_manipulators/interbotix_ros_xsarms/interbotix_xsarm_descriptions/urdf/wx250s.urdf.xacro
Under Global Options on the upper left panel of RViz, change the Fixed Frame from base_link to wx250s/base_link.
You can untick the TF option to see the URDF more clearly.
You can use the Joint State Publisher GUI pop-up window to move the links around.
If you want to see the URDF file, go the following link (all of this block is a single command):
cd ~/ros2_ws/src/interbotix_ros_manipulators/interbotix_ros_xsarms/interbotix_xsarm_descriptions/urdf/wx250s.urdf.xacro
That’s it!