Step 3: Robot Base Node ROS 2 Node#
Introduction to Robotic Base Node#
The Edge Insights for Autonomous Mobile Robots pipeline assumes that the robot base ROS 2 node:
Publishes
odom
andbase_link
odom
is used by the Navigation 2 package and others to get information from sensors, especially the wheel encoders. See this Navigation 2 tutorial on odometry for more information.base_link
represents the center of the robot to which all other links are connected.
Creates the transform between
odom
andbase_link
Is subscribed to
cmd_vel
which is used by the Navigation 2 package to give instructions to the robot like spin in place or move forward
In Edge Insights for Autonomous Mobile Robots, there are two examples:
cd $CONTAINER_BASE_PATH
# These are configuration files that the robot base nodes of Pengo and UP Xtreme i11 robotic kits.
ls 01_docker_sdk_env/artifacts/01_amr/amr_generic/param/pengo_nav.param.yaml
ls 01_docker_sdk_env/artifacts/01_amr/amr_generic/param/aaeon_node_params_uncalibrated_imu.yaml
# These are yaml files that start the full pipeline that makes these robots wander and area and map it.
# In them you can find how each nodes are started.
ls 01_docker_sdk_env/docker_compose/05_tutorials/aaeon_wandering__aaeon_realsense_collab_slam_fm_nav2.tutorial.yml
ls 01_docker_sdk_env/docker_compose/05_tutorials/pengo_wandering__kobuki_realsense_collab_slam_fm_nav2.tutorial.yml
One is for AAEON’s UP Xtreme i11 Robotic Kit, and the other is for Cogniteam’s Pengo robot.
Robotic Base Node Deep Dive#
Note
The following commands only work only if they are run on Cogniteam’s Pengo robot or AAEON’s UP Xtreme i11 Robotic Kit.
Using the Cogniteam’s Pengo robot and AAEON’s UP Xtreme i11 Robotic Kit as references and starting their node like this:
# for Cogniteam's Pengo robot
docker compose -f $AMR_TUTORIALS/pengo_wandering__kobuki_realsense_collab_slam_fm_nav2.tutorial.yml up kobuki
# or for UP Xtreme i11 Robotic Kit
docker compose -f $AMR_TUTORIALS/aaeon_wandering__aaeon_realsense_collab_slam_fm_nav2.tutorial.yml up aaeon-amr-interface
In a different terminal, attach to the opened Docker* image:
# for Cogniteam's Pengo robot
docker compose -f $AMR_TUTORIALS/pengo_wandering__kobuki_realsense_collab_slam_fm_nav2.tutorial.yml run --rm kobuki bash
# or for UP Xtreme i11 Robotic Kit
docker compose -f $AMR_TUTORIALS/aaeon_wandering__aaeon_realsense_collab_slam_fm_nav2.tutorial.yml run --rm aaeon-amr-interface bash
You can check the following:
ROS 2 topics
ros2 topic list # The result for UP Xtreme i11 Robotic Kit is similar to: # /amr/cmd_vel # /amr/imu/raw # /amr/initial_pose # /amr/odometry # /parameter_events # /rosout # /sensors/battery_state # /tf # The result for the Pengo robot contains multiple topics but the crucial to this pipeline are: # /cmd_vel # /joint_states # /rosout # /odom # /parameter_events # /tf
odom
andbase_link
framesros2 run tf2_tools view_frames.py cp frames.pdf /home/<user> # Open the pdf through file explorer, it should look similar to: