Port to Lyrical. lyrical
authorWalter Fetter Lages <w.fetter@ieee.org>
Thu, 12 Nov 2026 19:24:50 +0000 (16:24 -0300)
committerWalter Fetter Lages <w.fetter@ieee.org>
Thu, 12 Nov 2026 19:24:50 +0000 (16:24 -0300)
CMakeLists.txt
config/controller_manager.yaml
config/ros_gz_bridge.yaml [new file with mode: 0644]
env-hooks/plier_description.dsv.in [deleted file]
launch/display.launch.xml
launch/gazebo.launch.xml
launch/ignition.launch.xml [deleted file]
launch/plier.launch.xml
package.xml
urdf/plier.urdf

index cd37b91..9e18f4f 100644 (file)
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 3.8)
+cmake_minimum_required(VERSION 3.20)
 project(plier_description)
 
 if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
@@ -15,8 +15,6 @@ install(DIRECTORY config launch meshes urdf
        DESTINATION share/${PROJECT_NAME}
 )
 
-ament_environment_hooks("${CMAKE_CURRENT_SOURCE_DIR}/env-hooks/${PROJECT_NAME}.dsv.in")
-
 if(BUILD_TESTING)
   find_package(ament_lint_auto REQUIRED)
   # the following line skips the linter which checks for copyrights
index c12730f..79efc7d 100644 (file)
@@ -1,4 +1,5 @@
 controller_manager:
         ros__parameters:
                 update_rate: 1000
+                enforce_command_limits: false
                 use_sim_time: true
diff --git a/config/ros_gz_bridge.yaml b/config/ros_gz_bridge.yaml
new file mode 100644 (file)
index 0000000..33167fe
--- /dev/null
@@ -0,0 +1,10 @@
+- ros_topic_name: "/clock"
+  gz_topic_name: "/clock"
+  ros_type_name: "rosgraph_msgs/msg/Clock"
+  gz_type_name: "gz.msgs.Clock"
+#  subscriber_queue: 5       # Default 10
+#  publisher_queue: 6        # Default 10
+#  lazy: true                # Default "false"
+  direction: GZ_TO_ROS      # Default "BIDIRECTIONAL" - Bridge both directions
+                            # "GZ_TO_ROS" - Bridge Ignition topic to ROS
+                            # "ROS_TO_GZ" - Bridge ROS topic to Ignition
diff --git a/env-hooks/plier_description.dsv.in b/env-hooks/plier_description.dsv.in
deleted file mode 100644 (file)
index 30a6001..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-prepend-non-duplicate;IGN_GAZEBO_RESOURCE_PATH;share
-
-set-if-unset;MESA_GL_VERSION_OVERRIDE;3.3
index b6549d5..39d7379 100644 (file)
@@ -22,7 +22,7 @@
 <launch>
        <arg name="gui" default="false"/>
 
-       <node pkg="tf2_ros" exec="static_transform_publisher" name="plier_origin_publisher" args="--frame-id map --frame-child-id plier_origin"/>
+       <node pkg="tf2_ros" exec="static_transform_publisher" name="plier_origin_publisher" args="--frame-id map --child-frame-id plier_origin"/>
        <node if="$(var gui)" name="joint_state_publisher" pkg="joint_state_publisher_gui" exec="joint_state_publisher_gui"/>
        <include file="$(find-pkg-share plier_description)/launch/plier.launch.xml"/>
        <node name="rviz" pkg="rviz2" exec="rviz2" args="-d $(find-pkg-share plier_description)/config/display.rviz"/>
index 7ecdb3c..067dd12 100644 (file)
@@ -1,7 +1,7 @@
 <!--******************************************************************************
                             Plier Description
-                            Gazebo Launch File
-          Copyright (C) 2014, 2021 Walter Fetter Lages <w.fetter@ieee.org>
+                         Gazebo Ignitio Launch File
+          Copyright (C) 2023 Walter Fetter Lages <w.fetter@ieee.org>
 
         This program is free software: you can redistribute it and/or modify
         it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
         You should have received a copy of the GNU General Public License
         along with this program.  If not, see
         <http://www.gnu.org/licenses/>.
-        
+
 *******************************************************************************-->
 
 <launch>
        <arg name="gui" default="true"/>
        <arg name="use_sim_time" default="true"/>
 
-       <include file="$(find-pkg-share gazebo_ros)/launch/gazebo.launch.py">
-               <arg name="pause" value="$(var pause)"/>
-               <arg name="gui" value="$(var gui)"/>
-               <arg name="use_sim_time" value="$(var use_sim_time)"/>
-               <arg name="world" value="worlds/empty_sky.world" />
-       </include>
+       <arg unless="$(var pause)" name="gz_pause" default="-r"/>
+       <arg if="$(var pause)" name="gz_pause" default=""/>
+       
+       <arg unless="$(var gui)" name="gz_gui" default="-s"/>
+       <arg if="$(var gui)" name="gz_gui" default=""/>
 
+       <include file="$(find-pkg-share ros_gz_sim)/launch/gz_sim.launch.py">
+               <arg name="gz_args" value="$(var gz_pause) $(var gz_gui) empty.sdf"/>
+       </include>
+       
        <include file="$(find-pkg-share plier_description)/launch/plier.launch.xml">
                <arg name="use_sim_time" value="$(var use_sim_time)"/>
-               <arg name="extra_gazebo_args" value="--ros-args --params-file $(find-pkg-share plier_description)/config/gazebo.yaml"/>
        </include>
 
-       <node name="plier_spawner" pkg="gazebo_ros" exec="spawn_entity.py" args="-topic robot_description -entity plier" />
+       <node name="plier_spawner" pkg="ros_gz_sim" exec="create" args="-topic robot_description -name plier"/>
+
+       <node name="roz_gz_bridge" pkg="ros_gz_bridge" exec="parameter_bridge">
+               <param name="config_file" value="$(find-pkg-share plier_description)/config/ros_gz_bridge.yaml"/>>
+               <param name="use_sim_time" value="$(var use_sim_time)"/>
+       </node>
 </launch>
diff --git a/launch/ignition.launch.xml b/launch/ignition.launch.xml
deleted file mode 100644 (file)
index ea7cee3..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-<!--******************************************************************************
-                            Plier Description
-                         Gazebo Ignitio Launch File
-          Copyright (C) 2023 Walter Fetter Lages <w.fetter@ieee.org>
-
-        This program is free software: you can redistribute it and/or modify
-        it under the terms of the GNU General Public License as published by
-        the Free Software Foundation, either version 3 of the License, or
-        (at your option) any later version.
-
-        This program is distributed in the hope that it will be useful, but
-        WITHOUT ANY WARRANTY; without even the implied warranty of
-        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-        Geneal Public License for more details.
-
-        You should have received a copy of the GNU General Public License
-        along with this program.  If not, see
-        <http://www.gnu.org/licenses/>.
-
-*******************************************************************************-->
-
-<launch>
-       <arg name="pause" default="true"/>
-       <arg name="gui" default="true"/>
-       <arg name="use_sim_time" default="true"/>
-
-       <arg unless="$(var pause)" name="gz_pause" default="-r"/>
-       <arg if="$(var pause)" name="gz_pause" default=""/>
-       
-       <arg unless="$(var gui)" name="gz_gui" default="-s"/>
-       <arg if="$(var gui)" name="gz_gui" default=""/>
-
-       <include file="$(find-pkg-share ros_gz_sim)/launch/gz_sim.launch.py">
-               <arg name="gz_args" value="$(var gz_pause) $(var gz_gui) empty.sdf"/>
-       </include>
-       
-       <include file="$(find-pkg-share plier_description)/launch/plier.launch.xml">
-               <arg name="use_sim_time" value="$(var use_sim_time)"/>
-               <arg name="ignition" value="true"/>
-       </include>
-
-       <node name="plier_spawner" pkg="ros_gz_sim" exec="create" args="-topic robot_description -name plier"/>
-
-       <node name="clock_bridge" pkg="ros_gz_bridge" exec="parameter_bridge" args="/clock@rosgraph_msgs/msg/Clock[ignition.msgs.Clock">
-               <param name="use_sim_time" value="$(var use_sim_time)"/>
-       </node>
-</launch>
index eb41296..87f8500 100644 (file)
 
 <launch>
        <arg name="use_sim_time" default="false"/>
-       <arg name="ignition" default="false"/>
 
        <node name="robot_state_publisher" pkg="robot_state_publisher" exec="robot_state_publisher">
-               <param name="robot_description" value="$(command 'xacro $(find-pkg-share plier_description)/urdf/plier.urdf ignition:=$(var ignition)')" type="str"/>
+               <param name="robot_description" value="$(command 'xacro $(find-pkg-share plier_description)/urdf/plier.urdf')" type="str"/>
                <param name="use_sim_time" value="$(var use_sim_time)"/>
        </node>
 </launch>
index 73c2dd4..8098b3a 100644 (file)
@@ -2,7 +2,7 @@
 <?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
 <package format="3">
   <name>plier_description</name>
-  <version>2.1.0</version>
+  <version>2.2.0</version>
   <description>Laparascopic plier description</description>
   <maintainer email="fetter@ece.ufrgs.br">Walter Fetter Lages</maintainer>
   <license>GPL-3.0-only</license>
index 82be6a3..1f9c1e4 100644 (file)
@@ -1,7 +1,5 @@
 <?xml version="1.0"?>
 <robot name="plier" xmlns:xacro="http://www.ros.org/wiki/xacro">
-
-  <xacro:arg name="ignition" default="false"/>
        
   <link name="plier_origin"/>
 
     <material>Gazebo/Grey</material>
   </gazebo>
 
-       <ros2_control name="BhandSystem" type="system">
-               <!-- Gazebo Classic -->
-               <xacro:unless value="$(arg ignition)">
-                       <hardware>
-                               <plugin>gazebo_ros2_control/GazeboSystem</plugin>
-                       </hardware>
-       </xacro:unless>
-       <xacro:if value="$(arg ignition)">
-                <!-- Gazebo Ignition -->
+       <ros2_control name="PlierSystem" type="system">
                <hardware>
-                       <plugin>ign_ros2_control/IgnitionSystem</plugin>
+                       <plugin>gz_ros2_control/GazeboSimSystem</plugin>
                </hardware>
-       </xacro:if>
 
                <joint name="joint">
                        <command_interface name="position">
                <joint name="mimic_joint">
                        <param name="mimic">joint</param>
                        <param name="multiplier">-1.0</param>
-                       <command_interface name="position"/>
                        <state_interface name="position"/>
                </joint>
        </ros2_control>
 
        <gazebo>
-               <xacro:unless value="$(arg ignition)">
-                       <!-- Gazebo Classic -->
-                       <plugin filename="libgazebo_ros2_control.so" name="gazebo_ros2_control">
-                               <robot_param>robot_description</robot_param>
-                               <robot_param_node>robot_state_publisher</robot_param_node>
-                               <parameters>$(find plier_description)/config/controller_manager.yaml</parameters>
-                       </plugin>
-               </xacro:unless>
-               <xacro:if value="$(arg ignition)">
-                       <!-- Gazebo Ignition -->
-                       <plugin filename="libign_ros2_control-system.so" name="ign_ros2_control::IgnitionROS2ControlPlugin">
-                               <robot_param>robot_description</robot_param>
-                               <robot_param_node>robot_state_publisher</robot_param_node>
-                               <parameters>$(find plier_description)/config/controller_manager.yaml</parameters>
-                       </plugin>
-               </xacro:if>
+               <plugin filename="gz_ros2_control-system" name="gz_ros2_control::GazeboSimROS2ControlPlugin">
+                       <parameters>$(find plier_description)/config/controller_manager.yaml</parameters>
+               </plugin>
        </gazebo>
 </robot>