This project involves designing an autonomous ball pick-up car equipped with mecanum wheels. The car performs active Laser SLAM to map the room and then autonomously navigates to collect ping-pong balls from every corner.
All structural files are stored in the structure
directory. The naming conventions for the parts and assembly files are as follows:
- Individual parts:
<name>-<manufacture_method>_<date>.SLDPRT
- Assembly file:
picker_assembly_20241130.SLDASM
SLAM is based on RPLIDAR A1. When performing SLAM, ensure all related nodes are activated.
- Hector SLAM: Follow these steps to configure and run Laser SLAM:
cd ~/Autonomous-Ball-Pick-up-Car/workspace
catkin_make
source /opt/ros/melodic/setup.bash
source devel/setup.bash
sudo chmod 666 /dev/laser
roslaunch rplidar_ros rplidar_slam.launch
- Cartographer: For better performance, Cartographer is used. Three terminal windows are required:
# Terminal 1
cd ~/Autonomous-Ball-Pick-up-Car/workspace
catkin_make
source /opt/ros/melodic/setup.bash
source devel/setup.bash
sudo chmod 666 /dev/laser
roslaunch rplidar_ros rplidar.launch
# Terminal 2
cd ~/Autonomous-Ball-Pick-up-Car/cartographer_workspace
./carto_slam.sh
# Terminal 3
cd ~/Autonomous-Ball-Pick-up-Car/cartographer_workspace
./map_save.sh
# Once the map is successfully saved, quit all terminals.
To improve mapping efficiency, a simple exploration algorithm is implemented. Follow these steps:
sudo chmod 666 /dev/arduino
roslaunch explore explore.launch
roslaunch map map_save.launch
The package rf2o_laser_odometry
is primarily used for odometry. Execute the following command to run it:
roslaunch rf2o_laser_odometry rf2o_laser_odometry.launch
- The AMCL algorithm is applied for robot localization. Use the following command:
roslaunch point_to_point_nav amcl_test.launch
- Alternatively, a laser lidar-based localization method is provided. After mapping the target area, run the following command:
roslaunch point_to_point_nav point_to_point_nav.launch
The chassis is controlled by an ESP32-S3
board. To control movement using a keyboard, follow these steps:
- Burn
controlled_move.ino
into theESP32-S3
board. - Open the serial monitor and set the baud rate to 115200.
- Use the following keys to control movement:
w
: Move forwarda
: Turn lefts
: Move backwardd
: Turn rightx
: Stop
A customized local planner is applied for the navigation stack. Follow these steps:
roslaunch point_to_point_nav point_to_point_nav.launch
# Use 2D pose estimate to calibrate the initial position.
# Use 2D Nav Goal to set the destination.