Skip to content

Sec. 1: Installation of dependencies

Ramviyas Parasuraman edited this page Feb 23, 2018 · 1 revision

Installation of relevant dependencies/packages

Install ROS

We used ROS Indigo in this tutorial. But the tutorial could work even in ROS Kinetic/Lunar, although we did not validate it in Kinetic Kame.

We recommend you install ros-indigo-desktop-full so that you have all the necessary packages. The full package comes with Gazebo 2.2 as default. We recommend using a desktop PC or a laptop with Ubuntu 14.04+.

sudo apt-get install ros-indigo-desktop-full

For more help with ROS installation, follow the instructions here: https://wiki.ros.org/indigo/installation

Install Gazebo

If you do not have the gazebo_ros package, then install it using:

   sudo apt-get install ros-indigo-gazebo-ros

Make sure the stand-alone Gazebo works by running in terminal:

   gazebo

You will see the GUI open with an empty world. To see where you install Gazebo, and if it is in the correct location, run:

  which gzserver
  which gzclient

It should say

  /usr/bin/gzserver
  /usr/bin/gzclient

Install gazebo_ros_pkgs

The gazebo_ros_pkgs packages are available in:

 sudo apt-get install ros-indigo-gazebo-ros-pkgs ros-indigo-gazebo-ros-control

Testing Gazebo with ROS Integration

We now run Gazebo. Before doing it, be sure to always source the appropriate ROS setup file, which for Indigo is done like so:

 source /opt/ros/kinetic/setup.bash

Assuming your ROS and Gazebo environment have been properly set up and built, you should now be able to run Gazebo through a simple rosrun command, after launching roscore if needed. Run roscore first:

 roscore

Open another terminal and run:

 rosrun gazebo_ros gazebo

The Gazebo GUI should appear with nothing inside the viewing window. To verify that the proper ROS connections are set up, view the available ROS topics:

 rostopic list

You should see within the lists topics such as:

 /gazebo/link_states
 /gazebo/model_states
 /gazebo/parameter_descriptions
 /gazebo/parameter_updates
 /gazebo/set_link_state
 /gazebo/set_model_state

Install the husky_gazebo packages

Open a terminal, and enter the following:

 sudo apt-get update
 sudo apt-get install ros-indigo-husky-desktop
 sudo apt-get install ros-indigo-husky-simulator

If everything looks good, then everything is good. We drive a robot now!