Skip to content
This repository has been archived by the owner on Dec 13, 2024. It is now read-only.

Commit

Permalink
use yaml substitution instead of xacro logic
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Gesel <[email protected]>
  • Loading branch information
pac48 committed Feb 23, 2024
1 parent 7f244a3 commit 5d49116
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 17 deletions.
17 changes: 3 additions & 14 deletions src/picknik_ur_base_config/description/picknik_ur_macro.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,6 @@
<xacro:property name="initial_positions_file" default="$(arg initial_positions_file)"/>
<xacro:property name="simulation" default="$(arg simulation)"/>
<xacro:property name="visual_parameters_file" default="$(arg visual_parameters_file)"/>
<xacro:if value="${not visual_parameters_file == ''}">
<xacro:property name="visual_parameters_file_full_path" default="$(arg visual_parameters_file)/$(arg name)/visual_parameters.yaml"/>
</xacro:if>
<xacro:property name="physical_parameters_file" default="$(arg physical_parameters_file)"/>
<xacro:if value="${not physical_parameters_file == ''}">
<xacro:property name="physical_parameters_file_full_path" default="$(arg physical_parameters_file)/$(arg name)/physical_parameters.yaml"/>
</xacro:if>
<xacro:property name="kinematics_parameters_file" default="$(arg kinematics_parameters_file)"/>
<xacro:if value="${not kinematics_parameters_file == ''}">
<xacro:property name="kinematics_parameters_file_full_path" default="$(arg kinematics_parameters_file)/$(arg name)/default_kinematics.yaml"/>
</xacro:if>
<xacro:if value="${simulation == 'gazebo'}">
<xacro:property name="use_fake_hardware" default="false"/>
</xacro:if>
Expand All @@ -61,9 +50,9 @@
tf_prefix=""
parent="${parent}"
joint_limits_parameters_file="$(arg joint_limits_parameters_file)"
kinematics_parameters_file="${kinematics_parameters_file_full_path}"
physical_parameters_file="${physical_parameters_file_full_path}"
visual_parameters_file="${visual_parameters_file_full_path}"
kinematics_parameters_file="$(arg kinematics_parameters_file)"
physical_parameters_file="$(arg physical_parameters_file)"
visual_parameters_file="$(arg visual_parameters_file)"
use_fake_hardware="${use_fake_hardware}"
initial_positions="${xacro.load_yaml(initial_positions_file)}"
sim_ignition="${simulation == 'gazebo'}"
Expand Down
9 changes: 6 additions & 3 deletions src/picknik_ur_gazebo_config/config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,17 @@ hardware:
# ogre2 (which is the Gazebo default) is also an option if your system supports it.
- gazebo_renderer: ${GAZEBO_RENDERER:-ogre}
- kinematics_parameters_file:
# Load default_kinematics.yaml from ur_description/config/<ur_type>
package: "ur_description"
path: "config"
path: "config/%>> hardware.type <<%/default_kinematics.yaml"
- physical_parameters_file:
# Load physical_parameters.yaml from ur_description/config/<ur_type>
package: "ur_description"
path: "config"
path: "config/%>> hardware.type <<%/physical_parameters.yaml"
- visual_parameters_file:
# Load visual_parameters.yaml from ur_description/config/<ur_type>
package: "ur_description"
path: "config"
path: "config/%>> hardware.type <<%/visual_parameters.yaml"
# Override MoveIt parameters
moveit_params:
Expand Down

0 comments on commit 5d49116

Please sign in to comment.