Developer Guide

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

ADBSCAN Algorithm

This tutorial tells you how to run the ADBSCAN algorithm from EI for AMR using 2D Slamtec* RPLIDAR and Intel® RealSense™ camera input.
It outputs to the
obstacle_array
topic of type
nav2_dynamic_msgs/ObstacleArray
.
Prerequisites: You know how to connect and configure a Slamtec* RPLIDAR sensor. For details, see: 2D LIDAR and ROS 2 Cartographer.

Run the ADBSCAN Algorithm with Slamtec* RPLIDAR Input

  1. Check if your installation has the amr-adbscan and amr-rplidar Docker* images.
    docker images |grep amr-adbscan #if you have it installed, the result is: amr-adbscan docker images |grep amr-rplidar #if you have it installed, the result is: amr-rplidar
    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).
  2. If one or both of the images are not installed, Intel recommends installing the Robot Base Kit or the Robot Complete Kit with the Get Started Guide for Robots.
  3. Go to the
    AMR_containers
    folder:
    cd <edge_insights_for_amr_path>/Edge_Insights_for_Autonomous_Mobile_Robots_*/AMR_containers
  4. Prepare the environment setup:
    source ./01_docker_sdk_env/docker_compose/common/docker_compose.source export CONTAINER_BASE_PATH=`pwd` export ROS_DOMAIN_ID=17 # Unzip the ros2 bags if they were not unzipped before unzip 01_docker_sdk_env/docker_compose/06_bags.zip -d 01_docker_sdk_env/docker_compose/ sudo chmod 0777 -R 01_docker_sdk_env/docker_compose/06_bags
  5. Depending on the Slamtec* RPLIDAR availability, you have two possibilities:
    • Slamtec* RPLIDAR connected
      1. Verify the udev rules that you configured for RPLIDAR in 2D LIDAR and ROS 2 Cartographer.
        1. Get the Slamtec* RPLIDAR serial port:
          dmesg | grep cp210x
        2. 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
        3. 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
      2. Start a pre-configured yml file that starts the LIDAR Node and then the ADBSCAN application:
        CHOOSE_USER=eiforamr docker-compose -f 01_docker_sdk_env/docker_compose/05_tutorials/adbscan_LIDAR.tutorial.yml up
    • No Slamtec* RPLIDAR connected
      Start a pre-configured yml file that plays a ROS 2 bag containing LIDAR data and then the ADBSCAN application:
      CHOOSE_USER=eiforamr docker-compose -f 01_docker_sdk_env/docker_compose/05_tutorials/adbscan_2D.tutorial.yml up
      Expected output: ADBSCAN prints logs of its interpretation of the LIDAR data coming from the ROS 2 bag.

Run the ADBSCAN Algorithm with Intel® RealSense™ Camera Input

  1. Check if your installation has the amr-adbscan and amr-realsense Docker* images.
    docker images |grep amr-adbscan #if you have it installed, the result is: amr-adbscan docker images |grep amr-realsense #if you have it installed, the result is: amr-realsense
    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).
  2. 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.
  3. Go to the
    AMR_containers
    folder:
    cd <edge_insights_for_amr_path>/Edge_Insights_for_Autonomous_Mobile_Robots_<version>/AMR_containers
  4. Prepare the environment setup:
    source ./01_docker_sdk_env/docker_compose/common/docker_compose.source export CONTAINER_BASE_PATH=`pwd` export ROS_DOMAIN_ID=17 # Unzip the ros2 bags if they were not unzipped before unzip 01_docker_sdk_env/docker_compose/06_bags.zip -d 01_docker_sdk_env/docker_compose/ sudo chmod 0777 -R 01_docker_sdk_env/docker_compose/06_bags
  5. Depending on the Intel® RealSense™ camera availability, you have two possibilities:
    • Intel® RealSense™ camera connected
      Start a pre-configured yml file that starts the Intel® RealSense™ node and then the ADBSCAN application:
      CHOOSE_USER=eiforamr docker-compose -f 01_docker_sdk_env/docker_compose/05_tutorials/adbscan_RealSense.tutorial.yml up
    • No Intel® RealSense™ camera connected
      Start a pre-configured yml file that plays a ROS 2 bag containing Intel® RealSense™ data and then the ADBSCAN application:
      CHOOSE_USER=eiforamr docker-compose -f 01_docker_sdk_env/docker_compose/05_tutorials/adbscan_RS.tutorial.yml up
      Expected result: rviz2 starts, and you see how ADBSCAN interprets Intel® RealSense™ data coming from the ROS 2 bag:

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.