From: Walter Fetter Lages Date: Thu, 15 Sep 2022 05:53:18 +0000 (-0300) Subject: Add support to Ignition Gazebo. X-Git-Url: http://git.ece.ufrgs.br/?a=commitdiff_plain;h=a4a4c00fbe26e5ef86f39cb2b48698f7ea895bdb;p=q2d.git Add support to Ignition Gazebo. --- diff --git a/q2d_bringup/launch/ignition.launch.xml b/q2d_bringup/launch/ignition.launch.xml new file mode 100644 index 0000000..d2305bd --- /dev/null +++ b/q2d_bringup/launch/ignition.launch.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/q2d_description/CMakeLists.txt b/q2d_description/CMakeLists.txt index cd6ed07..8bc8c3c 100644 --- a/q2d_description/CMakeLists.txt +++ b/q2d_description/CMakeLists.txt @@ -26,4 +26,6 @@ if(BUILD_TESTING) ament_lint_auto_find_test_dependencies() endif() +ament_environment_hooks("${CMAKE_CURRENT_SOURCE_DIR}/env-hooks/${PROJECT_NAME}.dsv.in") + ament_package() diff --git a/q2d_description/env-hooks/q2d_description.dsv.in b/q2d_description/env-hooks/q2d_description.dsv.in new file mode 100644 index 0000000..30a6001 --- /dev/null +++ b/q2d_description/env-hooks/q2d_description.dsv.in @@ -0,0 +1,3 @@ +prepend-non-duplicate;IGN_GAZEBO_RESOURCE_PATH;share + +set-if-unset;MESA_GL_VERSION_OVERRIDE;3.3 diff --git a/q2d_description/launch/display.launch.py b/q2d_description/launch/display.launch.py index 645a58a..d3745f6 100644 --- a/q2d_description/launch/display.launch.py +++ b/q2d_description/launch/display.launch.py @@ -1,3 +1,24 @@ +#****************************************************************************** +# Quanser 2DSFJE Description +# RViz Launch File +# Copyright (C) 2018, 2021 Walter Fetter Lages +# +# 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 +# . +# +#******************************************************************************* + import os from ament_index_python.packages import get_package_share_directory from launch import LaunchDescription @@ -8,7 +29,7 @@ from launch_ros.actions import Node 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) @@ -20,19 +41,19 @@ def generate_launch_description(): 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', diff --git a/q2d_description/launch/display.launch.xml b/q2d_description/launch/display.launch.xml index d91bd82..807304d 100644 --- a/q2d_description/launch/display.launch.xml +++ b/q2d_description/launch/display.launch.xml @@ -1,7 +1,28 @@ + + - - - + + + - + diff --git a/q2d_description/launch/gazebo.launch.xml b/q2d_description/launch/gazebo.launch.xml index e01e744..60fd755 100644 --- a/q2d_description/launch/gazebo.launch.xml +++ b/q2d_description/launch/gazebo.launch.xml @@ -16,7 +16,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . - + *******************************************************************************--> diff --git a/q2d_description/launch/ignition.launch.xml b/q2d_description/launch/ignition.launch.xml new file mode 100644 index 0000000..4e39ec5 --- /dev/null +++ b/q2d_description/launch/ignition.launch.xml @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/q2d_description/launch/q2d.launch.xml b/q2d_description/launch/q2d.launch.xml index 1972173..7237d75 100644 --- a/q2d_description/launch/q2d.launch.xml +++ b/q2d_description/launch/q2d.launch.xml @@ -1,3 +1,24 @@ + + diff --git a/q2d_description/urdf/q2d.urdf b/q2d_description/urdf/q2d.urdf index 0c9c464..11f63e0 100644 --- a/q2d_description/urdf/q2d.urdf +++ b/q2d_description/urdf/q2d.urdf @@ -279,4 +279,39 @@ $(find q2d_description)/config/controller_manager.yaml +