Corot Project: Multi Robots Task Allocation (MRTA)
The Corot Project, funded by the European Commission Interreg France-Channel-England Program, aims to improve the design of flexible and responsive manufacturing systems involving autonomous Collaborative Robots (CoRoT).
My MRTA project, as a part of the CoRot, is built at the laboratory LINEACT EA 7527 with objective to construct a ROS-Melodic-based system of multiple AGV Robots assembled by MIR100 robot, UR5 robot and Robotiq 2F 140 Gripper. This system is controlled by a supervisor system, which contains a mission planning algorithm developped based on the theory of Genetic Algorithm.
mrta
: Algorithm of task allocation to robotsmir_robot
: Metapackage for MIR100 robotuniversal_robot
: Metapackage for UR5 robotmanipulator
: Metapackage for the manipulator assembled by UR5 robot and Robotiq 2F 140 grippermm_robot
: Metapackage for the mobile manipulator assembled from MIR100 robot, UR5 robot and Robotiq 2F 140 Gripperusecase_gazebo
: Environment and map of the usecase for Gazebo simulation
-
Install Miniconda by following these two links: Miniconda, Instructions
-
Create
MRTA
environment:
conda create -n MRTA python=2.7
- Install required packages:
conda install -c conda-forge rospkg -n MRTA
conda install -c sotte empy -n MRTA
conda install -c conda-forge defusedxml -n MRTA
conda install -c miniconda numpy -n MRTA
conda install -c miniconda pyqtgraph -n MRTA
conda install -c miniconda yaml -n MRTA
conda install -c miniconda pycryptodomex -n MRTA
conda install -c conda-forge python-gnupg -n MRTA
conda install -c conda-forge matplotlib -n MRTA
- Add activation to file
.bashrc
or file.zshrc
:
echo "conda activate MRTA" >> ~/.bashrc
### Or
echo "conda activate MRTA" >> ~/.zshrc
- Add shebang to python files:
#!/home/hvh/miniconda3/envs/MRTA/bin/python
-
Install ROS Melodic by following this link: ROS Melodic
-
Creare
MRTA
workspace:
### Create MRTA_ws
mkdir ~/MRTA_ws
cd ~/MRTA_ws/
### Clone repository into workspace
git clone https://github.com/huynhvuh/multi_robots_task_allocation.git
chmod -R a+rX *
### Use rosdep to install all dependencies
rosdep update
rosdep install --from-paths src --ignore-src --rosdistro melodic -y
### Source-install of "assimp" package to fix error of "failed to import assimp" of "moveit_commander"
conda activate MRTA
git clone https://github.com/assimp/assimp.git
cd ./assimp
mkdir build && cd build
cmake .. -G 'Unix Makefiles'
make -j4
cd ..
cd ./port/PyAssimp
python setup.py install
### Build workspace
cd ~/MRTA_ws/
catkin_make
### Echo source to ".bashrc" file
echo "source ~/MRTA_ws/devel/setup.bash" >> ~/.bashrc
### Or to ".zshrc" file
echo "source ~/MRTA_ws/devel/setup.zsh" >> ~/.zshrc
- On the master PC:
Run
hostname -I
to get the IP address (Ex: 10.191.76.93), then add it to the source file:
### Echo to ".bashrc" file
echo "export ROS_IP=10.191.76.93" >> ~/.bashrc
echo "export ROS_MASTER_URI=http://10.191.76.93:11311" >> ~/.bashrc
### Or to ".zshrc" file
echo "export ROS_IP=10.191.76.93" >> ~/.zshrc
echo "export ROS_MASTER_URI=http://10.191.76.93:11311" >> ~/.zshrc
- On the other PCs:
Run
hostname -I
to get the IP address (Ex: 10.191.76.59), then add it to the source file:
### Echo to ".bashrc" file
echo "export ROS_IP=10.191.76.59" >> ~/.bashrc
echo "export ROS_MASTER_URI=http://10.191.76.93:11311" >> ~/.bashrc
### Or to ".zshrc" file
echo "export ROS_IP=10.191.76.59" >> ~/.zshrc
echo "export ROS_MASTER_URI=http://10.191.76.93:11311" >> ~/.zshrc
Each of the following command-lines should be run on each PC to maximize the simulation time (but not mandatory). Below is an example of 2 robots:
### Run the simulated usecase
roslaunch usecase_gazebo usecase_world_for_multi_mms.launch paused:="false"
### Run 2 AGV robots
roslaunch multi_mms indivi_mm.launch robot_name:="robot0" pose_x:="1" pose_y:="1"
roslaunch multi_mms indivi_mm.launch robot_name:="robot`" pose_x:="1" pose_y:="2"
### Run mission planning algorithm (2 products to manufacture)
python ~/MRTA_ws/src/mrta/scripts/MRTA_algorithm.py
- Error
[Err] [REST.cc:205] Error in REST request
: Inside the file.ignition/fuel/config.yaml
, replaceurl: https://api.ignitionfuel.org
byurl: https://api.ignitionrobotics.org