In this tutorial, I’ll show you how to use ROS 2 and RViz to visualize the A0509 robotic arm by Doosan Robotics.
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 dsr_description2 Package
The first thing we need to do is to install the dsr_description2 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 https://github.com/doosan-robotics/doosan-robot2.git
The package is currently made for ROS 2 Foxy, so we need to do a little cleaning of the repository so we don’t have any build errors.
Let’s remove some packages we don’t need right now.
rm -rf doosan-robot2/dsr_control2/
rm -rf doosan-robot2/dsr_msgs2/
rm -rf doosan-robot2/dsr_example2/
cd ~/ros2_ws/
colcon build
source ~/.bashrc
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/doosan-robot2/dsr_description2/urdf/a0509.blue.urdf
Under Global Options on the upper left panel of RViz, change the Fixed Frame from base_link to base.
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:
cd ~/ros2_ws/src/doosan-robot2/dsr_description2/urdf/a0509.blue.urdf
That’s it!
As I mentioned earlier, the Doosan Robotics ROS 2 GitHub is outdated. ROS 2 Foxy reached the end of life in 2023.
I’m really hoping they can develop a package for the most recent versions of ROS 2, but only time will tell.
Keep building!