I have been working on getting a quick release out for simulating a Four-wheeled differential drive robot modeled on Clearpath Robotic’s Husky A200 robot in ROS + Gazebo/Rviz environment. IN this post i will outline step by step procedure re setting up the packages and simulating the robot in a given 3D environment.
I have tested it with the following environment setup:
- Ubuntu 11.04 (Natty)
- ROS Electric
If you have any other setup besides above, i may not be able to help you out re debugging.
STEPS
- Download all the packages into a folder from the DOWNLOAD LINK. For me, the folder i downloaded them into the HOME folder, called: wavelab-multi-robot-mapping-stack .
- You would see the following folders: huskyA200_gazebo, huskyA200_mapping, and huskyA200_teleop. Each one of these packages contains the appropriate nodes to perform the following functions:
huskyA200_gazebo This is the main package which contains the description of the robot, i.e. what it looks like (for amazing graphics cards use the high polygon count robot model, else go for the low polygon count one), what type of sensors it has, what the sample 3D environments look like, and the controllers for moving the robot in that environment. It also computes the odometry of the robot using the wheel movements and publishes them as navigation messages of type Odometry to /odom rostopic. If the robot has an IMU on-board, then the package fuses the wheel odometry information with the IMU data through an Extended Kalman Filter (EKF) to get a Pose estimate. huskyA200_mapping Uses the Rao-Blackwellized Particle Filter based mapping code called “gmapping“. For more information re the same, please refer to: http://www.ros.org/wiki/gmapping huskyA200_teleop Used to move the robot using keyboard. It takes the keyboard input for linear and angular accelerations, and publishes them as geometry messages of type Twist on the topic /cmd_vel - Now you need to setup the ROS workspace environment. To do that, go to your HOME directory, and sudo edit the .bashrc file:
$ cd $ sudo gedit .bashrc
Add the following line to the end of the file:
export ROS_PACKAGE_PATH=~/wavelab-multi-robot-mapping-stack:$ROS_PACKAGE_PATH
The above assumes that you have downloaded all the three packages into the “wavelab-multi-robot-mapping-stack” directory which is in the HOME directory. If that is not the case, please change the path to your own location.
Make sure to restart the terminal window for it to take effect.
- Build the two packages: huskyA200_gazebo, huskyA200_teleop as follows:
$ roscd huskyA200_gazebo/ $ rosmake $ roscd huskyA200_teleop/ $ rosmake
Make sure that the packages built with no errors.
Now you are ready to view the robot in simulation. First you should load the map/environment and the load the robot into that map. Let us load the high polygon count robot model in an empty map:
- In the terminal type:
$ roslaunch huskyA200_gazebo map_empty.launch
You should see something like the following:
You can instead load a map which has an office environment in it using:
$ roslaunch huskyA200_gazebo map_office.launch
You should see something like the following:
- In a NEW TERMINAL, type the following:
$ roslaunch huskyA200_gazebo base.urdf.highpoly.gazebo.launch
After some wait time, you should see something like the following:

You can instead load a low polygon count robot model using:
$ roslaunch huskyA200_gazebo base.urdf.lowpoly.gazebo.launch
You should see something like the following:
- You can now control the robot in the map. In a NEW TERMINAL, type the following:
$ roslaunch huskyA200_teleop huskyA200_teleop_keyboard.launch
The control of the robot is through the terminal, using the W / A / S / D keys: forward / rotate left / Reverse / rotate right. Remember: The terminal window where you launched the teleop, should always have the keyboard’s focus, else the robot will not move. You can use the Shift key along with the W/A/S/D keys to make the robot go faster.
- To view the robot in RVIZ environment, in a NEW TERMINAL, type the following:
$ roscd huskyA200_gazebo/rviz $ rosrun rviz rviz -d robot.vcg
You should see the following for a high polygon count robot model:
and the following for a low polygon count model:





