Problem with making a floating gripper in Gazebo
Hi, I am trying to make a floating gripper for gazebo that will be used for reinforced learning, so far I want it to move up and down and close its claws. Currently I have a problem with spawning it in gazebo simulation, because I think the urdf is not parsed correctly, because the gravity is turned off only for the first link. The code for gripper is attached below. I guess I kinda messed up with the dummy links, but I can't find any example like that.
<?xml version="1.0" ?>
<!-- =================================================================================== -->
<!-- | Gripper file used for openai gym | -->
<!-- | | -->
<!-- =================================================================================== -->
<robot name="Gripper">
<gazebo reference="dummy_prismatic_link">
<gravity>0</gravity>
<mu1>0.5</mu1>
<mu2>0.5</mu2>
<material>Gazebo/Orange</material>
</gazebo>
<gazebo reference="dummy">
<gravity>0</gravity>
<mu1>0.5</mu1>
<mu2>0.5</mu2>
<material>Gazebo/Orange</material>
</gazebo>
<gazebo reference="gripper_main_body">
<gravity>0</gravity>
<mu1>0.5</mu1>
<mu2>0.5</mu2>
<material>Gazebo/Orange</material>
</gazebo>
<gazebo reference="gripper_finger1">
<gravity>0</gravity>
<mu1>0.5</mu1>
<mu2>0.5</mu2>
<material>Gazebo/Red</material>
</gazebo>
<gazebo reference="gripper_finger2">
<gravity>0</gravity>
<mu1>0.5</mu1>
<mu2>0.5</mu2>
<material>Gazebo/Red</material>
</gazebo>
<link name="world"/>
<joint name="fixed" type="fixed">
<parent link="world"/>
<child link="dummy"/>
</joint>
<joint name="gripper_dummy" type="fixed">
<parent link="dummy"/>
<child link="dummy_prismatic_link"/>
<origin rpy="0 0 0" xyz="0 0 0.5"/>
</joint>
<joint name="dummy_prismatic_joint" type="prismatic">
<parent link="dummy_prismatic_link"/>
<child link="gripper_main_body"/>
<origin rpy="0 3.14159265 0" xyz="0 0 0"/>
<axis xyz="0 0 1"/>
<limit effort="1.0" lower="-0.0" upper="0.02" velocity="1.0"/>
<dynamics damping="0.2"/>
</joint>
<transmission name="gripper_tran">
<type>transmission_interface/SimpleTransmission</type>
<joint name="gripper_joint">
<hardwareInterface>EffortJointInterface</hardwareInterface>
</joint>
<actuator name="gripper_motor">
<hardwareInterface>EffortJointInterface</hardwareInterface>
<mechanicalReduction>1</mechanicalReduction>
</actuator>
</transmission>
<joint name="gripper_joint1" type="prismatic">
<parent link="gripper_main_body"/>
<child link="gripper_finger1"/>
<origin rpy="0 0 0" xyz="0.001 0.01375 0.12925"/>
<axis xyz="0 1 0"/>
<limit effort="1.0" lower="-0.01" upper="0.01" velocity="1.0"/>
<dynamics damping="0.2"/>
</joint>
<transmission name="gripper_tran1">
<type>transmission_interface/SimpleTransmission</type>
<joint name="gripper_joint1">
<hardwareInterface>EffortJointInterface</hardwareInterface>
</joint>
<actuator name="gripper_motor0">
<hardwareInterface>EffortJointInterface</hardwareInterface>
<mechanicalReduction>1</mechanicalReduction>
</actuator>
</transmission>
<joint name="gripper_joint2" type="prismatic">
<parent link="gripper_main_body"/>
<child link="gripper_finger2"/>
<origin rpy="0 0 3.14159265" xyz="0.001 -0.012 0.12925"/>
<axis xyz="0 1 0"/>
<limit effort="1.0" lower="-0.01" upper="0.01" velocity="1.0"/>
<dynamics damping="0.2"/>
</joint>
<transmission name="gripper_tran2">
<type>transmission_interface/SimpleTransmission</type>
<joint name="gripper_joint2">
<hardwareInterface>EffortJointInterface</hardwareInterface>
</joint>
<actuator name="gripper_motor2">
<hardwareInterface>EffortJointInterface</hardwareInterface>
<mechanicalReduction>1</mechanicalReduction>
</actuator>
</transmission>
<link name="dummy">
<collision name="dummy_collision">
<origin rpy="0 0 0" xyz="0 0 0.5"/>
<geometry>
<cylinder length="0.014" radius="0.003"/>
</geometry>
</collision>
<visual name="dummy_visual">
<origin rpy="0 0 0" xyz="0 0 0.5"/>
<geometry>
<cylinder length="0.014" radius="0.003"/>
</geometry>
</visual>
</link>
<link name="dummy_prismatic_link">
<inertial ...