(!) 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 the Navigation Stack with Copernicus

Description: Enable Copernicus to run the Navigation Stack physically.

Keywords: Copernicus

Tutorial Level: BEGINNER

The following tutorial illustrates how to use the Navigation Stack within the move_base package in Copernicus. Please read through the Copernicus Operating Guidelines here, before commencing with this tutorial.

This tutorial also assumes that you have your Copernicus set up properly beforehand. For information on how to set up your Copernicus, refer to this Setting up Copernicus for the first time tutorial.

The Navigation Stack enables Copernicus to operate in real time. This tutorial is classified into 3 different segments: Operating Copernicus without sensors, Operating Copernicus with sensors (Gmapping) and Operating Copernicus with sensors (Autonomous).

Operating Copernicus without Sensors

This segment covers the on how to operate Copernicus without any sensors capability. Copernicus can be controlled either using a joystick or a keyboard.

Note: Copernicus has a background service that launches the bring-up upon boot (refer to this tutorial here). There will be an error if you attempt to launch the bring-up when it is already running. To fix that, either disable the background service beforehand or kill the error launch and relaunch the bring-up.

Instructions:

  • Launch the bring-up by running:
    $ roslaunch copernicus_base bringup.launch 
    • Note: For older versions, use copernicus_bringup.launch instead of bringup.launch as such:

    • $ roslaunch copernicus_base copernicus_bringup.launch
  • This will launch the move_base, teleoperator, localization and tf nodes
  • This robot will be controlled by the joystick
  • To control the robot using a keyboard, launch the move_base node by running:
    $ roslaunch copernicus_base bringup.launch keyboard:=true

Operating Copernicus with Sensors (Gmapping)

This segment covers the on how to operate Copernicus and map out an empty environment. For further information regarding on how to map an environment, refer to the tutorial on Mapping an environment with Copernicus.

Instructions:

  • Ensure that the bring-up is launched, for more information refer to the previous section.
  • Launch the sensors node by running:
    $ roslaunch copernicus_base sensors.launch
    • Note: For older versions, use copernicus_sensors.launch instead of sensors.launch as such:

    • $ roslaunch copernicus_base copernicus_sensors.launch
  • By default, all the sensors configured to your Copernicus will be launched. You can choose to include or exclude a specific sensor in this launch by editing the launch file under copernicus_base->launch->sensors.launch by changing the <SENSOR_NAME> argument to true/false to enable/disable them.

  • You can also enable/disable specific sensors by running the following command:
    $ roslaunch copernicus_base sensors.launch <SENSOR_NAME>:=true/false
  • For example, to activate the rplidar sensor, launch the sensor node by running:
    $ roslaunch copernicus_base sensors.launch rplidar:=true
  • To perform the gmapping function, launch the navigation package by running:
    $ roslaunch copernicus_navigation navigation.launch gmapping:=true
  • You can visualize the robot by running the following:
    $ rosrun rviz rviz
  • Next, open the copernicus configured rviz environment by opening the copernicus rviz config file, located under copernicus_navigation->rviz_config->navigation.rviz, from the rviz tool

  • Similar to the Mapping an environment with Copernicus simulation tutorial, the static grey map will increase as the robot moves
  • Once the mapping of the entire environment is completed, the map can be saved to your current directory by running:
    $ rosrun map_server map_saver –f <filename>

Operating Copernicus with Sensors (Autonomous)

This segment covers the on how to operate Copernicus and utilize its autonomous capability on a mapped environment. For further information regarding on how to run AMCL with Copernicus and how to map an empty environment, refer to Running AMCL with Copernicus and Mapping an environment with Copernicus respectively.

Instructions:

  • Ensure that the bring-up is launched, for more information refer to Operating Copernicus without Sensors above.
  • Once the new environment has been mapped, move the map file to the “maps” folder located under copernicus_navigation package
  • In the navigation.launch file, update the name of the map file in the argument name map_file, to the name of the newly saved map as below:
    <arg name="map_file" default="$(find copernicus_navigation)/maps/<map_filename>"/>
  • Launch the sensors node by running:
    $ roslaunch copernicus_base sensors.launch
    • Note: For older versions, use copernicus_sensors.launch instead of sensors.launch as such:

    • $ roslaunch copernicus_base copernicus_sensors.launch
  • By default, all the sensors configured to your Copernicus will be launched. You can choose to include or exclude a specific sensor in this launch by editing the launch file under copernicus_base->launch->sensors.launch by changing the <SENSOR_NAME> argument to true/false to enable/disable them.

  • You can also enable/disable specific sensors by running the following command:
    $ roslaunch copernicus_base sensors.launch <SENSOR_NAME>:=true/false
  • For example, to activate the rplidar sensor, launch the sensor node by running:
    $ roslaunch copernicus_base sensors.launch rplidar:=true
  • To perform the autonomous function, launch the navigation package by running:
    $ roslaunch copernicus_navigation navigation.launch
  • You can visualize the robot by running the following:
    $ rosrun rviz rviz 
  • Next, open the copernicus configured rviz environment by opening the copernicus rviz config file, located under copernicus_navigation->rviz_config->navigation.rviz, from the rviz tool

  • Similar to the Running AMCL with Copernicus tutorial
    • Set up the 2D pose Estimate
    • Use 2D Nav Goals to select a navigation goal in the visualizer

Wiki: Robots/Copernicus/Tutorials/Bringup Copernicus (last edited 2021-06-28 07:34:17 by Botsync)