I cannot make gazebo_ros_vacuum_gripper plugin to work. Please help
Hello,
I have a vacuum gripper in Gazebo simulation and I am trying to attach the gazeborosvacuum_gripper plugin to make it work but without any success so far.
My .xacro configuration is as follows:
<?xml version="1.0"?>
<robot xmlns:xacro="http://www.ros.org/wiki/xacro">
<xacro:macro name="create_vacuum_gripper" params="wrist_link link_no *origin">
<joint name="vacuum_gripper_joint_${link_no}" type="revolute">
<xacro:insert_block name="origin" />
<axis xyz="0 0 1" />
<limit lower="0" upper="0" effort="0" velocity="0" />
<parent link="${wrist_link}" />
<child link="vacuum_gripper_link_${link_no}" />
<dynamics damping="0.0" friction="0.0"/>
</joint>
<link name="vacuum_gripper_link_${link_no}">
<inertial>
<origin xyz="0 0 0" rpy="0 0 0" />
<inertia ixx="0.0000063" ixy="0" ixz="0"
iyy="0.0000063" iyz="0"
izz="0.000025" />
<mass value="0.01" />
</inertial>
<visual>
<origin xyz="0 0 0" rpy="0 0 0" />
<geometry>
<cylinder radius="0.05" length="0.01" />
</geometry>
<material name="SomeColor">
<color rgba="1.0 0.0 0.0 1.0"/>
</material>
</visual>
<collision>
<origin xyz="0 0 0" rpy="0 0 0"/>
<geometry>
<cylinder radius="0.05" length="0.01"/>
</geometry>
</collision>
</link>
<gazebo reference="vacuum_gripper_link_${link_no}">
<material>Gazebo/Black</material>
</gazebo>
<gazebo>
<plugin name="gazebo_ros_vacuum_gripper" filename="libgazebo_ros_vacuum_gripper.so">
<robotNamespace>/robotName/${link_no}</robotNamespace>
<bodyName>vacuum_gripper_link_${link_no}</bodyName>
<topicName>grasping</topicName>
<maxForce>20</maxForce>
<maxDistance>0.10</maxDistance>
<minDistance>0.01</minDistance>
</plugin>
</gazebo>
</xacro:macro>
</robot>
and then to use the above, I am using the following lines in my main .xacro
<xacro:create_vacuum_gripper wrist_link="${prefix}carriage" link_no="1">
<origin xyz="-0.001 0 0.9" rpy="${90 * 0.0174533} 0 1.5708" />
</xacro:create_vacuum_gripper>
So with that configuration and by using rosservice call /robotName/1/on "{}" and rosservice call /robotName/1/off "{}" to activate deactivate suction, nothing happens and a target item (box) is not gripped.
Any help would be greatly appreciate it! Thank you.
Asked by Zoid on 2018-12-12 15:51:25 UTC
Comments
It's probably not the cause here, but names starting with a digit are not valid (see wiki/Names).
You might want to change the value you set for
robotNamespace
.Asked by gvdhoorn on 2018-12-12 15:53:17 UTC
Thank you for the reply. Unfortunately it is not this. In the original my namespace is rosservice call robotName/1/on "{}". I will edit my question to clarify this!
Asked by Zoid on 2018-12-12 16:05:27 UTC