/IFRA_LinkAttacher

This repository provides a simple ROS2 Gazebo plugin that creates a fixed joint between 2 different links in a Gazebo simulation.

Primary LanguageC++Apache License 2.0Apache-2.0


IFRA_LinkAttacher - Gazebo-ROS2 Plugin

IFRA (Intelligent Flexible Robotics and Assembly) Group
Centre for Robotics and Assembly
Cranfield University


ABOUT

Intelligent Flexible Robotics and Assembly Group

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.

SOCIAL MEDIA:

IFRA-Cranfield:

Centre for Robotics and Assembly:

IFRA_LinkAttacher Repository

The IFRA_LinkAttacher repository contains 2 different ROS2 packages, which enable the attachment of 2 different entity links in Gazebo. This attachment is done through a simple ROS2/Gazebo plugin, and can be used for many applications in a Gazebo simulation environment.

The plugin has been designed with the main purpose of simulating object pick and place tasks using Robot Manipulators in Gazebo. The link attachment/detachment feature is available through a ROS2 Service Server, which creates a temporary fixed joint between two links for the "ATTACH" request, and removes the previously generated joint for the "DETACH" service. Thanks to this functionality, objects can be easily attached to any end-effector and pick/place tasks can be simulated in Gazebo-ROS2.

DEVELOPMENT: For the design of the IFRA_LinkAttacher ROS2/Gazebo plugin, the design pattern of the working gazebo_ros_state ROS2 plugin has been followed. The code has been modified/adapted for the main purpose of this new plugin (ATTACH/DETACH links), following the Gazebo API documentation for gazebo::physics.

VIDEO: Pick and Place Task - ROS2 Gazebo Simulation (UR3 + Robotiq 2f-85)

Alt text


INSTALLATION

Both packages in this repository have been developed, executed and tested in a Ubuntu 22.04 machine with ROS 2 Humble (the plugin has not been tested in other ROS2 distributions yet). It can be easily downloaded and installed by executing the following commands:

cd ~/dev_ws/src
git clone https://github.com/IFRA-Cranfield/IFRA_LinkAttacher.git
cd ~/dev_ws
colcon build

USAGE

The IFRA_LinkAttacher ROS2-Gazebo plugin offers the link attachment/detachment feature though 2 different ROS2 Services, which can be called by executing the following commands:

# To ATTACH an OBJECT to a ROBOT's END-EFFECTOR:
ros2 service call /ATTACHLINK linkattacher_msgs/srv/AttachLink "{model1_name: 'model1', link1_name: 'link1', model2_name: 'model2', link2_name: 'link2'}"
# To DETACH the OBJECT from the END-EFFECTOR:
ros2 service call /DETACHLINK linkattacher_msgs/srv/DetachLink "{model1_name: 'model1', link1_name: 'link1', model2_name: 'model2', link2_name: 'link2'}"

Elements are defined as follows:

  • model1 -> Name of the model/robot (defined in the robot .urdf).
  • link1 -> Name of the end-effector link that the object will be attached to.
  • model2 -> Name of the object to be attached (defined in the object .urdf).
  • link2 -> Name of the object link.

MAIN REQUIREMENT to execute the plugin: Gazebo .world file

In order for the /ATTACHLINK and /DETACHLINK ROS2 services to be available in simulation, the LinkAttacher Plugin must be initialised in Gazebo. This is done by adding the following line to the Gazebo world file:

<plugin name="gazebo_link_attacher" filename="libgazebo_link_attacher.so"/>

An example of how the plugin is initialised in a world file can be found in the ros2_SimRealRobotControl GitHub repository here.

EXAMPLE: Pick and place execution

The source code for the pick and place video (UR3 + Robotiq 2f-85) shown above and instructions about how different robot programs are generated (including object grasping) can be found in the ros2_SimRealRobotControl GitHub repository here.


License

Intelligent Flexible Robotics and Assembly Group
Created on behalf of the IFRA Group at Cranfield University, United Kingdom
E-mail: IFRA@cranfield.ac.uk

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


Cite our work

You can cite our work with the following statement:
IFRA-Cranfield (2023) Gazebo-ROS2 Link Attacher. URL: https://github.com/IFRA-Cranfield/IFRA_LinkAttacher.


Contact

Mikel Bueno Viso - Research Assistant in Intelligent Automation at Cranfield University
E-mail: Mikel.Bueno-Viso@cranfield.ac.uk
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: s.asif@cranfield.ac.uk
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: p.f.webb@cranfield.ac.uk
LinkedIn: https://www.linkedin.com/in/phil-webb-64283223/
Profile: https://www.cranfield.ac.uk/people/professor-phil-webb-746415