Skip to content

Commit

Permalink
[ur_description] add robot_model parameter to ur.xacro and use that
Browse files Browse the repository at this point in the history
by using the main ur.xacro file we revert bypassing the macro specialization
as introduced in 9d02cca.
  • Loading branch information
fmauch committed Oct 12, 2021
1 parent 9d02cca commit 446e962
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion ur_description/launch/load_ur.launch
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
include the ur_macro.xacro file into it. Then write a new .launch file
to load it onto the parameter server.
-->
<param name="robot_description" command="$(find xacro)/xacro '$(find ur_description)/urdf/$(arg robot_model).xacro'
<param name="robot_description" command="$(find xacro)/xacro '$(find ur_description)/urdf/ur.xacro'
robot_model:=$(arg robot_model)
joint_limit_params:=$(arg joint_limit_params)
kinematics_params:=$(arg kinematics_params)
physical_params:=$(arg physical_params)
Expand Down
3 changes: 2 additions & 1 deletion ur_description/urdf/ur.xacro
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?xml version="1.0"?>
<robot xmlns:xacro="http://wiki.ros.org/xacro" name="ur">
<robot xmlns:xacro="http://wiki.ros.org/xacro" name="$(arg robot_model)">
<xacro:arg name="robot_model" default="ur"/>

This comment has been minimized.

Copy link
@danielcranston

danielcranston Feb 22, 2022

I don't think this line is needed. $(arg model) on line 2 is unaffected by this line (the invoker of this file has to specify it), and AFAIK no statements below make use of this xacro:arg


<!-- import main macro -->
<xacro:include filename="$(find ur_description)/urdf/inc/ur_macro.xacro"/>
Expand Down

0 comments on commit 446e962

Please sign in to comment.