Bachelor project on autonomous docking of an AGV (mobile base: Robotino, cobot:UR5)
This bachelor thesis presents an autonomous parking solution for Robotino, a differential robot produced by Festo Didactic. The solution utilizes AR tags to provide visual information to Robotino, enabling accurate and precise parking at predefined positions. The aim is to mount a robot arm on top of an AGV for various production tasks. The focus of the developed code is on structure and clarity, allowing room for future development. This is not a finished product. The prototype has been successfully developed, and accuracy and precision tests have been completed. With this project, I have achieved a precision of ± 5 millimeters in 100% of cases and ± 3 millimeters in 85% of cases. The accuracy of the mobile base is 12 millimeters in 100% of cases.
Cotanct Information at the bottom of the giude!
Introduction link.
Before Reading:
Warning This package has only been tested with ROS Melodic and VMware Workstation 17 Player. It has not been tested with other ROS versions or on a clean Linux machine. --Throughout the guide, make sure that the following instructions are made for ROS Melodic and Robotino only! The robotic arm guide is
not included!
- Connect to the school's Robot 2G/5G network.
- In the "Edit Virtual Machine Settings" menu, select "Network Adapter" and choose "NAT: used to share the host's IP address".
- Check that the network settings on your VM machine are set to "auto".
- Run:
gedit ~/.bashrc
and make sure that the ROS_IP
and ROS_MASTER_URI
lines are commented out or deleted from the bottom of the file.
- Install the following packages:
https://github.com/frdedynamics/ros_robotino_rest_pkg
https://github.com/meldew/2023_Bachelor_Project_AGV_Docking
http://wiki.ros.org/ar_track_alvar
- Since Robotino does not have ROS installed, run all packages via Remote PC (i.e., your personal PC, not Robotino's Linux machine).
- Connect the camera to
Remote PC
via USB. (Your own pc, not Robotino's Linux machine
) - Before running the calibration program, run the following commands :
roscore
rosrun usb_cam usb_cam_node
- Run the calibration program:
rosrun camera_calibration cameracalibrator.py --size 8x6 --square 0.025 image:=/usb_cam/image_raw camera:=/usb_cam
- Once the GUI is open, move a sheet of paper around in front of the webcam at different angles and distances until the "calibrate" button is highlighted. After it finishes calibrating, save and then commit the calibration.
- Point the camera at your printed AR tags and run the following (replace the marker size and webcam number if needed):
5.1. To create a marker with for exemple id ‘123’ use folowing command:
rosrun ar_track_alvar createMarker 123
Then :
roslaunch ar_tag_toolbox usb_cam.launch cam_id:=2
You can also run cam_id = 0 as a default if cam_id=2 does not work
roslaunch ar_tag_toolbox ar_track_usb_cam.launch marker_size:=5
6: Run the following command to see the ID of the AR Tag being detected:
rostopic echo /ar_pose_marker
Note : Since Robotino does not have ROS installed, run all packages via Remote PC (i.e., your personal PC, not Robotino's Linux machine).
- Run the following command to connect to Robotino:
ssh robotino@172.#######
- Start the
REST API
to Robotino:
roslaunch ros_robotino_rest_pkg single_robot_robotino.launch
- In
Robotino_tag_tracker.py
, settarget_marker
to theID
of yourAR tag
.
- Check if all these packages are installed in
Robotino_tag_tracker.py
:
from tf.transformations import euler_from_quaternion
from ar_track_alvar_msgs.msg import AlvarMarkers
from geometry_msgs.msg import Twist, PoseStamped
from sensor_msgs.msg import Image
from nav_msgs.msg import Odometry
import tf.transformations as tf
import numpy as np
import cv_bridge
import cv2 as cv
import rospy
import math
import time
- Start the AR tag tracker:
roslaunch ar_tag_toolbox my_ar_track.launch
- Save the file, place the tag in front of the camera, and run the following command:
Note : Be aware of that once you run this line, robotino will start a serch sequence where robotino is turning untill it finds the AR_tag.
rosrun ar_tag_toolbox Robotino_tag_tracker.py
It is also possible to control Robotino from the keyboard. If desired, the following command can be run:
rosrun ar_tag_toolbox robotino_control_tast.py
Note : For questions, please don't hesitate and write me an email to
[email protected]
or create an issue☺️ .