roboticsgroup / roboticsgroup_upatras_gazebo_plugins

BSD 3-Clause "New" or "Revised" License
41 stars 17 forks source link

MimicJointPlugin for prismatic joints in Gazebo #2

Closed ckashis closed 3 years ago

ckashis commented 3 years ago

Hi, I have one doubt in implementing mimic joints for prismatic joints. I created a gripper joint and a mimic joint for that. When doing simulations, the joints should come closer to grasp the object. But I don't know how to use the multiplier in mimic joints. I visualized it in RViz and it is working fine. When I included the Gazebo plugin, I came across the attribute multiplier again. Does it have an effect on moving the joints? I tried some possibilities but while visualizing in Gazebo, the mimic joint was not moving. The description of the joints are given below. Please help me to solve the issue.

<joint name="right_gripper" type="prismatic"> <origin xyz="-0.0636850931937402 -0.0249247286009447 -0.297020356637698" rpy="0 0 0" /> <parent link="r3" /> <child link="right_gripper" /> <axis xyz="-1 0 0" /> <limit lower="0" upper="0.005"effort="1000.0" velocity="0.5" /> <dynamics damping="0.02" friction="0.0" > </joint>

<joint name="ac2" type="prismatic"> <origin xyz="-0.0961743681871238 -0.0249118761291195 -0.297505666137289" rpy="0 0 0" /> <parent link="r3" /> <child link="ac2" /> <axis xyz="1 0 0" /> <limit lower="0" upper="0.005" effort="1000.0" velocity="0.5" /> <mimic joint="right_gripper" multiplier="1" offset="0" /> <dynamics damping="0.02" friction="0.0" /> </joint>

<xacro:mimic_joint_plugin_gazebo name_prefix="ac2" parent_joint="right_gripper" mimic_joint="ac2 has_pid="true" multiplier="1.0" max_effort="10.0" />

nlamprian commented 3 years ago

Hi, there are typos in the xml snippet you shared. I assume those are not present in the original description. Having said that, here are some points to take care of:

ckashis commented 3 years ago

Hi, Thank you so much for the points. I set the has_pid to false. I did exactly like OpenMANIPULATOR-X and used the Mimic Joint plugin.