Skip to content

Commit fc3444a

Browse files
authored
Add tool voltage and zero ft sensor to command interface (UniversalRobots#38)
Added reverse ip and script command interface port as parameters
1 parent 6a5b5e5 commit fc3444a

File tree

3 files changed

+21
-2
lines changed

3 files changed

+21
-2
lines changed

urdf/ur.ros2_control.xacro

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616
tool_voltage:=24 tool_parity:=0 tool_baud_rate:=115200 tool_stop_bits:=1
1717
tool_rx_idle_chars:=1.5 tool_tx_idle_chars:=3.5 tool_device_name:=/tmp/ttyUR tool_tcp_port:=54321
1818
reverse_port:=50001
19-
script_sender_port:=50002">
19+
script_sender_port:=50002
20+
reverse_ip:=0.0.0.0
21+
script_command_port:=50004">
2022

2123
<ros2_control name="${name}" type="system">
2224
<hardware>
@@ -40,6 +42,8 @@
4042
<param name="headless_mode">${headless_mode}</param>
4143
<param name="reverse_port">${reverse_port}</param>
4244
<param name="script_sender_port">${script_sender_port}</param>
45+
<param name="reverse_ip">${reverse_ip}</param>
46+
<param name="script_command_port">${script_command_port}</param>
4347
<param name="tf_prefix">"${tf_prefix}"</param>
4448
<param name="non_blocking_read">0</param>
4549
<param name="servoj_gain">2000</param>
@@ -194,6 +198,8 @@
194198
<command_interface name="standard_analog_output_cmd_0"/>
195199
<command_interface name="standard_analog_output_cmd_1"/>
196200

201+
<command_interface name="tool_voltage_cmd"/>
202+
197203
<command_interface name="io_async_success"/>
198204

199205
<state_interface name="digital_output_0"/>
@@ -291,6 +297,11 @@
291297
<command_interface name="resend_robot_program_async_success"/>
292298
</gpio>
293299

300+
<gpio name="zero_ftsensor">
301+
<command_interface name="zero_ftsensor_cmd"/>
302+
<command_interface name="zero_ftsensor_async_success"/>
303+
</gpio>
304+
294305
<gpio name="system_interface">
295306
<state_interface name="initialized"/>
296307
</gpio>

urdf/ur.urdf.xacro

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
<xacro:arg name="script_filename" default=""/>
2626
<xacro:arg name="output_recipe_filename" default=""/>
2727
<xacro:arg name="input_recipe_filename" default=""/>
28+
<xacro:arg name="reverse_ip" default="0.0.0.0"/>
29+
<xacro:arg name="script_command_port" default="50004"/>
2830
<!-- tool communication related parameters-->
2931
<xacro:arg name="use_tool_communication" default="false" />
3032
<xacro:arg name="tool_voltage" default="24" />
@@ -84,6 +86,8 @@
8486
script_filename="$(arg script_filename)"
8587
output_recipe_filename="$(arg output_recipe_filename)"
8688
input_recipe_filename="$(arg input_recipe_filename)"
89+
reverse_ip="$(arg reverse_ip)"
90+
script_command_port="$(arg script_command_port)"
8791
>
8892
<origin xyz="0 0 0" rpy="0 0 0" /> <!-- position robot in the world -->
8993
</xacro:ur_robot>

urdf/ur_macro.xacro

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,9 @@
8686
output_recipe_filename:=to_be_filled_by_ur_robot_driver
8787
input_recipe_filename:=to_be_filled_by_ur_robot_driver
8888
reverse_port:=50001
89-
script_sender_port:=50002">
89+
script_sender_port:=50002
90+
reverse_ip:=0.0.0.0
91+
script_command_port:=50004">
9092

9193
<!-- Load configuration data from the provided .yaml files -->
9294
<xacro:read_model_data
@@ -125,6 +127,8 @@
125127
tool_tcp_port="${tool_tcp_port}"
126128
reverse_port="${reverse_port}"
127129
script_sender_port="${script_sender_port}"
130+
reverse_ip="${reverse_ip}"
131+
script_command_port="${script_command_port}"
128132
/>
129133

130134
<!-- Add URDF transmission elements (for ros_control) -->

0 commit comments

Comments
 (0)