Skip to content
Tarik Viehmann edited this page Jun 18, 2024 · 4 revisions

This project assumes a distinction between three components in order to provide a flexible navigation stack for the robotino.

  1. a robotino driver (for real hardware we tested it with this project, for simulation we provide a webots environment.
  2. a lidar setup (for our lidar setup as described here, we provide a convenient launch file)
  3. the configured navigation components of nav2, we cover both navigation on known maps and slam here.

Launch sensor_bringup

To launch the lidars of the example setup, simply run the following command, which will run

  • two instances of the SICK drivers (for back and front lidar)
  • a laser scan integrator to combine the individual data to a single topic
  • ekf fusion to improve odom by the robotino's internal imu
ros2 launch robotino_sensors robotino_sensorbringup.launch.py namespace:=robotinobase1 launch_ekf: true, launch_rviz:=false
  • namespace: It's a launch configuration used to ensure namespacing for multi-robot setups. Use one of the values robotinobase(1/2/3) or define your own configuration files.
  • launch_rviz: It's a launch configuration for starting rviz2 with the predefined config file
  • launch_ekf: whether to launch ekf node or not

Launch SLAM toolbox

For mapping the environment, first launch the driver bringup, ensure the joystick device is connected with correct device ID (by default, device_id=0), then launch the SLAM toolbox by running the following command in the root of your workspace:

    ros2 launch robotino_slamtoolbox robotino_slam.launch.py namespace:=robotinobase1

Map the environment using the joystick, once the map is ready, save the map by running the following command in the root of your workspace:

ros2 run nav2_map_server map_saver_cli -f ~/robotino-navigation_ws/src/robotino-navigation/robotino_navigation/map/<name of map file>

Navigating on a known Map

ros2 launch robotino_navigation robotino_bringup.launch.py namespace:=robotinobase1 use_sim_time:=false launch_nav2rviz:=true map:=map.yaml
  • namespace: It's a launch configuration used to spawn the map server, amcl, nav2_stack and rviz2 with predefined configs for corresponding robotinobase(1/2/3)
  • use_sim_time: to use sim time instead of system time
  • params_file: main file of navigation components, excludes robot-specific information (such as namespaced topic names)
  • host_params_file: host-specific overrides for navigation params. Here it is used to point the navigation stack to namespaced topics, modify this as needed for your configuration
  • launch_nav2rviz: whether to launch an rviz to visualize the navigation, including tools for localization and to send poses.
  • map: yaml file for the map, if a relative path is given the map directory of the robotino_navigation package is also searched

Once the robot is localized, use the 2D Nav Goal tool in Rviz2 to send a goal to the robot.

Clone this wiki locally