Skip to content

Commit 186ef41

Browse files
author
Dan Zimmerman
committed
Better (and correct) non-joint interface handling
1 parent 247aaf3 commit 186ef41

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

urdf/ur.ros2_control.xacro

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<xacro:macro name="ur_ros2_control" params="
55
name
66
prefix
7-
add_state_and_command_interfaces
7+
add_non_joint_interfaces:=true
88
initial_positions:=${dict(shoulder_pan_joint=0.0,shoulder_lift_joint=-1.57,elbow_joint=0.0,wrist_1_joint=-1.57,wrist_2_joint=0.0,wrist_3_joint=0.0)}
99
transmission_hw_interface:=hardware_interface/PositionJointInterface
1010
**hardware_system
@@ -114,7 +114,7 @@
114114
<state_interface name="effort"/>
115115
</joint>
116116

117-
<xacro:unless value="${add_state_and_command_interfaces}">
117+
<xacro:if value="${add_non_joint_interfaces}">
118118
<sensor name="tcp_fts_sensor">
119119
<state_interface name="force.x"/>
120120
<state_interface name="force.y"/>
@@ -263,7 +263,7 @@
263263
<state_interface name="initialized"/>
264264
</gpio>
265265

266-
</xacro:unless>
266+
</xacro:if>
267267

268268
</ros2_control>
269269

urdf/ur.urdf.xacro

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
<!-- ur_robot_driver would construct the complicated block with all the real hardware parameters -->
8383
<xacro:ur_ros2_control
8484
name="$(arg name)" prefix="$(arg prefix)"
85-
add_state_and_command_interfaces="true"
85+
add_non_joint_interfaces="true"
8686
initial_positions="${xacro.load_yaml(initial_positions_file)}"
8787
>
8888
<hardware_system>

0 commit comments

Comments
 (0)