This is responsible for the auto docking of the robot.
It follows four steps strategy:
- Navigate to a point in front of docking station using navigation stack
- Move towards Artag using the camera and stop at certain distance
- Rotate 180 degree
- Move backward untill the robot is docked (backwards motion is based upon the lidar's backward distance)
This package detects the Artag. To install this, you need to go into your workspace using
cd catkin_ws/src/
clone the repo
git clone https://github.com/ros-perception/ar_track_alvar.git
git clone https://github.com/IntelRealSense/realsense-ros.git -b ros1-legacy
git clone https://github.com/UsamaArshad16/rehab_docking.git
Build these packages
cd ..
rosdep install --from-paths src --ignore-src -r -y
catkin_make
source devel/setup.bash
roslaunch rehab_bringup rehab_bringup.launch
open another terminal
roslaunch rehab_navigation rehab_navigation.launch
localize properly
open another terminal
roslaunch realsense2_camera rs_camera.launch
open another terminal
roslaunch ar_track_alvar pr2_indiv_no_kinect.launch
You also need to specify your tag/marker size and topics in the pr2_indiv_no_kinect.launch file.
so you can set the args like this in launch file
<arg name="marker_size" default="15" />
<arg name="cam_image_topic" default="/camera/color/image_raw" />
<arg name="cam_info_topic" default="/camera/color/camera_info" />
<arg name="output_frame" default="/camera_link" />
open another terminal
rosrun rehab_docking ar_auto_docking.py