--- /dev/null
+<!--******************************************************************************
+ Quanser 2DSFJE Bringup
+ Ignition Gazebo Launch File
+ Copyright (C) 2018, 2022 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 name="controller" default="pid"/>
+ <arg name="config" default="$(find-pkg-share q2d_bringup)/config/$(var controller).yaml"/>
+
+ <include file="$(find-pkg-share q2d_description)/launch/ignition.launch.xml" >
+ <arg name="pause" value="$(var pause)"/>
+ <arg name="gui" value="$(var gui)"/>
+ <arg name="use_sim_time" value="$(var use_sim_time)"/>
+ </include>
+
+ <include file="$(find-pkg-share q2d_bringup)/launch/$(var controller).launch.xml" >
+ <arg name="config" value="$(var config)"/>
+ <arg name="use_sim_time" value="$(var use_sim_time)"/>
+ </include>
+</launch>
ament_lint_auto_find_test_dependencies()
endif()
+ament_environment_hooks("${CMAKE_CURRENT_SOURCE_DIR}/env-hooks/${PROJECT_NAME}.dsv.in")
+
ament_package()
--- /dev/null
+prepend-non-duplicate;IGN_GAZEBO_RESOURCE_PATH;share
+
+set-if-unset;MESA_GL_VERSION_OVERRIDE;3.3
+#******************************************************************************
+# Quanser 2DSFJE Description
+# RViz Launch File
+# Copyright (C) 2018, 2021 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/>.
+#
+#*******************************************************************************
+
import os
from ament_index_python.packages import get_package_share_directory
from launch import LaunchDescription
def generate_launch_description():
- use_gui=LaunchConfiguration('use_gui',default='false')
+ gui=LaunchConfiguration('gui',default='false')
urdf_file_name = 'urdf/q2d.urdf'
urdf_path=os.path.join(get_package_share_directory('q2d_description'),urdf_file_name)
return LaunchDescription([
DeclareLaunchArgument(
- 'use_gui',
+ 'gui',
default_value='false',
description='Use graphical user interface to publish jointstates if true'),
Node(
package='tf2_ros',
executable='static_transform_publisher',
name='q2d_origin_publisher',
- arguments=["0","0","0","0","0","0","1","map","origin_link"]),
+ arguments=["--frame-id", "map","--child-frame-id","origin_link"]),
Node(
package='joint_state_publisher_gui',
executable='joint_state_publisher_gui',
name='joint_state_publisher',
- condition=IfCondition(LaunchConfiguration("use_gui"))),
+ condition=IfCondition(LaunchConfiguration("gui"))),
Node(
package='robot_state_publisher',
executable='robot_state_publisher',
+<!--******************************************************************************
+ Quanser 2DSFJE Description
+ RViz Launch File
+ Copyright (C) 2018, 2021 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="use_gui" default="false"/>
- <node pkg="tf2_ros" exec="static_transform_publisher" name="q2d_origin_publisher" args="0 0 0 0 0 0 1 map origin_link" />
- <node if="$(var use_gui)" name="joint_state_publisher" pkg="joint_state_publisher_gui" exec="joint_state_publisher_gui" />
+ <arg name="gui" default="false"/>
+ <node pkg="tf2_ros" exec="static_transform_publisher" name="q2d_origin_publisher" args="--frame-id map --child-frame-id origin_link"/>
+ <node if="$(var gui)" name="joint_state_publisher" pkg="joint_state_publisher_gui" exec="joint_state_publisher_gui"/>
<include file="$(find-pkg-share q2d_description)/launch/q2d.launch.xml"/>
- <node name="rviz" pkg="rviz2" exec="rviz2" args="-d $(find-pkg-share q2d_description)/config/display.rviz" />
+ <node name="rviz" pkg="rviz2" exec="rviz2" args="-d $(find-pkg-share q2d_description)/config/display.rviz"/>
</launch>
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>
--- /dev/null
+<!--******************************************************************************
+ Quanser 2DSFJE Description
+ Ignition Gazebo Launch File
+ Copyright (C) 2018..2022 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="ign_pause" default="-r"/>
+ <arg if="$(var pause)" name="ign_pause" default=""/>
+
+ <arg unless="$(var gui)" name="ign_gui" default="-s"/>
+ <arg if="$(var gui)" name="ign_gui" default=""/>
+
+ <include file="$(find-pkg-share ros_ign_gazebo)/launch/ign_gazebo.launch.py">
+ <arg name="ign_args" value="$(var ign_pause) $(var ign_gui) -v 4 empty.sdf"/>
+ </include>
+
+ <include file="$(find-pkg-share q2d_description)/launch/q2d.launch.xml">
+ <arg name="use_sim_time" value="$(var use_sim_time)"/>
+ </include>
+
+ <node name="q2d_spawner" pkg="ros_ign_gazebo" exec="create" args="-topic robot_description -name q2d"/>
+
+ <node name="clock_bridge" pkg="ros_ign_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, 2021 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="use_sim_time" default="false"/>
<parameters>$(find q2d_description)/config/controller_manager.yaml</parameters>\r
</plugin>\r
</gazebo>\r
+<!--
+ <ros2_control name="IgnitionSystem" type="system">
+ <hardware>
+ <plugin>ign_ros2_control/IgnitionSystem</plugin>
+ </hardware>
+
+ <joint name="shoulder_active_joint">
+ <command_interface name="effort">
+ <param name="min">-27.94</param>
+ <param name="max">27.94</param>
+ </command_interface>
+ <state_interface name="position"/>
+ <state_interface name="velocity"/>
+ <state_interface name="effort"/>
+ </joint>
+
+ <joint name="elbow_active_joint">
+ <command_interface name="effort">
+ <param name="min">-13.62</param>
+ <param name="max">13.62</param>
+ </command_interface>
+ <state_interface name="position"/>
+ <state_interface name="velocity"/>
+ <state_interface name="effort"/>
+ </joint>
+ </ros2_control>
+
+ <gazebo>
+ <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 q2d_description)/config/controller_manager.yaml</parameters>
+ </plugin>
+ </gazebo>
+-->
</robot>\r