(!) Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.

Launching a Gazebo Simulation Environment

Description: How to bring up a Gazebo world and load the Copernicus Robot in the simulation environment

Keywords: Copernicus

Tutorial Level: BEGINNER

Next Tutorial: Mapping an environment with Copernicus

The following tutorial illustrates how to launch Copernicus in a simulated environment. You will require the repository for Physical Robot here and the repository for Copernicus_Simulation here for this tutorial. You can also refer to this guide here on installing the repositories.

To learn more about move_base, gmapping and the navigation stack, refer to the Navigation tutorials.

Instructions:

  • Fire up a terminal and run the below set of commands to enable Gazebo to find the model and plugins required for simulation
  • $ echo "source /usr/share/gazebo-9/setup.sh" >> ~/.bashrc
  • $ echo "export GAZEBO_MODEL_PATH=~/copernicus_ws/src:$GAZEBO_MODEL_PATH" >> ~/.bashrc
  • $ echo "export GAZEBO_PLUGIN_PATH==$GAZEBO_PLUGIN_PATH" >> ~/.bashrc
  • $ source ~/.bashrc
  • The copernicus_simulation package has two different worlds as listed below:
    • indoor
    • :Copernicus_Tutorialindoor

    • willow_garage
    • :Copernicus_Tutorialwillow_garage

  • The indoor world will be launched by default when the gazebo node is launched:
  • $ roslaunch copernicus_simulation gazebo.launch
  • To bring up a particular gazebo world, launch the gazebo node by running:
  • $ roslaunch copernicus_simulation gazebo.launch <world_name>:=true
  • For instructions on how to build your own world file, refer to the tutorials on Gazebo

  • Once the gazebo simulation environment is launched, Copernicus robot can be launched in the environment as well. Ensure that the gazebo simulation environment and the environment in which Copernicus is launched are the same
  • The Copernicus robot can be launched in the indoor world by default:
  • $ roslaunch copernicus_simulation simulation.launch
  • This will bring up the Copernicus robot in the simulation environment
  • :Copernicus_Tutorialindoor_copernicus1b

  • For visualization, launch rviz by running:
  • $ rosrun rviz rviz 
  • The configuration file, copernicus.rviz which is located under copernicus_description->rviz_params, can be opened in the rviz tool to load the Copernicus configured rviz environment

  • In order to start the teleoperation node, run the following:
  • $ roslaunch copernicus_teleoperator teleoperator.launch keyboard:=true
  • This will launch the keyboard teleoperator node
  • The keyboard controls for the teleoperator are as follows:
  • To move around:

u

i

o

j

k

l

m

,

.

  • anything else: stop
  • q/z : increase/decrease max speeds by 10%
  • w/x : increase/decrease only linear speed by 10%
  • e/c : increase/decrease only angular speed by 10%
  • To launch the joystick node, set the keyboard argument to False (Default case:= false) or run the following:
  • $ roslaunch copernicus_teleoperator teleoperator.launch 

Wiki: Robots/Copernicus/Tutorials/Launching a Gazebo Simulation environment (last edited 2021-06-27 15:41:38 by Botsync)