Skip to content

Commit

Permalink
Remove mimic tags and rename sim_ignition to sim_gazebo
Browse files Browse the repository at this point in the history
  • Loading branch information
sea-bass committed Jul 5, 2024
1 parent b6136bd commit 84248b6
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 46 deletions.
32 changes: 11 additions & 21 deletions robotiq_description/urdf/2f_140.ros2_control.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<xacro:macro name="robotiq_gripper_ros2_control" params="
name
prefix
sim_ignition:=false
sim_gazebo:=false
sim_isaac:=false
isaac_joint_commands:=/isaac_joint_commands
isaac_joint_states:=/isaac_joint_states
Expand All @@ -20,15 +20,15 @@
<param name="joint_commands_topic">${isaac_joint_commands}</param>
<param name="joint_states_topic">${isaac_joint_states}</param>
</xacro:if>
<xacro:if value="${sim_ignition}">
<xacro:if value="${sim_gazebo}">
<plugin>ign_ros2_control/IgnitionSystem</plugin>
</xacro:if>
<xacro:if value="${use_fake_hardware}">
<plugin>mock_components/GenericSystem</plugin>
<param name="fake_sensor_commands">${fake_sensor_commands}</param>
<param name="state_following_offset">0.0</param>
</xacro:if>
<xacro:unless value="${use_fake_hardware or sim_ignition or sim_isaac}">
<xacro:unless value="${use_fake_hardware or sim_gazebo or sim_isaac}">
<plugin>robotiq_driver/RobotiqGripperHardwareInterface</plugin>
<param name="gripper_closed_position">0.695</param>
<param name="COM_port">${com_port}</param>
Expand All @@ -38,7 +38,7 @@
</hardware>

<!-- Joint interfaces -->
<!-- With Ignition or Hardware, they handle mimic joints, so we only need this command interface activated -->
<!-- With Gazebo or Hardware, they handle mimic joints, so we only need this command interface activated -->
<joint name="${prefix}finger_joint">
<command_interface name="position" />
<state_interface name="position">
Expand All @@ -47,47 +47,37 @@
<state_interface name="velocity"/>
</joint>
<!-- When simulating we need to include the rest of the gripper joints -->
<xacro:if value="${use_fake_hardware or sim_isaac or sim_ignition}">
<xacro:if value="${use_fake_hardware or sim_isaac or sim_gazebo}">
<joint name="${prefix}left_inner_knuckle_joint">
<param name="mimic">${prefix}finger_joint</param>
<param name="multiplier">-1</param>
<xacro:unless value="${sim_ignition}">
<xacro:unless value="${sim_gazebo}">
<command_interface name="position"/>
<state_interface name="position"/>
<state_interface name="velocity"/>
</xacro:unless>
</joint>
<joint name="${prefix}left_inner_finger_joint">
<param name="mimic">${prefix}finger_joint</param>
<param name="multiplier">1</param>
<xacro:unless value="${sim_ignition}">
<xacro:unless value="${sim_gazebo}">
<command_interface name="position"/>
<state_interface name="position"/>
<state_interface name="velocity"/>
</xacro:unless>
</joint>
<joint name="${prefix}right_outer_knuckle_joint">
<param name="mimic">${prefix}finger_joint</param>
<param name="multiplier">-1</param>
<xacro:unless value="${sim_ignition}">
<xacro:unless value="${sim_gazebo}">
<command_interface name="position"/>
<state_interface name="position"/>
<state_interface name="velocity"/>
</xacro:unless>
</joint>
<joint name="${prefix}right_inner_knuckle_joint">
<param name="mimic">${prefix}finger_joint</param>
<param name="multiplier">-1</param>
<xacro:unless value="${sim_ignition}">
<xacro:unless value="${sim_gazebo}">
<command_interface name="position"/>
<state_interface name="position"/>
<state_interface name="velocity"/>
</xacro:unless>
</joint>
<joint name="${prefix}right_inner_finger_joint">
<param name="mimic">${prefix}finger_joint</param>
<param name="multiplier">1</param>
<xacro:unless value="${sim_ignition}">
<xacro:unless value="${sim_gazebo}">
<command_interface name="position"/>
<state_interface name="position"/>
<state_interface name="velocity"/>
Expand All @@ -96,7 +86,7 @@
</xacro:if>

<!-- Only add this with fake hardware mode -->
<xacro:unless value="${sim_ignition or sim_isaac}">
<xacro:unless value="${sim_gazebo or sim_isaac}">
<gpio name="reactivate_gripper">
<command_interface name="reactivate_gripper_cmd" />
<command_interface name="reactivate_gripper_response" />
Expand Down
32 changes: 11 additions & 21 deletions robotiq_description/urdf/2f_85.ros2_control.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<xacro:macro name="robotiq_gripper_ros2_control" params="
name
prefix
sim_ignition:=false
sim_gazebo:=false
sim_isaac:=false
isaac_joint_commands:=/isaac_joint_commands
isaac_joint_states:=/isaac_joint_states
Expand All @@ -25,15 +25,15 @@
<param name="joint_states_topic">${isaac_joint_states}</param>
<param name="trigger_joint_command_threshold">0.02</param>
</xacro:if>
<xacro:if value="${sim_ignition}">
<xacro:if value="${sim_gazebo}">
<plugin>ign_ros2_control/IgnitionSystem</plugin>
</xacro:if>
<xacro:if value="${use_fake_hardware}">
<plugin>mock_components/GenericSystem</plugin>
<param name="fake_sensor_commands">${fake_sensor_commands}</param>
<param name="state_following_offset">0.0</param>
</xacro:if>
<xacro:unless value="${use_fake_hardware or sim_ignition or sim_isaac}">
<xacro:unless value="${use_fake_hardware or sim_gazebo or sim_isaac}">
<plugin>robotiq_driver/RobotiqGripperHardwareInterface</plugin>
<param name="gripper_closed_position">0.7929</param>
<param name="COM_port">${com_port}</param>
Expand All @@ -43,7 +43,7 @@
</hardware>

<!-- Joint interfaces -->
<!-- With Ignition or Hardware, they handle mimic joints, so we only need this command interface activated -->
<!-- With Gazebo or Hardware, they handle mimic joints, so we only need this command interface activated -->
<joint name="${prefix}robotiq_85_left_knuckle_joint">
<command_interface name="position" />
<state_interface name="position">
Expand All @@ -52,47 +52,37 @@
<state_interface name="velocity"/>
</joint>
<!-- When simulating we need to include the rest of the gripper joints -->
<xacro:if value="${use_fake_hardware or sim_isaac or sim_ignition}">
<xacro:if value="${use_fake_hardware or sim_isaac or sim_gazebo}">
<joint name="${prefix}robotiq_85_right_knuckle_joint">
<param name="mimic">${prefix}robotiq_85_left_knuckle_joint</param>
<param name="multiplier">-1</param>
<xacro:unless value="${sim_ignition}">
<xacro:unless value="${sim_gazebo}">
<command_interface name="position"/>
<state_interface name="position"/>
<state_interface name="velocity"/>
</xacro:unless>
</joint>
<joint name="${prefix}robotiq_85_left_inner_knuckle_joint">
<param name="mimic">${prefix}robotiq_85_left_knuckle_joint</param>
<param name="multiplier">1</param>
<xacro:unless value="${sim_ignition}">
<xacro:unless value="${sim_gazebo}">
<command_interface name="position"/>
<state_interface name="position"/>
<state_interface name="velocity"/>
</xacro:unless>
</joint>
<joint name="${prefix}robotiq_85_right_inner_knuckle_joint">
<param name="mimic">${prefix}robotiq_85_left_knuckle_joint</param>
<param name="multiplier">-1</param>
<xacro:unless value="${sim_ignition}">
<xacro:unless value="${sim_gazebo}">
<command_interface name="position"/>
<state_interface name="position"/>
<state_interface name="velocity"/>
</xacro:unless>
</joint>
<joint name="${prefix}robotiq_85_left_finger_tip_joint">
<param name="mimic">${prefix}robotiq_85_left_knuckle_joint</param>
<param name="multiplier">-1</param>
<xacro:unless value="${sim_ignition}">
<xacro:unless value="${sim_gazebo}">
<command_interface name="position"/>
<state_interface name="position"/>
<state_interface name="velocity"/>
</xacro:unless>
</joint>
<joint name="${prefix}robotiq_85_right_finger_tip_joint">
<param name="mimic">${prefix}robotiq_85_left_knuckle_joint</param>
<param name="multiplier">1</param>
<xacro:unless value="${sim_ignition}">
<xacro:unless value="${sim_gazebo}">
<command_interface name="position"/>
<state_interface name="position"/>
<state_interface name="velocity"/>
Expand All @@ -101,7 +91,7 @@
</xacro:if>

<!-- Only add this with fake hardware mode -->
<xacro:unless value="${sim_ignition or sim_isaac}">
<xacro:unless value="${sim_gazebo or sim_isaac}">
<gpio name="reactivate_gripper">
<command_interface name="reactivate_gripper_cmd" />
<command_interface name="reactivate_gripper_response" />
Expand Down
4 changes: 2 additions & 2 deletions robotiq_description/urdf/robotiq_2f_140_macro.urdf.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
prefix
parent
*origin
sim_ignition:=false
sim_gazebo:=false
sim_isaac:=false
isaac_joint_commands:=/isaac_joint_commands
isaac_joint_states:=/isaac_joint_states
Expand All @@ -20,7 +20,7 @@
<xacro:if value="${include_ros2_control}">
<xacro:robotiq_gripper_ros2_control
name="${name}" prefix="${prefix}"
sim_ignition="${sim_ignition}"
sim_gazebo="${sim_gazebo}"
sim_isaac="${sim_isaac}"
isaac_joint_commands="${isaac_joint_commands}"
isaac_joint_states="${isaac_joint_states}"
Expand Down
4 changes: 2 additions & 2 deletions robotiq_description/urdf/robotiq_2f_85_macro.urdf.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
prefix
parent
*origin
sim_ignition:=false
sim_gazebo:=false
sim_isaac:=false
isaac_joint_commands:=/isaac_joint_commands
isaac_joint_states:=/isaac_joint_states
Expand All @@ -20,7 +20,7 @@
<xacro:if value="${include_ros2_control}">
<xacro:robotiq_gripper_ros2_control
name="${name}" prefix="${prefix}"
sim_ignition="${sim_ignition}"
sim_gazebo="${sim_gazebo}"
sim_isaac="${sim_isaac}"
isaac_joint_commands="${isaac_joint_commands}"
isaac_joint_states="${isaac_joint_states}"
Expand Down

0 comments on commit 84248b6

Please sign in to comment.