Wandering App Based on Kudan SLAM Using AAEON Robot Kits#

Hardware Prerequisites

You need to have one of these AAEON* robot kits:

This tutorial was tested using UP Xtreme i11 AAEON Robot Kit

To control the robot remotely, you may need a Logitech* F710 gamepad (to be purchased separately).

If you need help assembling your robot, see the AAEON* Resources section

Check Whether Your EI for AMR Installation has a Kudan SLAM Docker Image Installed#

  1. Check if your installation has all the necessary Docker* images including Kudan SLAM.

    docker images |egrep "amr-aaeon-amr-interface|amr-ros-base|amr-nav2|amr-wandering|amr-realsense|amr-kudan-slam|amr-fastmapping|"
    # if you have them installed, the result will be like this:
    amr-aaeon-amr-interface
    amr-ros-base
    amr-realsense
    amr-kudan-slam
    amr-fastmapping
    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.

Area Mapping With Wandering App Based on a Kudan SLAM#

The goal of the Wandering application is to map an area so that the robot can navigate and avoid hitting objects such as walls, chairs, etc.

  1. Place the robot in an area with multiple objects in it.

  2. 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.

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

    docker compose -f $AMR_TUTORIALS/aaeon_wandering__aaeon_realsense_kudan_slam_fastmapping.tutorial.yml up
    

    Expected result: The robot starts wandering around the room and creates a map of the entire area. The Rviz tool starts automatically.

  4. By default, RViz will present the TF tree of the robot, the path of the robot, a 2D map generated by FastMapping, and a 2D occupancy map.

    The image below shows a 2D Map generated by FastMapping, where the green line is the path that the robot has made:
    ../_images/kudan_wandering_2d_map.png
    The image below shows a 2D occupancy map generated by nav2:
    ../_images/kudan_wandering_2d_occupancy_map.png
  5. Enable the MarkerArray checkbox to visualize the 3D Voxel Grid generated by FastMapping algorithm:

    ../_images/kudan_wandering_fastmapping.png
  6. Enable the Image checkbox to visualize the keypoints generated by the Kudan SLAM algorithm in the camera’s video map:

    ../_images/kudan_wandering_video.png
  7. Enable the PointCloud2 checkbox to visualize the PointCloud generated by Kudan SLAM:

    ../_images/kudan_wandering_pointcloud.png

    Note

    FastMapping creates a 2D map using 3D Voxel Grid generated by FastMapping. To build 3D Voxel Grid, FastMapping uses PointCloud data provided by the Kudan SLAM.

  8. 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/aaeon_wandering__aaeon_realsense_kudan_slam_fastmapping.tutorial.yml down --remove-orphans
      

    Note

    If the robot moves in an unpredictable way and hits objects, there may be some hardware configuration issues. See the Troubleshooting section for suggestions.

  9. While the Wandering app is running, you may use the Logitech* F710 gamepad to control the robot. Hold the RB button, then press the Mode button on the joystick. The green LED near this button should illuminate. Use the D-pad to control the robot’s movement.

    ../_images/gamepad_Logitech_F710_v2.png

AAEON* Resources#

Troubleshooting#

If RVIz opens and you cannot see a 2D map, try the following:

  1. Remove all Docker* containers:

    docker rm -f $(docker ps -a -q)
    
  2. Run the Wandering app again:

    docker compose -f $AMR_TUTORIALS/aaeon_wandering__aaeon_realsense_kudan_slam_fastmapping.tutorial.yml up
    

If RVIz opens and you see the map, but the robot is not moving when using the gamepad controls, try the following:

  1. Verify the motor control board is powered and turned on.

  2. For the Wandering app to work correctly, the motor control board must be enumerated at /dev/ttyUSB0. To verify, disconnect the motor control board’s USB cable from the computer. Reconnect the USB, then perform the following command:

    sudo dmesg
    
  3. In the command output, you should see /dev/ttyUSB0 occurring with a recent timestamp. If the motor control board has enumerated differently, such as /dev/ttyUSB1 or /dev/ttyUSB2, we recommend disconnecting all other USB serial devices from the computer and rebooting computer. Upon rebooting, run the Wandering app again.

If the robot is not behaving as instructed when you’re using the gamepad, try the following:

  1. Check the direction of the wheels. The way they are facing is very important, as shown in the following picture.

    ../_images/aaeon_robot_wheels.png

    Each wheel is labeled R (Right) or L (Left). Intel had to use the following wheel setup:

    R (left front wheel) <<<>>> L (right front wheel)

    L (left rear wheel) <<<>>> R (right rear wheel)

  2. Check the connection between the wheels (left in the following picture) and the motor controller.

    ../_images/aaeon_robot_motor_wheel.png

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