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

Screen Shot 2014-10-06 at 11.11.12 AM

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

Screen Shot 2014-10-27 at 1.46.33 PM

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

Screen Shot 2014-10-27 at 1.53.07 PM

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.

Screen Shot 2014-10-27 at 3.35.12 PM

 

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!

Related Posts