Wandering Application with Multi-camera Rtabmap in Gazebo* Simulation#

This tutorial explains how to use Rtabmap with four cameras simulated inside Gazebo, using the House environment.

Run the Sample Application#

  1. If your system has an Intel® GPU, follow the steps in the Get Started Guide for Robots to enable the GPU for simulation. This step improves the Gazebo simulation performance.

  2. Check if your installation has all the necessary Docker* images.

    docker images |egrep "amr-turtlebot3|amr-rtabmap|amr-nav2|amr-wandering"
    #if you have them installed, the result is:
    amr-turtlesim
    amr-rtabmap
    amr-nav2
    amr-wandering
    

    Note

    If these images are not installed, continuing with these steps triggers a build that takes longer than an hour (sometimes, a lot longer depending on the system resources and internet connection). Intel® recommends checking your installation with FastMapping Algorithm or installing the Robot Complete Kit with the Get Started Guide for Robots.

  3. Check that EI for AMR environment is set:

    echo $AMR_TUTORIALS
    # should output the path to EI for AMR tutorials
    /home/user/edge_insights_for_amr/Edge_Insights_for_Autonomous_Mobile_Robots_2023.1/AMR_containers/01_docker_sdk_env/docker_compose/05_tutorials
    

    If nothing is output, refer to Get Started Guide for Robots Step 5 for information on how to configure the environment.

  4. Use docker compose to execute the Wandering app Docker* container:

    docker compose -f $AMR_TUTORIALS/wandering_rtabmap_4_cameras.tutorial.yml up 2> errlogs.txt 1> logs.txt
    

    This command will write logs to a text file named logs.txt. It is recommended to log to a file rather than the console so that navigating the large quantity of logs is easier.

    Expected result:

    The robot starts wandering inside the simulation. The robot’s path and 3D point cloud should be visible within gazebo-sim and rtabmap-viz. (For more clarity, try right-clicking on 3d view and enable free camera, view of grid, and frustums of cameras)

    ../_images/RobotOutsideTheHouse.png ../_images/RtabmapvizHouseSlamDunk.png
  5. To stop the Wandering app, do the following:

    • Type Ctrl-c in the terminal executing the Docker* container

    • Remove the stopped containers:

      docker compose -f $AMR_TUTORIALS/multi_camera_rtabmap.yml down --remove-orphans
      

Troubleshooting#

If the .yml is started with a different user, the Gazebo* model fails. In case of such a failure, verify that the file 01_docker_sdk_env/docker_compose/01_amr/.env contains the line

CHOOSE_USER=eiforamr

For general robot issues, refer to: Troubleshooting for Robot Tutorials.