<!--******************************************************************************
Quanser 2DSFJE Description
- Gazebo Launch File
- Copyright (C) 2018, 2021 Walter Fetter Lages <w.fetter@ieee.org>
+ Gazebo Sim Launch File
+ Copyright (C) 2018..2024 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
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" />
- <arg name="extra_gazebo_args" value="--ros-args --params-file $(find-pkg-share q2d_description)/config/gazebo.yaml"/>
+ <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 q2d_description)/launch/q2d.launch.xml">
<arg name="use_sim_time" value="$(var use_sim_time)"/>
+ <arg name="hardware" value="gazebo"/>
</include>
- <node name="q2d_spawner" pkg="gazebo_ros" exec="spawn_entity.py" args="-topic robot_description -entity q2d" />
+ <node name="q2d_spawner" pkg="ros_gz_sim" exec="create" args="-topic robot_description -name q2d"/>
+
+ <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>
+++ /dev/null
-<!--******************************************************************************
- Quanser 2DSFJE Description
- Ignition Gazebo Launch File
- Copyright (C) 2018..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 q2d_description)/launch/q2d.launch.xml">
- <arg name="use_sim_time" value="$(var use_sim_time)"/>
- <arg name="hardware" value="ignition"/>
- </include>
-
- <node name="q2d_spawner" pkg="ros_gz_sim" exec="create" args="-topic robot_description -name q2d"/>
-
- <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>
<!--******************************************************************************
Quanser 2DSFJE Description
Quanser 2DSFJE Launch File
- Copyright (C) 2018..2023 Walter Fetter Lages <w.fetter@ieee.org>
+ Copyright (C) 2018..2024 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
<ros2_control name="Q2dSystem" type="system">
<xacro:if value="${hardware == 'gazebo'}">
- <!-- Gazebo Classic -->
- <hardware>
- <plugin>gazebo_ros2_control/GazeboSystem</plugin>
- </hardware>
- </xacro:if>
- <xacro:if value="${hardware == 'ignition'}">
- <!-- Gazebo Ignition -->
+ <!-- Gazebo Sim-->
<hardware>
<plugin>ign_ros2_control/IgnitionSystem</plugin>
</hardware>
<gazebo>
<xacro:if value="${hardware == 'gazebo'}">
- <!-- 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 q2d_description)/config/controller_manager.yaml</parameters>
- </plugin>
- </xacro:if>
- <xacro:if value="${hardware == 'ignition'}">
<!-- Gazebo Ignition -->
<plugin filename="libign_ros2_control-system.so" name="ign_ros2_control::IgnitionROS2ControlPlugin">
<robot_param>robot_description</robot_param>