Skip to content

Commit

Permalink
Update URDF templates for better simulator support. (StoglRobotics#94)
Browse files Browse the repository at this point in the history
  • Loading branch information
destogl authored Jan 11, 2023
1 parent e8ad919 commit fd2924c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
3 changes: 2 additions & 1 deletion templates/robot_description/robot.urdf.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
use_mock_hardware="$(arg use_mock_hardware)"
mock_sensor_commands="$(arg mock_sensor_commands)"
sim_gazebo_classic="$(arg sim_gazebo_classic)"
sim_gazebo="$(arg sim_gazebo)"/>
sim_gazebo="$(arg sim_gazebo)"
simulation_controllers:="$(arg simulation_controllers)" />

</robot>
9 changes: 5 additions & 4 deletions templates/robot_description/robot_macro.ros2_control.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
use_mock_hardware:=^|false
mock_sensor_commands:=^|false
sim_gazebo_classic:=^|false
sim_gazebo:=^|false"
sim_gazebo:=^|false
simulation_controllers"
>

<ros2_control name="${name}" type="system">
Expand Down Expand Up @@ -121,7 +122,7 @@
</gazebo>
<gazebo>
<plugin filename="libgazebo_ros2_control.so" name="gazebo_ros2_control">
<parameters>$(arg simulation_controllers)</parameters>
<parameters>${simulation_controllers}</parameters>
</plugin>
</gazebo>
</xacro:if>
Expand All @@ -132,8 +133,8 @@
</gazebo>
<gazebo>
<plugin filename="libign_ros2_control-system.so" name="ign_ros2_control::IgnitionROS2ControlPlugin">
<parameters>$(arg simulation_controllers)</parameters>
<controller_manager_node_name>$(arg prefix)controller_manager</controller_manager_node_name>
<parameters>${simulation_controllers}</parameters>
<controller_manager_node_name>${prefix}controller_manager</controller_manager_node_name>
</plugin>
</gazebo>
</xacro:if>
Expand Down

0 comments on commit fd2924c

Please sign in to comment.