Installing prerequisites

This project is fully compatible with ROS Indigo, but some packages are yet to be released in ROS Kinetic. Let's take a look at the prerequisites for setting up packages in ROS Indigo.

The commands given here will install the ROS Gazebo controller manager:

    $ sudo apt-get install ros-indigo-controller-manager
    $ sudo apt-get install ros-indigo-ros-control ros-indigo-ros-controllers
    $ sudo apt-get install ros-indigo-gazebo-ros-control

After installing this, we can install the Velodyne simulator packages in Indigo using the following command:

    $ sudo apt-get install ros-indigo-velodyne

This project uses SICK laser scanners, so we have to install the SICK ROS toolbox packages:

    $ sudo apt-get install ros-indigo-sicktoolbox ros-indigo-sicktoolbox-wrapper

After installing all these dependencies, we can clone the project files into a new ROS workspace. Use these commands:

    $ cd ~
    $ mkdir -p catvehicle_ws/src
    $cd catvehicle_ws/src
    $ catkin_init_workspace

We have created a new ROS workspace, and now it's time to clone the project files to the workspace. The following commands will do this:

    $ cd ~/catvehicle_ws/src
    $ git clone https://github.com/sprinkjm/catvehicle.git
    $ git clone https://github.com/sprinkjm/obstaclestopper.git
    $ cd ../
    $ catkin_make

If all packages have compiled successfully, you can add the following line to the .bashrc file:

    $ source ~/catvehicle_ws/devel/setup.bash

You can launch the vehicle simulation using the following command:

    $ roslaunch catvehicle catvehicle_skidpan.launch

This command will only start simulation in the command line.

In another Terminal window, run the following command:

    $ gzclient
Figure 31: Robot car simulation in Gazebo

You can see the Velodyne scan in front of the vehicle. We can list out all ROS topics from the simulation using the rostopic command. Here are the main topics generated in the simulation:

Figure 32: Main topics generated by robotic car simulation
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.206.219