-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix mock_hardware and enable simulating gen3_lite (#196)
* Add additional guards if user sets use_fake_hardware and use_internal_bus_gripper_comm true
- Loading branch information
Showing
11 changed files
with
194 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
kortex_description/arms/gen3_lite/6dof/config/ros2_controllers.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
controller_manager: | ||
ros__parameters: | ||
update_rate: 1000 # Hz | ||
|
||
joint_state_broadcaster: | ||
type: joint_state_broadcaster/JointStateBroadcaster | ||
|
||
joint_trajectory_controller: | ||
type: joint_trajectory_controller/JointTrajectoryController | ||
|
||
twist_controller: | ||
type: picknik_twist_controller/PicknikTwistController | ||
|
||
robotiq_gripper_controller: | ||
type: position_controllers/GripperActionController | ||
|
||
fault_controller: | ||
type: picknik_reset_fault_controller/PicknikResetFaultController | ||
|
||
joint_trajectory_controller: | ||
ros__parameters: | ||
joints: | ||
- joint_1 | ||
- joint_2 | ||
- joint_3 | ||
- joint_4 | ||
- joint_5 | ||
- joint_6 | ||
command_interfaces: | ||
- position | ||
state_interfaces: | ||
- position | ||
- velocity | ||
state_publish_rate: 100.0 | ||
action_monitor_rate: 20.0 | ||
allow_partial_joints_goal: false | ||
constraints: | ||
stopped_velocity_tolerance: 0.0 | ||
goal_time: 0.0 | ||
|
||
twist_controller: | ||
ros__parameters: | ||
joint: tcp | ||
interface_names: | ||
- twist.linear.x | ||
- twist.linear.y | ||
- twist.linear.z | ||
- twist.angular.x | ||
- twist.angular.y | ||
- twist.angular.z | ||
|
||
robotiq_gripper_controller: | ||
ros__parameters: | ||
default: true | ||
joint: right_finger_bottom_joint | ||
allow_stalling: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
74 changes: 74 additions & 0 deletions
74
kortex_description/grippers/gen3_lite_2f/urdf/gen3_lite_2f.ros2_control.xacro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
<?xml version="1.0"?> | ||
<robot xmlns:xacro="http://www.ros.org/wiki/xacro"> | ||
|
||
<xacro:macro name="gripper_ros2_control" params=" | ||
prefix | ||
use_fake_hardware:=false | ||
fake_sensor_commands:=false | ||
sim_ignition:=false | ||
sim_isaac:=false | ||
isaac_joint_commands:=/isaac_joint_commands | ||
isaac_joint_states:=/isaac_joint_states | ||
use_internal_bus_gripper_comm:=false"> | ||
|
||
<ros2_control name="GripperHardwareInterface" type="system"> | ||
<hardware> | ||
<xacro:if value="${sim_isaac}"> | ||
<plugin>topic_based_ros2_control/TopicBasedSystem</plugin> | ||
<param name="joint_commands_topic">${isaac_joint_commands}</param> | ||
<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}"> | ||
<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> | ||
</hardware> | ||
|
||
<!-- Joint interfaces --> | ||
<!-- With Ignition or Hardware, they handle mimic joints, so we only need this command interface activated --> | ||
<joint name="${prefix}right_finger_bottom_joint"> | ||
<command_interface name="position" /> | ||
<state_interface name="position"> | ||
<param name="initial_value">0.85</param> | ||
</state_interface> | ||
<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}"> | ||
<joint name="${prefix}right_finger_tip_joint"> | ||
<param name="mimic">${prefix}right_finger_bottom_joint</param> | ||
<param name="multiplier">-1</param> | ||
<xacro:unless value="${sim_ignition}"> | ||
<command_interface name="position"/> | ||
<state_interface name="position"/> | ||
<state_interface name="velocity"/> | ||
</xacro:unless> | ||
</joint> | ||
<joint name="${prefix}left_finger_bottom_joint"> | ||
<param name="mimic">${prefix}right_finger_bottom_joint</param> | ||
<param name="multiplier">1</param> | ||
<xacro:unless value="${sim_ignition}"> | ||
<command_interface name="position"/> | ||
<state_interface name="position"/> | ||
<state_interface name="velocity"/> | ||
</xacro:unless> | ||
</joint> | ||
<joint name="${prefix}left_finger_tip_joint"> | ||
<param name="mimic">${prefix}right_finger_bottom_joint</param> | ||
<param name="multiplier">-1</param> | ||
<xacro:unless value="${sim_ignition}"> | ||
<command_interface name="position"/> | ||
<state_interface name="position"/> | ||
<state_interface name="velocity"/> | ||
</xacro:unless> | ||
</joint> | ||
</xacro:if> | ||
</ros2_control> | ||
</xacro:macro> | ||
|
||
</robot> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters