Skip to content

Commit f997f2b

Browse files
livanov93Felix Exner
authored andcommitted
Parameters to xacro macro.
1 parent e484f6d commit f997f2b

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
@@ -17,7 +17,7 @@
1717
<xacro:arg name="safety_k_position" default="20"/>
1818
<!-- ros2_control related parameters -->
1919
<xacro:arg name="headless_mode" default="false" />
20-
<!-- tool communication related parameters-->
20+
<!-- tool communication related parameters-->
2121
<xacro:arg name="use_tool_communication" default="false" />
2222
<xacro:arg name="tool_voltage" default="24" />
2323
<xacro:arg name="tool_parity" default="0" />
@@ -63,7 +63,15 @@
6363
sim_ignition="$(arg sim_ignition)"
6464
headless_mode="$(arg headless_mode)"
6565
initial_positions="${load_yaml(initial_positions_file)}"
66-
use_tool_communication="$(arg use_tool_communication)" >
66+
use_tool_communication="$(arg use_tool_communication)"
67+
tool_voltage="$(arg tool_voltage)"
68+
tool_parity="$(arg tool_parity)"
69+
tool_baud_rate="$(arg tool_baud_rate)"
70+
tool_stop_bits="$(arg tool_stop_bits)"
71+
tool_rx_idle_chars="$(arg tool_rx_idle_chars)"
72+
tool_tx_idle_chars="$(arg tool_tx_idle_chars)"
73+
tool_device_name="$(arg tool_device_name)"
74+
tool_tcp_port="$(arg tool_tcp_port)" >
6775
<origin xyz="0 0 0" rpy="0 0 0" /> <!-- position robot in the world -->
6876
</xacro:ur_robot>
6977

urdf/ur_macro.xacro

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,15 @@
113113
tf_prefix=""
114114
hash_kinematics="${kinematics_hash}"
115115
robot_ip="$(arg robot_ip)"
116-
use_tool_communication="${use_tool_communication}"/>
116+
use_tool_communication="${use_tool_communication}"
117+
tool_voltage="${tool_voltage}"
118+
tool_parity="${tool_parity}"
119+
tool_baud_rate="${tool_baud_rate}"
120+
tool_stop_bits="${tool_stop_bits}"
121+
tool_rx_idle_chars="${tool_rx_idle_chars}"
122+
tool_tx_idle_chars="${tool_tx_idle_chars}"
123+
tool_device_name="${tool_device_name}"
124+
tool_tcp_port="${tool_tcp_port}"/>
117125

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

0 commit comments

Comments
 (0)