Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions urdf/ur.urdf.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@

<!-- Simulation parameters -->
<xacro:arg name="use_fake_hardware" default="false" />
<xacro:arg name="use_custom_simulator" default="false" />
<xacro:arg name="fake_sensor_commands" default="false" />
<xacro:arg name="sim_gazebo" default="false" />
<xacro:arg name="sim_ignition" default="false" />
Expand Down Expand Up @@ -66,6 +67,7 @@
safety_pos_margin="$(arg safety_pos_margin)"
safety_k_position="$(arg safety_k_position)"
use_fake_hardware="$(arg use_fake_hardware)"
use_custom_simulator="$(arg use_custom_simulator)"
fake_sensor_commands="$(arg fake_sensor_commands)"
sim_gazebo="$(arg sim_gazebo)"
sim_ignition="$(arg sim_ignition)"
Expand Down
64 changes: 35 additions & 29 deletions urdf/ur_macro.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
safety_pos_margin:=0.15
safety_k_position:=20
use_fake_hardware:=false
use_custom_simulator:=false
fake_sensor_commands:=false
sim_gazebo:=false
sim_ignition:=false
Expand Down Expand Up @@ -97,35 +98,40 @@
force_abs_paths="${sim_gazebo or sim_ignition}"/>


<!-- ros2 control include -->
<xacro:include filename="$(find ur_description)/urdf/ur.ros2_control.xacro" />
<!-- ros2 control instance -->
<xacro:ur_ros2_control
name="${name}" prefix="${prefix}"
use_fake_hardware="${use_fake_hardware}"
initial_positions="${initial_positions}"
fake_sensor_commands="${fake_sensor_commands}"
headless_mode="${headless_mode}"
sim_gazebo="${sim_gazebo}"
sim_ignition="${sim_ignition}"
script_filename="${script_filename}"
output_recipe_filename="${output_recipe_filename}"
input_recipe_filename="${input_recipe_filename}"
tf_prefix=""
hash_kinematics="${kinematics_hash}"
robot_ip="${robot_ip}"
use_tool_communication="${use_tool_communication}"
tool_voltage="${tool_voltage}"
tool_parity="${tool_parity}"
tool_baud_rate="${tool_baud_rate}"
tool_stop_bits="${tool_stop_bits}"
tool_rx_idle_chars="${tool_rx_idle_chars}"
tool_tx_idle_chars="${tool_tx_idle_chars}"
tool_device_name="${tool_device_name}"
tool_tcp_port="${tool_tcp_port}"
reverse_port="${reverse_port}"
script_sender_port="${script_sender_port}"
/>
<!-- Support custom simulators.
Users can specify their ros2_control and hardware tags inside their own robot description.
This allows them to implement their own system_interface. -->
<xacro:unless value="${use_custom_simulator}">
<!-- ros2 control include -->
<xacro:include filename="$(find ur_description)/urdf/ur.ros2_control.xacro" />
<!-- ros2 control instance -->
<xacro:ur_ros2_control
name="${name}" prefix="${prefix}"
use_fake_hardware="${use_fake_hardware}"
initial_positions="${initial_positions}"
fake_sensor_commands="${fake_sensor_commands}"
headless_mode="${headless_mode}"
sim_gazebo="${sim_gazebo}"
sim_ignition="${sim_ignition}"
script_filename="${script_filename}"
output_recipe_filename="${output_recipe_filename}"
input_recipe_filename="${input_recipe_filename}"
tf_prefix=""
hash_kinematics="${kinematics_hash}"
robot_ip="${robot_ip}"
use_tool_communication="${use_tool_communication}"
tool_voltage="${tool_voltage}"
tool_parity="${tool_parity}"
tool_baud_rate="${tool_baud_rate}"
tool_stop_bits="${tool_stop_bits}"
tool_rx_idle_chars="${tool_rx_idle_chars}"
tool_tx_idle_chars="${tool_tx_idle_chars}"
tool_device_name="${tool_device_name}"
tool_tcp_port="${tool_tcp_port}"
reverse_port="${reverse_port}"
script_sender_port="${script_sender_port}"
/>
</xacro:unless>

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