Skip to content

Commit

Permalink
Cleanup example 12 (#481) (#483)
Browse files Browse the repository at this point in the history
(cherry picked from commit 1f4529d)

Co-authored-by: Christoph Fröhlich <christophfroehlich@users.noreply.github.com>
  • Loading branch information
mergify[bot] and christophfroehlich authored Mar 28, 2024
1 parent 33010c0 commit 1e8c7db
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 56 deletions.
2 changes: 1 addition & 1 deletion example_12/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ install(
DESTINATION include/ros2_control_demo_example_12
)
install(
DIRECTORY description/launch description/ros2_control description/urdf description/gazebo
DIRECTORY description/launch description/ros2_control description/urdf
DESTINATION share/ros2_control_demo_example_12
)
install(
Expand Down
38 changes: 0 additions & 38 deletions example_12/description/gazebo/rrbot.gazebo.xacro

This file was deleted.

7 changes: 1 addition & 6 deletions example_12/description/ros2_control/rrbot.ros2_control.xacro
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
<?xml version="1.0"?>
<robot xmlns:xacro="http://www.ros.org/wiki/xacro">

<xacro:macro name="rrbot_ros2_control" params="name prefix use_gazebo_classic:=^|false">
<xacro:macro name="rrbot_ros2_control" params="name prefix">

<ros2_control name="${name}" type="system">
<hardware>
<xacro:if value="${use_gazebo_classic}">
<plugin>gazebo_ros2_control/GazeboSystem</plugin>
</xacro:if>
<xacro:unless value="${use_gazebo_classic}">
<plugin>ros2_control_demo_example_12/RRBotSystemPositionOnlyHardware</plugin>
<param name="example_param_hw_start_duration_sec">0</param>
<param name="example_param_hw_stop_duration_sec">3.0</param>
<param name="example_param_hw_slowdown">100</param>
</xacro:unless>
</hardware>

<joint name="${prefix}joint1">
Expand Down
9 changes: 1 addition & 8 deletions example_12/description/urdf/rrbot.urdf.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ https://github.com/ros-simulation/gazebo_ros_demos/blob/kinetic-devel/rrbot_desc
-->
<robot xmlns:xacro="http://www.ros.org/wiki/xacro" name="2dof_robot">
<xacro:arg name="prefix" default="" />
<xacro:arg name="use_gazebo_classic" default="false" />

<!-- Import RRBot macro -->
<xacro:include filename="$(find ros2_control_demo_description)/rrbot/urdf/rrbot_description.urdf.xacro" />
Expand All @@ -25,11 +24,5 @@ https://github.com/ros-simulation/gazebo_ros_demos/blob/kinetic-devel/rrbot_desc
</xacro:rrbot>

<xacro:rrbot_ros2_control
name="RRBot" prefix="$(arg prefix)" use_gazebo_classic="$(arg use_gazebo_classic)"/>

<xacro:if value="$(arg use_gazebo_classic)">
<!-- Import Gazebo Classic definitions + plugin -->
<xacro:include filename="$(find ros2_control_demo_example_12)/gazebo/rrbot.gazebo.xacro" />
<xacro:rrbot_gazebo prefix="$(arg prefix)"/>
</xacro:if>
name="RRBot" prefix="$(arg prefix)"/>
</robot>
4 changes: 1 addition & 3 deletions example_12/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<maintainer email="christoph.froehlich@ait.ac.at">Christoph Froehlich</maintainer>

<author email="denis.stogl@stoglrobotics.de">Dr.-Ing. Denis Štogl</author>
<author email="christoph.froehlich@ait.ac.at">Christoph Froehlich</author>
<author email="sai.kishor@pal-robotics.com">Sai Kishor Kothakota</author>

<license>Apache-2.0</license>

Expand All @@ -23,8 +23,6 @@

<exec_depend>controller_manager</exec_depend>
<exec_depend>forward_command_controller</exec_depend>
<exec_depend>gazebo_ros</exec_depend>
<exec_depend>gazebo_ros2_control</exec_depend>
<exec_depend>joint_state_broadcaster</exec_depend>
<exec_depend>joint_state_publisher_gui</exec_depend>
<exec_depend>joint_trajectory_controller</exec_depend>
Expand Down

0 comments on commit 1e8c7db

Please sign in to comment.