ROS2.0 Foxy and Humble repositories which provide ready-to-use ROS2.0 Gazebo + MoveIt!2 simulation packages for different Industrial and Collaborative Robots.
IFRA (Intelligent Flexible Robotics and Assembly) Group
Centre for Robotics and Assembly
Cranfield University
The IFRA (Intelligent Flexible Robotics and Assembly) Group is part of the Centre for Robotics and Assembly at Cranfield University.
IFRA Group pushes technical boundaries. At IFRA we provide high-tech automation & assembly solutions, and we support smart manufacturing with Smart Industry technologies and solutions. Flexible Manufacturing Systems (FMS) are a clear example. They can improve overall operations and throughput quality by adapting to real-time changes and situations, supporting and pushing the transition towards flexible, intelligent and responsive automation, which we continuously seek and support.
The IFRA Group undertakes innovative research to design, create and improve Intelligent, Responsive and Flexible automation & assembly solutions, and this series of GitHub repositories provide background information and resources of how these developments are supported.
ROS (Robotics Operating System) is a great tool that, combined with Gazebo and MoveIt! frameworks, provides a great amount of resources and capabilities to develop different Robotics Applications with a huge range of Industrial and Collaborative Robots.
Nonetheless, developing new applications in ROS requires a huge previous work, which consists in developing ROS Packages that contain all the Robot data required for the Simulation and Control, including:
As a common rule, the software stack needed to execute and test an Industrial Robot Simulation in ROS is:
ROS is now undertaking a transformation process to ROS2, a newer and improved version of ROS1. Thus, this involves that all the developments, implementations and packages released for ROS1 have to be forked/translated to ROS2 or are directly unavailable in ROS2.
The IFRA Group in Cranfield University (Bedfordshire, UK) has identified a huge gap in the availability of “ready-to-use” ROS2 Industrial Robot Simulation packages, and that is why the ros2_RobotSimulation ROS2 repository has been developed and released. The repository consists of Gazebo (simulation) + MoveIt!2 (control) package combinations for each supported Industrial Robot (or Robot + Gripper combinations), and follows a common standard for a better understanding and further development.
All packages in this repository have been developed, executed and tested in an Ubuntu 20.04 machine with ROS2.0 Foxy. Please find below all the required steps to set-up a ROS2.0 Foxy environment in Ubuntu and install the Robot Simulation packages.
sudo apt install git
git config --global user.name YourUsername
git config --global user.email YourEmail
git config --global color.ui true
git config --global core.editor code --wait # Visual Studio Code is recommended.
git config --global credential.helper store
source opt/ros/foxy/setup.bash
sudo apt install ros-foxy-moveit
# Binaries are recommended for a cleaner MoveIt!2 install and usage.
source ~/dev_ws/install/local_setup.bash
sudo apt install ros-foxy-ros2-control
sudo apt install ros-foxy-ros2-controllers
sudo apt install ros-foxy-gripper-controllers
sudo apt install gazebo11
sudo apt install ros-foxy-gazebo-ros2-control
sudo apt install ros-foxy-gazebo-ros-pkgs
sudo apt install ros-foxy-xacro
Required to run ros2_RobotSimulation ROS2.0 packages:
cd ~/dev_ws/src
git clone https://github.com/IFRA-Cranfield/ros2_RobotSimulation.git
cd ~/dev_ws/
colcon build
The Simulation & Control packages of the following Robots are currently available:
This repository contains all the custom data structures that are used for the ROS2 Robot Actions/Triggers in ros2_RobotSimulation. Every single ROS2 Action that is used to trigger a robot movement refers to a .action data structure, which contains all the data needed to run that specidic action. For further detail, please click here.
The ros2_actions package gathers all the ROS2 Action Servers that execute ROS2 Robot Actions/Triggers. Every specific robot movement is contained in a ROS2 Action Server (.cpp script), which can be externally “called” (triggered) and returns some feedback after the execution. For further detail, please click here.
The following video shows how ROS2 Robot Action calls are done from the Ubuntu Terminal:
It is a cool feature to be able to execute different ROS2 actions and trigger different movements in a Robot in Gazebo, but Robotics Applications are made of sequences that execute different commands one after the other. In a nutshell, that is what this ros2_execution package does. The ros2_execution.py script contains all the Action Clients that connect to the Action Servers generated in ros2_actions, and executes robot movements one after the other according to a pre-defined sequence, which is inputted as a .txt file. For further information, please click here.
One of the main advantages of using this ros2_execution package, combined with ros2_data/ros2_actions and the Robot Simulation packages contained in this repository, is that programs/sequences can be executed in the exact same way for different Robots, which is a completely novel feature and has been made possible thanks to the MoveIt!2 framework.
The following videos showcase the execution of a program (a sequence of movements -> {MoveJ, MoveL, MoveROT, MoveR}) executed in the exact same way for the ABB-IRB120 and UR3 robots:
Unfortunately, Gazebo and ROS2 do not provide an effective method to properly pick and place (manipulate) objects in simulation (if it exists, it has not been found). This feature is essential in order to test and simulate different applications, and that is the main reason why this ros2_grasping package has been created.
The attacher_action.py script contains a ROS2 Action Server that performs the task of attaching/detaching a specific object to a specific end-effector in Gazebo. Apart from the attaching functionality, the spawn_object.py script enables the user to spawn custom objects (contained in .urdf of .xacro files) to a Gazebo simulation environment. For further detail, please click here.
The video below showcases a simple cube pick and place task executed by an ABB-IRB120 robot:
Please find below a list of potential improvements and new features that have been identified for this repository:
This repo contains only a few number of robots, end-effectors and simulation environments (layouts). Please do let us know if you wish to include a specific robot/end-effector or application into ros2_RobotSimulation!
The exact same thing for the ROS2 Robot Actions/Triggers: A few number of robot movements have been implemented, therefore please do let us know if you have any ideas of a potential Robot motion for our repo!
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated. If you have a suggestion that would make this better, or you find a solution to any of the issues/improvements presented above, please fork the repo and create a pull request. You can also simply open an issue with the tag “enhancement”.
Don’t forget to give the project a star! Thanks you very much!
Intelligent Flexible Robotics and Assembly Group
Created on behalf of the IFRA Group at Cranfield University, United Kingdom
E-mail: [email protected]
Licensed under the Apache-2.0 License.
You may obtain a copy of the License at: http://www.apache.org/licenses/LICENSE-2.0
Cranfield University
School of Aerospace, Transport and Manufacturing (SATM)
Centre for Robotics and Assembly
College Road, Cranfield
MK43 0AL, Bedfordshire, UK
You can cite our work with the following statement:
IFRA (2022) ROS2.0 ROBOT SIMULATION. URL: https://github.com/IFRA-Cranfield/ros2_RobotSimulation.
Mikel Bueno Viso - Research Assistant in Intelligent Automation at Cranfield University
E-mail: [email protected]
LinkedIn: https://www.linkedin.com/in/mikel-bueno-viso/
Profile: https://www.cranfield.ac.uk/people/mikel-bueno-viso-32884399
Dr. Seemal Asif - Lecturer in Artificial Intelligence and Robotics at Cranfield University
E-mail: [email protected]
LinkedIn: https://www.linkedin.com/in/dr-seemal-asif-ceng-fhea-miet-9370515a/
Profile: https://www.cranfield.ac.uk/people/dr-seemal-asif-695915
Professor Phil Webb - Professor of Aero-Structure Design and Assembly at Cranfield University
E-mail: [email protected]
LinkedIn: https://www.linkedin.com/in/phil-webb-64283223/
Profile: https://www.cranfield.ac.uk/people/professor-phil-webb-746415