Developer Guide

  • 2022.3
  • 10/25/2022
  • Public Content
Contents

2D LIDAR and ROS 2 Cartographer

Slamtec* RPLIDAR A3 2D LIDAR

  1. Connect a Slamtec* RPLIDAR A3 2D LIDAR to your system.
  2. Add a new udev rule.
    1. Create a new file:
      sudo nano /etc/udev/rules.d/rplidar.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
  3. Check if your installation has the amr-rplidar and amr-cartographer Docker* images.
    docker images |grep amr-rplidar #if you have it installed, the result is: amr-rplidar docker images |grep amr-cartographer #if you have it installed, the result is: amr-cartographer
    If one or both of the 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).
  4. If one or both of the images are not installed, Intel recommends installing the Robot Base Kit or Robot Complete Kit with the Get Started Guide for Robots.
  5. Run the Sample Application.
    1. Go to the
      AMR_containers
      folder:
      cd <edge_insights_for_amr_path>/Edge_Insights_for_Autonomous_Mobile_Robots_<version>/AMR_containers
    2. Prepare the
      docker_compose
      environment:
      source ./01_docker_sdk_env/docker_compose/common/docker_compose.source export CONTAINER_BASE_PATH=`pwd` export ROS_DOMAIN_ID=114
    3. Get the Slamtec* RPLIDAR serial port:
      dmesg | grep cp210x
    4. Check for similar logs:
      usb 1-3: SerialNumber: 0001 cp210x 1-3:1.0: cp210x converter detected usb 1-3: cp210x converter now attached to ttyUSB0
    5. Export the port:
      export RPLIDAR_SERIAL_PORT=/dev/ttyUSB0 # this value may differ from system to system, use the value returned in the previous step
    6. Run the Slamtec* RPLIDAR tutorial:
      CHOOSE_USER=eiforamr docker-compose -f 01_docker_sdk_env/docker_compose/05_tutorials/cartographer.rplidar_a3.lua.tutorial.yml up
  6. Go to rviz2 that is already open, and turn off
    LaserScan
    .
  7. Click
    Add
    in lower left corner, click
    By topic
    , select
    PointCloud2
    from the
    /scan_matched_points2
    topic, and click
    OK
    .


    The rviz2 window looks like this:

SICK* nanoScan3* Safety Laser Scanner

  1. Connect a SICK* nanoScan3* laser scanner to your system. For the hardware setup and configuration required in a production environment, see the SICK* website.
  2. Get the SICK* nanoScan3* laser scanner’s IP and the host’s IP.
    This information can be found when configuring the SICK* nanoScan3* laser scanner using the Safety Designer, in the “Networking” chapter.
  3. Check if your installation has the amr-sick-nanoscan and amr-cartographer Docker* images.
    docker images |grep amr-sick-nanoscan #if you have it installed, the result is: amr-sick-nanoscan docker images |grep amr-cartographer #if you have it installed, the result is: amr-cartographer
    If one or both of the 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).
  4. If one or both of the images are not installed, Intel recommends installing the Robot Complete Kit with the Get Started Guide for Robots.
  5. Run the Sample Application.
    1. Go to the
      AMR_containers
      folder:
      cd <edge_insights_for_amr_path>/Edge_Insights_for_Autonomous_Mobile_Robots_<version>/AMR_containers
    2. Prepare the
      docker_compose
      environment:
      source ./01_docker_sdk_env/docker_compose/common/docker_compose.source export CONTAINER_BASE_PATH=`pwd` export ROS_DOMAIN_ID=114 # Export the Sick NanoScan3 IP and the host's IP export HOST_IP=<host_ip> export SICK_NANOSCAN_IP=<sick_nanoscan_ip>
    3. Run the SICK* nanoScan3* laser scanner tutorial:
      CHOOSE_USER=eiforamr docker-compose -f 01_docker_sdk_env/docker_compose/05_tutorials/cartographer.sick_nanoscan.lua.tutorial.yml up
  6. In rviz2, add the LaserScan topic (
    Add > By Topic > scan/LaserScan
    ), and change
    Fixed Frame
    to
    scan
    :
  7. Go to rviz2 that is already open, and turn off
    LaserScan
    .
  8. Click
    Add
    in lower left corner, click
    By topic
    , select
    PointCloud2
    from the
    /scan_matched_points2
    topic, and click
    OK
    .


    The rviz2 window looks like this:

Troubleshooting

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

Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.