atom-robotics-lab / aruco_navigation

14 stars 4 forks source link

Aruco Navigation

This project aims to make a aruco navigation robot which follow a particular Aruco Marker also keeping a minimum safe distance from it.

The software stacks implemented in this project are ROS and Python. We also made use of OpenCV for the Aruco detection part.

An ArUco marker is a synthetic square marker composed by a wide black border and an inner binary matrix which determines its identifier (id). The black border facilitates its fast detection in the image and the binary codification allows its identification and the application of error detection and correction techniques. The marker size determines the size of the internal matrix.


Installation

Pre-Requisites :


Installation of Virtualenvwrapper, OpenCV, and CV_bridge

Your can refer to A.T.O.M's wiki for installation of the above mentioned packages and libraries.


Clone the Aruco Navigation package

Now go ahead and clone this repository inside the "src" folder of the catkin workspace you just created by executing the command given below in your terminal.

git clone git@github.com:atom-robotics-lab/aruco_navigation.git


Clone the MR-Robot package

this package provide us the bot which we are gonig to use. Go inside the "src" folder of the catkin workspace and executing the command given below in your terminal.

git clone git@github.com:atom-robotics-lab/MR-Robot.git


Now out robot does not have camera in this package so we have to chang branch from main to with_camera.
Now then go inside MR-Robot package you just created by executing the above command then executing the command given below in your terminal.

git checkout with_camera 


Make the package

We'll need to "make" everything in our catkin workspace so that the ROS environment knows about our new package. (This will also compile any necessary code in the package). Execute the given commands in your terminal.

cd ~/catkin_ws
catkin_make


Edit your bashrc file

You need to add these lines in your bashrc file to path aruco marker in gazebo.

To open your bashrc file

nano ~/.bashrc
source /usr/share/gazebo/setup.bash
export GAZEBO_MODEL_PATH="${CATKIN_ENV_HOOK_WORKSPACE}/../src/aruco_navigation/models/:${GAZEBO_MODEL_PATH}"
export GAZEBO_MODEL_PATH=$GAZEBO_MODEL_PATH:$HOME/path_to_your_catkin_workspace/src/aruco_navigation/models
source ~/.bashrc



VAMOS!! The installation is done and now its time to play around with the robot :)

Launch

roslaunch aruco_navigation aruco_navigation.launch

The above command when executed in the terminal will launch the gazebo simulation and will also start ROS Master.

Run the node

rosrun aruco_navigation aruco_controlloop.py

The given command will run the controller script which controls the robot's movements.