A comprehensive ROS2-based hexapod robot implementation featuring LiDAR-based mapping, AprilTag tracking capabilities, and manual control interface. The system integrates autonomous navigation with visual marker following and remote operation functionality, including features such as self-charging capabilities.
This project was conducted as part of the Undergraduate Research Opportunity Program (UROP) at City Science Lab @ Taipei Tech, in collaboration with MIT Media Lab. While I had prior robotics experience, this marked my first venture into legged robotics and ROS2 integration. The project provided an excellent opportunity to develop a deeper understanding of Simultaneous Localization and Mapping (SLAM) and autonomous navigation systems.
The initial phase involved developing Python-based control systems for the hexapod's movement, including linear and angular motion control along with stance management. I subsequently implemented a ROS2 node architecture to handle cmd_vel and joy topic subscriptions, enabling robot control through ROS2's Data Distribution Service (DDS).
The SLAM implementation presented unique challenges, as many conventional algorithms rely on sensor fusion between IMU and camera data for optimal odometry estimation. Through extensive testing of various solutions including Lio-SAM, Gmapping, and Cartographer, I selected Cartographer as the most suitable option due to its robust performance without odometry requirements. The system was successfully tested by mapping our laboratory environment using joystick-controlled navigation.
The navigation implementation required establishing a comprehensive tf tree for ROS2's Navigation2 framework. I utilized AMCL (Adaptive Monte Carlo Localization) for map-to-odometry transformations and implemented laser_scan_matcher for LiDAR-based odometry calculation. The spatial relationship between the base_link and laser frames was defined using static_transform_publisher. This configuration enabled successful deployment of the Nav2 package, allowing for autonomous navigation to designated waypoints within the mapped environment.
To enhance the robot's capabilities, I implemented AprilTag-based localization and tracking. AprilTag, developed at the University of Michigan, functions as a simplified 2D barcode system that provides both identification and pose estimation. The system was configured to maintain a specified relative position to detected AprilTags, enabling dynamic target following behavior.
The final implementation incorporated all developed functionalities through a priority-based control system using the twist_mux node to manage multiple cmd_vel sources:
The robot's operational state is indicated through LED feedback:
This allows seamless transitions between manual control, navigation tasks, and AprilTag following behaviors while maintaining system stability and user control.