Whether you have a Jackal UGV or not, the Jackal simulator is a great way to get started with ROS robot development. In this tutorial, we will go through the basics of starting Gazebo and Rviz and how to drive your Jackal around. If you are new to ROS, it’s strongly recommended to go through our introductory tutorials at support.clearpathrobotics.com. To complete this tutorial you will require ROS Indigo on Ubuntu 14.04 LTS. Instructions to install ROS indigo can be found here.
Installation
To get started with the Jackal simulation, make sure you have ROS Indigo set up, and install the metapackages for desktop and simulation:
sudo apt-get install ros-indigo-jackal-simulator ros-indigo-jackal-desktop
Launch Gazebo
We will be using two tools for our Jackal simulation, the first being Gazebo. This is where we get a realistic simulation of our robot, including wheel slippage, skidding, and inertia. It is also possible to insert objects and load maps into Gazebo to simulate sensor data. Begin by launching gazebo:
roslaunch jackal_gazebo jackal_world.launch
You can take this one step further and simulate laser data! If you want to start up your Gazebo simulation with a laser, simply use this command instead:
roslaunch jackal_gazebo jackal_world.launch front_laser:=true
You are now simulating laser data on the /scan topic!
Launch Rviz
The other tool we will be using is Rviz, this allows us to see sensor data from a robot, and give it commands. You can using the following launch file to start Rviz loaded with Jackal
roslaunch jackal_viz view_robot.launch
We can also visualize the simulated laser data by adding it to Rviz. Click “Add” on the bottom left, then LaserScan, and click ok. We will now tell Rviz to look at the /scan topic for this data in the “topic” drop down under LaserScan on the right menu bar. You should now see the LaserScan data.
Driving Jackal
Using interactive markers is the simplest way to drive Jackal. Drag the red arrows in Rviz to move in the linear x and the blue circle to move in the angular z. You can also see this movement in Gazebo. Once you start your own development, have your nodes send velocity commands to the /cmd_vel topics to drive Jacakal with geometry/Twist messages. If you are unfamiliar with these concepts, check out our ROS101 guides!
How long does Jackal execute one single /cmd_vel message before it stops? Given only one /cmd_vel is sent onece.