This repository provides ROS packages designed for precise and reliable autonomous docking of differential-drive robots. Utilizing a state machine-based approach and fiducial markers for navigation, robots equipped with camera sensors can achieve accurate docking without modifying existing navigation stacks.
autodock_core
: Core docking logic and librariesautodock_examples
: Demonstrations and test scriptsautodock_sim
: Simulation environments for docking scenarios
Developed for ROS Noetic. Install dependencies first:
cd ~/catkin_ws/src
git clone https://github.com/ArghyaChatterjee/autonomous-docking-for-mobile-robots.git autodock
cd ~/catkin_ws
rosdep update && rosdep install --from-paths src --ignore-src -yr
catkin_make
Dependencies:
- Fiducial Marker Detection
- Turtlebot Simulation (optional)
Launch Gazebo simulation:
roslaunch autodock_sim dock_sim.launch
Send docking goal:
rostopic pub /autodock_action/goal autodock_core/AutoDockingActionGoal {} --once
The robot initiates docking upon receiving a goal and interacts with a simulated charger (MockCharger
).
Control Commands:
# Remote control robot
rosrun teleop_twist_keyboard teleop_twist_keyboard.py
# Cancel docking action
rostopic pub /autodock_action/cancel actionlib_msgs/GoalID {} --once
# Pause docking action
rostopic pub /pause_dock std_msgs/Bool True --once
Run smoke tests with random docking attempts:
rosrun autodock_examples dock_sim_test.py -c 10
Install dependency:
sudo apt install ros-noetic-turtlebot3-gazebo
Launch Turtlebot3 docking:
roslaunch autodock_sim tb3_dock_sim.launch
rostopic pub /autodock_action/goal autodock_core/AutoDockingActionGoal {} --once
Ensure Turtlebot3 simulation and navigation stack are installed:
sudo apt install ros-noetic-turtlebot3*
Run simulations:
- Launch world and docking server:
roslaunch autodock_sim tb3_nav_dock_sim.launch
- Start the navigation stack:
export TURTLEBOT3_MODEL=burger
roslaunch turtlebot3_navigation turtlebot3_navigation.launch map_file:=$HOME/map.yaml open_rviz:=0
- Localize and navigate robot, then send docking goal:
rostopic pub /autodock_action/goal autodock_core/AutoDockingActionGoal {} --once
The system includes obstacle detection during docking.
Build and run Docker container:
cd catkin_ws/src/autodock
docker build -t osrf/autodock:v1 .
docker run -it --network host osrf/autodock:v1 bash -c "$COMMAND"
- Improve obstacle detection integration with costmap.
Launch autodock server separately:
# Terminal 1
roslaunch autodock_sim dock_sim.launch autodock_server:=false
# Terminal 2
roslaunch autodock_core autodock_server.launch \
autodock_config:=src/autodock/autodock_examples/configs/mock_robot.yaml