Skip to content

Commit 801a2b4

Browse files
committed
Parameters to xacro macro.
1 parent 6cdccfc commit 801a2b4

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

urdf/ur.urdf.xacro

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<xacro:arg name="use_fake_hardware" default="false" />
2020
<xacro:arg name="fake_sensor_commands" default="false" />
2121
<xacro:arg name="headless_mode" default="false" />
22-
<!-- tool communication related parameters-->
22+
<!-- tool communication related parameters-->
2323
<xacro:arg name="use_tool_communication" default="false" />
2424
<xacro:arg name="tool_voltage" default="24" />
2525
<xacro:arg name="tool_parity" default="0" />
@@ -56,7 +56,15 @@
5656
fake_sensor_commands="$(arg fake_sensor_commands)"
5757
headless_mode="$(arg headless_mode)"
5858
initial_positions="${load_yaml(initial_positions_file)}"
59-
use_tool_communication="$(arg use_tool_communication)" >
59+
use_tool_communication="$(arg use_tool_communication)"
60+
tool_voltage="$(arg tool_voltage)"
61+
tool_parity="$(arg tool_parity)"
62+
tool_baud_rate="$(arg tool_baud_rate)"
63+
tool_stop_bits="$(arg tool_stop_bits)"
64+
tool_rx_idle_chars="$(arg tool_rx_idle_chars)"
65+
tool_tx_idle_chars="$(arg tool_tx_idle_chars)"
66+
tool_device_name="$(arg tool_device_name)"
67+
tool_tcp_port="$(arg tool_tcp_port)" >
6068
<origin xyz="0 0 0" rpy="0 0 0" /> <!-- position robot in the world -->
6169
</xacro:ur_robot>
6270

urdf/ur_macro.xacro

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,15 @@
109109
tf_prefix=""
110110
hash_kinematics="${kinematics_hash}"
111111
robot_ip="$(arg robot_ip)"
112-
use_tool_communication="${use_tool_communication}"/>
112+
use_tool_communication="${use_tool_communication}"
113+
tool_voltage="${tool_voltage}"
114+
tool_parity="${tool_parity}"
115+
tool_baud_rate="${tool_baud_rate}"
116+
tool_stop_bits="${tool_stop_bits}"
117+
tool_rx_idle_chars="${tool_rx_idle_chars}"
118+
tool_tx_idle_chars="${tool_tx_idle_chars}"
119+
tool_device_name="${tool_device_name}"
120+
tool_tcp_port="${tool_tcp_port}"/>
113121

114122
<!-- Add URDF transmission elements (for ros_control) -->
115123
<!--<xacro:ur_arm_transmission prefix="${prefix}" hw_interface="${transmission_hw_interface}" />-->

0 commit comments

Comments
 (0)