Code Monkey home page Code Monkey logo

universal_robot_ign's Introduction

universal_robot_ign

universal_robot_ign : Run universal robot in Ignition Gazebo simulator .

It provides SDF models of universal robot for Ignition Gazebo. In addition, it also provides a moveit2 application demo and simple grasp demo with Gripper Robotiq140 .

Usage

Install

  • ROS 2: Galactic
  • Ignition : Fortress
  • dependencies:moveit2, xmacro, sdformat_tools (from source code)
#install dependency
pip install xmacro
sudo apt-get install ros-galactic-moveit
export IGNITION_VERSION=fortress
#cd src of ros2 workspace and download source code
git clone https://github.com/gezp/sdformat_tools.git
git clone https://github.com/gezp/universal_robot_ign.git
#cd ros2 workspace and build
colcon build

UR10 moveit2 demo

launch Ignition Gazebo simulator for UR10

ros2 launch universal_robot_ign ur10_ign.launch.py 
  • joint_trajectory_controller will be used in this demo

launch moveit2 move_group action server for UR10.

ros2 launch universal_robot_ign ur10_moveit2_demo.launch.py 

run moveit2 client node, plan to goal

ros2 run universal_robot_ign test_pose_goal.py
  • start position <-> goal pose: [-0.0, 0.4, 0.6, 0.0, 0.0, 0.0] (loop)

the result:

UR10 + Robotiq140 Grasp demo

  • control gripper Robotiq140 to grasp object and control UR10 based on joint position.

launch Ignition Gazebo simulator for UR10 + Robotiq140

ros2 launch universal_robot_ign ur10_robotiq140_ign.launch.py 
  • use Ignition plugin RobotiqController to control Robotiq140.

run gripper test node to grasp stick model by closing gripper

ros2 run universal_robot_ign test_gripper.py 
#1 : close gripper to grasp.
#0 : open gripper.

the result:

Models

the package contains some SDF models :

  • robotic arm universal_robot models : ur3,ur5,ur10
  • robotic gripper models: robotiq140

in addition, it also provides a combination model ur10_robotiq140 (resource/xmacro/ur10_robotiq140.sdf.xmacro), which is ur10 robotic arm attached robotiq140 gripper.

the sdf files of these models are written modularly by use xmacro which is a xml macro tool.

Controllers

UR Controller

Ignition Controller

  • Ignition plugin ignition-gazebo-joint-position-controller-system is used to control joints of robotic arm .
  • The position PID parameter should be set in plugins.

PID parameter:

  • The PID parameter of Ignition joint position controller plugin is set roughly ,so the performance of control is not well, you can modify PID parameter by modifying SDF file of model.

ROS controller

  • joint_position_controller
    • receive ROS msg sensor_msgs::msg::JointState and publish target position ignition::msgs::Double for each joint (control based on position pid) .
    • it's a simple communication bridge
  • joint_trajectory_controller
    • receive ROS msg trajectory_msgs::msg::JointTrajectory
    • use interpolation based on time for joint trajectory and keep publishing target position according to current time until the last trajectory point is processed .
    • this is not the most efficient way, but easy to Implement (it can work well with moveit2)

Robotiq Ignition Controller

Ignition Plugin RobotiqController is created to control Robotiq Gripper(2 fingers gripper) .

Add plugin In SDF

<plugin filename="RobotiqController" name="ignition::gazebo::systems::RobotiqController">
	<gripper_name>gripper</gripper_name>
    <fixed>false</fixed>
    <vel_scale>1.0</vel_scale>
</plugin>    
  • some code snippets like joint name of model's joint are hardcoded In Plugin RobotiqController
  • the tag fixed with ture will make RobotiqController use detachable joint to fix grasped object with gripper.

RobotiqController can be modified to get parameters from SDF which can work for genenral 2 fingers gripper,however, it is trivial so that I have no plan to implement this function currently.

Create Node ros_ign_bridge to transfer Msg from ROS2 to Ignition

ros_ign_bridge = Node(package='ros_ign_bridge',executable='parameter_bridge',
	arguments=["/model/ur10/gripper@std_msgs/msg/Bool]ignition.msgs.Boolean"],
	remappings=[("/model/ur10/gripper","/gripper"),],
    output='screen'
)

Publish ROS2 msg

  • use scripts/test_gripper.py

Slipping Problem

There is Gripper Slipping Problem on Gazebo-classic which need use plugin to add fixed joint between object and gripper when grasp.

Ignition Gazebo performs better than Gazebo-classic on the Grasp Task, but also exists some problem in some situations.

  • it can grasp box tightly In Ignition Gazebo
    • it performs better than Gazebo-classic.
  • it can't grasp sphere In Ignition Gazebo (RobotiqController is based on velocity control, not effort control)
    • Because the size of contact area is so small that the friction is not enough to hold grasped object, and property max_depth of contact is not implemented In Ignition Gazebo currently.
    • In this situation, a fixed joint is needed to fix object with gripper, you can modified SDF and set Tag fixed with ture.

Maintainer and License

Maintainer : Zhenpeng Ge, [email protected]

universal_robot_ign is provided under MIT License.

universal_robot_ign's People

Contributors

benediktkreis avatar gezp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

universal_robot_ign's Issues

Can't build the repository

Hello sir, I am having an issue building this repository.
When I make "colcon build", i get at the end :
Summary: 0 packages finished [4.05s]
1 package failed: universal_robot_ign
1 package had stderr output: universal_robot_ign

Can you help me please.

Compatibility with Gazebo Classic

Hello,

Is this repository compatible with Gazebo Classic also? I am looking for a gripper which can be controlled in Gazebo Classic 11 with MoveIt2.

cannot find ros_ign_gazebo

Hi, when I try to execute "ros2 launch universal_robot_ign ur10_ign.launch.py ", I got an error, saying there is no ros_ign_gazebo.

I have installed the Ros2 Galactic and the Ignition Gazebo Fortress, but I still could not find ros_ign_gazebo.

gz_ros2_control

Did you consider to use gz_ros2_control instead of custom plugins ?

I will be happy to review the PRs or maybe go ahead make the changes.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.