The workspace primarily consists of:
serial_bridge: Handles bidirectional communication between the Jetson and Arduino for motor control.allbot / allbot_urdf / allbot_param: Core robot packages containing launch files, URDF models, and navigation parameters.ydlidar_ros2_driver: ROS 2 driver for the YDLidar sensor.slam_gmapping: Package for Gmapping SLAM.The serial_bridge package is responsible for sending velocity commands to the Arduino and receiving data back.
serial_bridgeserial_bridge/serial_bridge.py/dev/ttyTHS1 at 115200 baud rate by default. You can change these via parameters port and baudrate.cmd_vel topic (type geometry_msgs/Twist).v <linear.x> <linear.y> <angular.z>\n.raw_vel.To start the communication node:
ros2 run serial_bridge serial_bridgeThe robot supports multiple SLAM algorithms. The launch files for SLAM integrate the lidar driver, URDF publisher, and the respective SLAM node.
The cartographer implementation uses Google Cartographer to generate highly accurate 2D grid maps. Configuration files are situated in allbot/launch/include/allbot_lidar_standalone.lua.
ros2 launch allbot lidar_slam_carto.launch.py use_sim_time:=false resolution:=0.05
For traditional filter-based SLAM, Gmapping is available.
ros2 launch allbot lidar_slam_gmapping.launch.py use_sim_time:=false
Navigation is handled via the ROS 2 Navigation Stack (Nav2). The main launch file navigate.launch.py located in the allbot package can be booted in two different modes: Simultaneous SLAM & Navigation or AMCL Localization on a Saved Map.
If you have already generated a map (e.g., my_map.yaml in allbot/maps/), you can launch standard AMCL-based localization.
ros2 launch allbot navigate.launch.py slam:=False map:=<path_to_map.yaml> autostart:=trueallbot/maps/my_map.yaml.allbot_param/navigation/nav2_params.yaml.This mode integrates SLAM with the navigation capabilities.
ros2 launch allbot navigate.launch.py slam:=True autostart:=trueurdf.launch.py) will launch automatically unless you set launch_urdf:=false.launch_lidar:=false.