-
Notifications
You must be signed in to change notification settings - Fork 12
Robot Simulator
It can often be hard to test your work in robotics in a safe and convenient way since it can sometimes require a physical robot. In order to allow for more convenient testing and simpler testing a program called gazebo will be used which provides excellent support for the ros environment. This page will document how the simulator should be used what you will need to do to get it set up on your machine.
ROS is very well supported in gazebo and vice versa so it setup is relatively simple. If you have installed the desktop-full version of ros you will likely be able to skip this section and move on to the robot specific section of the documentation.
To install gazebo run this in a terminal: sudo apt-get install ros-indigo-gazebo-ros
This should install the supported version for indigo and should allow you to run the application by typing gazebo
in a terminal.
In order to run the IGVC simulations you will need a couple of extra packages. Please run the following command in a terminal:
sudo apt-get install ros-indigo-hector-gazebo-plugins ros-indigo-gazebo-plugins ros-indigo-tf
This should install all the packages you need to run the simulation. The hector-gazebo-plugins package provides support for gps in simulation while the gazebo-plugins provide support for the lidar, camera, imu, drive controller and more.
In order to run the simulation you will also need to install a gazebo model of the igvc course into your environment. There is a convenient script included in the robot_gazebo package which installs this for you. Simply run the install_models.sh script located in robot_gazebo/models/. You might need to make this script executable which can be done using chmod +x install_models.sh
.
After you have done the initial setup running the simulation should be relatively easy. After building the workspace with catkin_make
and sourcing the workspace with source devel/setup.bash
. You should be able to run the command: roslaunch robot_gazebo igvc_basic_simulation.launch
.
The simulator currently simulates the robot odometry, camera, lidar and gps. You should be able to drive it by sending messages to /cmd_vel.