Get Started Guide

  • 2021.3
  • 10/21/2021
  • Public Content

Launch Cartographer with 2D LIDAR


Connect a Slamtec* RPLIDAR A3 2D LIDAR to your system.
Before you run the sample application, you must add a udev rule.
  1. Enter the command:
    sudo nano /etc/udev/rules.d/rpildar.rules
  2. Add these lines:
    # set the udev rule, make the device_port be fixed by rplidar # KERNEL=="ttyUSB*", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", MODE:="0777", SYMLINK+="rplidar"
  3. Reload the rules:
    sudo udevadm control --reload-rules sudo udevadm trigger

Run the Sample Application

  1. Go to the
    cd <edge_insights_for_amr_path>/Edge_Insights_for_Autonomous_Mobile_Robots_<version>/AMR_containers
  2. Open a terminal. Run the command below to start the Docker* container.
    ./ amr-ubuntu2004-full-flavour-sdk:<TAG> eiforamr ros2 launch rplidar_ros2
  3. Open another terminal. Attach to the running container and get the container ID of your running Docker image:
    docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES ad0af7a34051 "/docker_entrypoint.…" 3 hours ago Up 3 hours amr_sdk_docker docker exec -it <container_id> /bin/bash # (e.g. docker exec -it ad0af7a34051 /bin/bash)
  4. Within the Docker container, run the commands:
    source / ros2 run cartographer_ros cartographer_node -configuration_directory /opt/ros/foxy/share/cartographer/configuration_files/ -configuration_basename rplidar_a3.lua
  5. Go to rviz2 that is already open and uncheck
    on the left side.
  6. Click
    in lower left corner, click by topic and add
    from the


If the following error is encountered:
$ ./ amr-ubuntu2004-full-flasvour-sdk:<TAG> eiforamr bash: ./ Permission denied
Give executable permission to the script:
$ chmod 755

Summary and Next Steps

In this tutorial, you learned how to launch the Cartographer application with 2D LIDAR.
As a next step, see the Run FastMapping Algorithm tutorial.

Product and Performance Information


Performance varies by use, configuration and other factors. Learn more at