diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
new file mode 100644
index 0000000..58132eb
--- /dev/null
+++ b/CONTRIBUTING.md
@@ -0,0 +1,56 @@
+# Contributing Guidelines
+Thank you for your interest in contributing to this project
+Whether it's a bug report, new feature, correction, or additional
+documentation, we greatly value feedback and contributions from our community.
+
+Please read through this document before submitting any issues or pull requests to ensure we have all the necessary
+information to effectively respond to your bug report or contribution.
+
+
+## Reporting Bugs/Feature Requests
+We welcome you to use the GitHub issue tracker to report bugs or suggest features.
+
+When filing an issue, please check existing open issues, or recently closed, issues to make sure
+ somebody else hasn't already reported the issue.
+Please try to include as much information as you can. Details like these are incredibly useful:
+
+* A reproducible test case or series of steps
+* The version of our code being used
+* Any modifications you've made relevant to the bug
+* Anything unusual about your environment or deployment
+
+
+## Contributing via Pull Requests
+Contributions via pull requests are much appreciated.
+Before sending us a pull request, please ensure that:
+
+1. You are working against the latest source on the *master* branch.
+2. You check existing open, and recently merged, pull requests to make sure someone else hasn't addressed the problem already.
+3. You open an issue to discuss any significant work - we would hate for your time to be wasted.
+
+To send us a pull request, please:
+
+1. Fork the repository.
+2. Modify the source; please focus on the specific change you are contributing.
+ If you also reformat all the code, it will be hard for us to focus on your change.
+3. Ensure local tests pass. (`colcon test`)
+4. Commit to your fork using clear commit messages.
+5. Send a pull request, answering any default questions in the pull request interface.
+6. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation.
+
+GitHub provides additional documentation on [forking a repository](https://help.github.com/articles/fork-a-repo/) and
+[creating a pull request](https://help.github.com/articles/creating-a-pull-request/).
+
+
+## Licensing
+Any contribution that you make to this repository will be under the Apache 2 License, as dictated by that [license](http://www.apache.org/licenses/LICENSE-2.0.html):
+
+~~~
+5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+~~~
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..cc36203
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,29 @@
+BSD 3-Clause License
+
+Copyright (c) 2021, PAL Robotics S.L.
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice, this
+ list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+
+3. Neither the name of the copyright holder nor the names of its
+ contributors may be used to endorse or promote products derived from
+ this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/pmb2_2dnav_gazebo/CHANGELOG.rst b/pmb2_2dnav_gazebo/CHANGELOG.rst
index 70633ee..e07c10d 100644
--- a/pmb2_2dnav_gazebo/CHANGELOG.rst
+++ b/pmb2_2dnav_gazebo/CHANGELOG.rst
@@ -2,6 +2,25 @@
Changelog for package pmb2_2dnav_gazebo
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+3.0.2 (2021-10-19)
+------------------
+
+3.0.1 (2021-08-13)
+------------------
+* Resolve missing dependency
+* Merge branch 'foxy_obstacle_avoidance' into 'foxy-devel'
+ default world
+ See merge request robots/pmb2_simulation!33
+* default world
+* Contributors: Noel Jimenez Garcia, Victor Lopez, victor
+
+3.0.0 (2021-07-20)
+------------------
+* Add ament and apply corrections
+* Migrate pmb2_2dnav_gazebo to ROS2
+* First gazebo launch with ROS2
+* Contributors: Victor Lopez
+
2.0.24 (2021-01-13)
-------------------
* Merge branch 'mapping-rgbd' into 'erbium-devel'
diff --git a/pmb2_2dnav_gazebo/CMakeLists.txt b/pmb2_2dnav_gazebo/CMakeLists.txt
index 9e5505f..b190915 100644
--- a/pmb2_2dnav_gazebo/CMakeLists.txt
+++ b/pmb2_2dnav_gazebo/CMakeLists.txt
@@ -1,11 +1,16 @@
-cmake_minimum_required(VERSION 2.8.3)
+cmake_minimum_required(VERSION 3.4.0)
project(pmb2_2dnav_gazebo)
-find_package(catkin REQUIRED)
+find_package(ament_cmake_auto REQUIRED)
-catkin_package()
+# PAL Robotics stricter build flags, other developers should not worry about this
+find_package(ament_cmake_pal QUIET)
-foreach(dir launch)
- install(DIRECTORY ${dir}/
- DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/${dir})
-endforeach(dir)
+
+if(BUILD_TESTING)
+ find_package(ament_lint_auto REQUIRED)
+
+ ament_lint_auto_find_test_dependencies()
+endif()
+
+ament_auto_package(INSTALL_TO_SHARE launch)
diff --git a/pmb2_2dnav_gazebo/launch/localization.launch b/pmb2_2dnav_gazebo/launch/localization.launch
deleted file mode 100644
index 6504a61..0000000
--- a/pmb2_2dnav_gazebo/launch/localization.launch
+++ /dev/null
@@ -1,30 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/pmb2_2dnav_gazebo/launch/mapping.launch b/pmb2_2dnav_gazebo/launch/mapping.launch
deleted file mode 100644
index 76bea1a..0000000
--- a/pmb2_2dnav_gazebo/launch/mapping.launch
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
diff --git a/pmb2_2dnav_gazebo/launch/navigation.launch b/pmb2_2dnav_gazebo/launch/navigation.launch
deleted file mode 100644
index 56ab241..0000000
--- a/pmb2_2dnav_gazebo/launch/navigation.launch
+++ /dev/null
@@ -1,80 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/pmb2_2dnav_gazebo/launch/pmb2_mapping.launch b/pmb2_2dnav_gazebo/launch/pmb2_mapping.launch
deleted file mode 100644
index 83fd075..0000000
--- a/pmb2_2dnav_gazebo/launch/pmb2_mapping.launch
+++ /dev/null
@@ -1,54 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/pmb2_2dnav_gazebo/launch/pmb2_mapping_gazebo.launch.py b/pmb2_2dnav_gazebo/launch/pmb2_mapping_gazebo.launch.py
new file mode 100644
index 0000000..c6efd7d
--- /dev/null
+++ b/pmb2_2dnav_gazebo/launch/pmb2_mapping_gazebo.launch.py
@@ -0,0 +1,34 @@
+# Copyright (c) 2021 PAL Robotics S.L.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+from launch import LaunchDescription
+from launch_pal.include_utils import include_launch_py_description
+
+
+def generate_launch_description():
+ # Create the launch description and populate
+ ld = LaunchDescription([
+ include_launch_py_description(
+ 'pmb2_gazebo', ['launch', 'pmb2_gazebo.launch.py'],
+ launch_arguments={
+ 'world_name': 'pal_office',
+ }.items()),
+ include_launch_py_description(
+ 'pmb2_2dnav', ['launch', 'pmb2_nav_bringup.launch.py'],
+ launch_arguments={
+ 'slam': 'True'
+ }.items()),
+ ])
+
+ return ld
diff --git a/pmb2_2dnav_gazebo/launch/pmb2_navigation.launch b/pmb2_2dnav_gazebo/launch/pmb2_navigation.launch
deleted file mode 100644
index 7f9269f..0000000
--- a/pmb2_2dnav_gazebo/launch/pmb2_navigation.launch
+++ /dev/null
@@ -1,75 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/pmb2_2dnav_gazebo/launch/pmb2_navigation_gazebo.launch.py b/pmb2_2dnav_gazebo/launch/pmb2_navigation_gazebo.launch.py
new file mode 100644
index 0000000..1769c81
--- /dev/null
+++ b/pmb2_2dnav_gazebo/launch/pmb2_navigation_gazebo.launch.py
@@ -0,0 +1,32 @@
+# Copyright (c) 2021 PAL Robotics S.L.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+from launch import LaunchDescription
+from launch_pal.include_utils import include_launch_py_description
+
+
+def generate_launch_description():
+ # Create the launch description and populate
+ ld = LaunchDescription([
+ include_launch_py_description(
+ 'pmb2_gazebo', ['launch', 'pmb2_gazebo.launch.py']
+ ),
+ include_launch_py_description(
+ 'pmb2_2dnav', ['launch', 'pmb2_nav_bringup.launch.py'],
+ launch_arguments={
+ 'slam': 'False'
+ }.items()),
+ ])
+
+ return ld
diff --git a/pmb2_2dnav_gazebo/package.xml b/pmb2_2dnav_gazebo/package.xml
index 90edcc5..dfef615 100644
--- a/pmb2_2dnav_gazebo/package.xml
+++ b/pmb2_2dnav_gazebo/package.xml
@@ -1,16 +1,25 @@
-
+
pmb2_2dnav_gazebo
- 2.0.24
+ 3.0.2
PMB2-specific launch files needed to run
navigation on the PMB2 robot.
+ Victor Lopez
PAL Robotics
TIAGo support PAL Robotics
Modified BSD
- Enrique Fernandez
+ Victor Lopez
- catkin
+ ament_cmake_auto
+
+ pmb2_gazebo
+ pmb2_2dnav
+
+ ament_lint_auto
+ ament_lint_common
+
+
+ ament_cmake
+
- pmb2_gazebo
- pmb2_2dnav
diff --git a/pmb2_controller_configuration_gazebo/CHANGELOG.rst b/pmb2_controller_configuration_gazebo/CHANGELOG.rst
deleted file mode 100644
index 42586b1..0000000
--- a/pmb2_controller_configuration_gazebo/CHANGELOG.rst
+++ /dev/null
@@ -1,114 +0,0 @@
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-Changelog for package pmb2_controller_configuration_gazebo
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-2.0.24 (2021-01-13)
--------------------
-
-2.0.23 (2020-07-30)
--------------------
-
-2.0.22 (2020-04-14)
--------------------
-
-2.0.21 (2020-04-03)
--------------------
-
-2.0.20 (2020-03-19)
--------------------
-
-2.0.19 (2019-10-22)
--------------------
-
-2.0.18 (2019-10-14)
--------------------
-
-2.0.17 (2019-10-10)
--------------------
-
-2.0.16 (2019-10-10)
--------------------
-
-2.0.15 (2019-10-10)
--------------------
-
-2.0.14 (2019-09-25)
--------------------
-
-2.0.13 (2019-09-23)
--------------------
-
-2.0.12 (2019-08-14)
--------------------
-
-2.0.11 (2019-08-01)
--------------------
-
-2.0.10 (2019-07-02)
--------------------
-
-2.0.9 (2019-06-17)
-------------------
-
-2.0.8 (2019-05-20)
-------------------
-
-2.0.7 (2019-02-01)
-------------------
-
-2.0.6 (2019-01-25)
-------------------
-
-2.0.5 (2019-01-23)
-------------------
-
-2.0.4 (2019-01-17)
-------------------
-
-2.0.3 (2018-12-19)
-------------------
-
-2.0.2 (2018-07-25)
-------------------
-
-2.0.1 (2018-07-17)
-------------------
-
-2.0.0 (2018-02-05)
-------------------
-* Add missing run depend
-* Contributors: Victor Lopez
-
-1.0.1 (2017-02-28)
-------------------
-* refs #14797. Add public_sim argument
-* add tiago_support as maintainer
-* Contributors: Jordi Pages
-
-1.0.0 (2016-04-20)
-------------------
-
-0.9.7 (2016-04-15)
-------------------
-
-0.9.6 (2016-02-09)
-------------------
-
-0.9.5 (2015-10-27)
-------------------
-* Update maintainer
-* Contributors: Bence Magyar
-
-0.9.4 (2015-02-18)
-------------------
-* Make rgbd camera fixed
-* Contributors: Enrique Fernandez
-
-0.9.3 (2015-02-03)
-------------------
-
-0.9.2 (2015-02-02)
-------------------
-* Replace ant -> pmb2
-* Rename files
-* Contributors: Enrique Fernandez
diff --git a/pmb2_controller_configuration_gazebo/CMakeLists.txt b/pmb2_controller_configuration_gazebo/CMakeLists.txt
deleted file mode 100644
index f328828..0000000
--- a/pmb2_controller_configuration_gazebo/CMakeLists.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-cmake_minimum_required(VERSION 2.8.3)
-project(pmb2_controller_configuration_gazebo)
-
-find_package(catkin REQUIRED)
-
-catkin_package()
-
-foreach(dir config)
- install(DIRECTORY ${dir}/
- DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/${dir})
-endforeach(dir)
diff --git a/pmb2_controller_configuration_gazebo/config/mobile_base_controller.yaml b/pmb2_controller_configuration_gazebo/config/mobile_base_controller.yaml
deleted file mode 100644
index 09eb0a7..0000000
--- a/pmb2_controller_configuration_gazebo/config/mobile_base_controller.yaml
+++ /dev/null
@@ -1,46 +0,0 @@
-mobile_base_controller:
- type : "diff_drive_controller/DiffDriveController"
- left_wheel : 'wheel_left_joint'
- right_wheel : 'wheel_right_joint'
- publish_rate: 50.0
- pose_covariance_diagonal : [0.001, 0.001, 1.0e-3, 1.0e-3, 1.0e-3, 0.01]
- twist_covariance_diagonal: [0.001, 0.001, 1.0e-3, 1.0e-3, 1.0e-3, 0.01]
-
- enable_pose_covariance_update: true
- error_constant_left : 0.001
- error_constant_right: 0.001
-
- # Velocity commands timeout [s]
- cmd_vel_timeout: 0.25
-
- # Base frame_id
- base_frame_id: base_footprint
-
- # Preserve turning radius when limiting speed/acceleration/jerk
- preserve_turning_radius: true
-
- # Publish limited velocity
- publish_cmd: false
-
- # Publish wheel data
- publish_wheel_data: true
-
- # Velocity and acceleration limits
- # Whenever a min_* is unspecified, default to -max_*
- linear:
- x:
- has_velocity_limits : true
- max_velocity : 1.0 # m/s
- min_velocity : -0.2 # m/s
- has_acceleration_limits: true
- max_acceleration : 1.0 # m/s^2
- has_jerk_limits : false
- max_jerk : 5.0 # m/s^3
- angular:
- z:
- has_velocity_limits : true
- max_velocity : !degrees 120.0
- has_acceleration_limits: true
- max_acceleration : !degrees 120.0
- has_jerk_limits : false
- max_jerk : !degrees 600.0
diff --git a/pmb2_controller_configuration_gazebo/config/mobile_base_controller_multipliers.yaml b/pmb2_controller_configuration_gazebo/config/mobile_base_controller_multipliers.yaml
deleted file mode 100644
index 9f3fb54..0000000
--- a/pmb2_controller_configuration_gazebo/config/mobile_base_controller_multipliers.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
-mobile_base_controller:
- wheel_separation_multiplier: 1.0
- wheel_radius_multiplier : 1.0
diff --git a/pmb2_controller_configuration_gazebo/package.xml b/pmb2_controller_configuration_gazebo/package.xml
deleted file mode 100644
index ef80962..0000000
--- a/pmb2_controller_configuration_gazebo/package.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
- pmb2_controller_configuration_gazebo
- 2.0.24
- Gazebo-specifig launch files and scripts needed to configure
- the controllers of the PMB2 robot in simulation.
- PAL Robotics
- TIAGo support PAL Robotics
- Modified BSD
- Enrique Fernandez
-
- catkin
- diff_drive_controller
-
-
diff --git a/pmb2_gazebo/CHANGELOG.rst b/pmb2_gazebo/CHANGELOG.rst
index 8746e62..7b6d3f1 100644
--- a/pmb2_gazebo/CHANGELOG.rst
+++ b/pmb2_gazebo/CHANGELOG.rst
@@ -2,6 +2,31 @@
Changelog for package pmb2_gazebo
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+3.0.2 (2021-10-19)
+------------------
+* Add gazebo_ros2_control dependency
+* Contributors: Victor Lopez
+
+3.0.1 (2021-08-13)
+------------------
+* Resolve missing dependency
+* Merge branch 'foxy_obstacle_avoidance' into 'foxy-devel'
+ default world
+ See merge request robots/pmb2_simulation!33
+* default world
+* Contributors: Noel Jimenez Garcia, Victor Lopez, victor
+
+3.0.0 (2021-07-20)
+------------------
+* Cleanup old launch files
+* Correct python launch file
+* Add ament and apply corrections
+* Cleanup
+* Cleanup pmb2_gazebo spawn
+* Path fixes for gazebo
+* First gazebo launch with ROS2
+* Contributors: Victor Lopez
+
2.0.24 (2021-01-13)
-------------------
diff --git a/pmb2_gazebo/CMakeLists.txt b/pmb2_gazebo/CMakeLists.txt
index 95c94df..990c493 100644
--- a/pmb2_gazebo/CMakeLists.txt
+++ b/pmb2_gazebo/CMakeLists.txt
@@ -1,11 +1,16 @@
-cmake_minimum_required(VERSION 2.8.3)
+cmake_minimum_required(VERSION 3.4.0)
project(pmb2_gazebo)
-find_package(catkin REQUIRED)
+find_package(ament_cmake_auto REQUIRED)
-catkin_package()
+# PAL Robotics stricter build flags, other developers should not worry about this
+find_package(ament_cmake_pal QUIET)
-foreach(dir launch Media models worlds)
- install(DIRECTORY ${dir}/
- DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/${dir})
-endforeach(dir)
+if(BUILD_TESTING)
+ find_package(ament_lint_auto REQUIRED)
+
+ ament_lint_auto_find_test_dependencies()
+endif()
+
+# Media commented out
+ament_auto_package(INSTALL_TO_SHARE launch models worlds)
diff --git a/pmb2_gazebo/launch/pmb2_empty_world.launch b/pmb2_gazebo/launch/pmb2_empty_world.launch
deleted file mode 100644
index 5305925..0000000
--- a/pmb2_gazebo/launch/pmb2_empty_world.launch
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
diff --git a/pmb2_gazebo/launch/pmb2_gazebo.launch b/pmb2_gazebo/launch/pmb2_gazebo.launch
deleted file mode 100644
index ffd0056..0000000
--- a/pmb2_gazebo/launch/pmb2_gazebo.launch
+++ /dev/null
@@ -1,58 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/pmb2_gazebo/launch/pmb2_gazebo.launch.py b/pmb2_gazebo/launch/pmb2_gazebo.launch.py
new file mode 100644
index 0000000..d4582a2
--- /dev/null
+++ b/pmb2_gazebo/launch/pmb2_gazebo.launch.py
@@ -0,0 +1,64 @@
+# Copyright (c) 2021 PAL Robotics S.L.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import os
+from os import environ, pathsep
+
+from ament_index_python.packages import get_package_share_directory, get_package_prefix
+
+from launch import LaunchDescription
+from launch.actions import IncludeLaunchDescription, SetEnvironmentVariable, DeclareLaunchArgument
+from launch.launch_description_sources import PythonLaunchDescriptionSource
+from launch.substitutions import LaunchConfiguration
+
+from launch_pal.include_utils import include_launch_py_description
+
+
+def generate_launch_description():
+ # This should be removed, it should be retrieved automatically from pal_gazebo.launch.py
+ # See https://github.com/ros2/launch/issues/313
+ declare_world_name = DeclareLaunchArgument(
+ 'world_name', default_value='pal_office',
+ description='Specify world name, we\'ll convert to full path'
+ )
+
+ gazebo = IncludeLaunchDescription(
+ PythonLaunchDescriptionSource([os.path.join(
+ get_package_share_directory('pal_gazebo_worlds'), 'launch'), '/pal_gazebo.launch.py']),
+ launch_arguments={
+ 'world_name': LaunchConfiguration('world_name')}.items(),
+ )
+
+ pmb2_spawn = include_launch_py_description(
+ 'pmb2_gazebo', ['launch', 'pmb2_spawn.launch.py'])
+ pmb2_bringup = include_launch_py_description(
+ 'pmb2_bringup', ['launch', 'pmb2_bringup.launch.py'])
+
+ pkg_path = get_package_prefix('pmb2_description')
+ model_path = os.path.join(pkg_path, "share")
+ resource_path = pkg_path
+
+ if 'GAZEBO_MODEL_PATH' in environ:
+ model_path += pathsep + environ['GAZEBO_MODEL_PATH']
+ if 'GAZEBO_RESOURCE_PATH' in environ:
+ resource_path += pathsep + environ['GAZEBO_RESOURCE_PATH']
+ return LaunchDescription([
+ SetEnvironmentVariable("GAZEBO_MODEL_PATH", model_path),
+ # Using this prevents shared library from being found
+ # SetEnvironmentVariable("GAZEBO_RESOURCE_PATH", resource_path),
+ declare_world_name,
+ gazebo,
+ pmb2_spawn,
+ pmb2_bringup
+ ])
diff --git a/pmb2_gazebo/launch/pmb2_spawn.launch b/pmb2_gazebo/launch/pmb2_spawn.launch
deleted file mode 100644
index 2d27774..0000000
--- a/pmb2_gazebo/launch/pmb2_spawn.launch
+++ /dev/null
@@ -1,25 +0,0 @@
-
-
-
-
-
-
-
- "pmb2"
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/pmb2_gazebo/launch/pmb2_spawn.launch.py b/pmb2_gazebo/launch/pmb2_spawn.launch.py
new file mode 100644
index 0000000..3cbc270
--- /dev/null
+++ b/pmb2_gazebo/launch/pmb2_spawn.launch.py
@@ -0,0 +1,53 @@
+# Copyright (c) 2021 PAL Robotics S.L.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+
+from launch import LaunchDescription
+from launch.actions import DeclareLaunchArgument
+from launch.substitutions import LaunchConfiguration
+
+from launch_ros.actions import Node
+
+from launch_pal.include_utils import include_launch_py_description
+
+
+def generate_launch_description():
+ # This format doesn't work because because we have to expand gzpose into
+ # different args for spawn_entity.py
+ # declare_gz_pose = DeclareLaunchArgument(
+ # 'gzpose', default_value='-x 0 -y 0 -z 0.0 -R 0.0 -P 0.0 -Y 0.0 ',
+ # description='Spawn gazebo position as provided to spawn_entity.py'
+ # )
+ declare_model_name = DeclareLaunchArgument(
+ 'model_name', default_value='pmb2',
+ description='Gazebo model name'
+ )
+
+ pmb2_state_publisher = include_launch_py_description('pmb2_description',
+ ['launch',
+ 'robot_state_publisher.launch.py'])
+ spawn_entity = Node(package='gazebo_ros', executable='spawn_entity.py',
+ arguments=['-topic', 'robot_description',
+ '-entity', LaunchConfiguration(
+ 'model_name'),
+ # LaunchConfiguration('gzpose'),
+ ],
+ output='screen')
+
+ return LaunchDescription([
+ # declare_gz_pose,
+ declare_model_name,
+ pmb2_state_publisher,
+ spawn_entity,
+ ])
diff --git a/pmb2_gazebo/launch/simulation_pmb2_bringup.launch b/pmb2_gazebo/launch/simulation_pmb2_bringup.launch
deleted file mode 100644
index 49689ae..0000000
--- a/pmb2_gazebo/launch/simulation_pmb2_bringup.launch
+++ /dev/null
@@ -1,23 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/pmb2_gazebo/package.xml b/pmb2_gazebo/package.xml
index 03d387c..09925ed 100644
--- a/pmb2_gazebo/package.xml
+++ b/pmb2_gazebo/package.xml
@@ -1,22 +1,35 @@
-
+
pmb2_gazebo
- 2.0.24
+ 3.0.2
Simulation files for the PMB2 robot.
+ Victor Lopez
PAL Robotics
TIAGo support PAL Robotics
Modified BSD
- Enrique Fernandez
+ Victor Lopez
- catkin
+ ament_cmake_auto
+
+ launch_pal
+ pmb2_description
+ pmb2_bringup
+ gazebo_ros
+ gazebo_plugins
+ gazebo_ros2_control
+ pal_gazebo_worlds
+ pmb2_controller_configuration
+
+
+
+ ament_lint_auto
+ ament_lint_common
+
+
+ ament_cmake
+
- pmb2_controller_configuration_gazebo
- pmb2_description
- pal_hardware_gazebo
- pmb2_bringup
- gazebo_ros
- gazebo_plugins
- pal_gazebo_worlds
- simple_models_gazebo
diff --git a/pmb2_multi/CMakeLists.txt b/pmb2_multi/CMakeLists.txt
index ca4bb7a..7073b6c 100644
--- a/pmb2_multi/CMakeLists.txt
+++ b/pmb2_multi/CMakeLists.txt
@@ -11,5 +11,5 @@ install(
foreach(dir config launch)
install(DIRECTORY ${dir}/
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/${dir})
-endforeach(dir)
+endforeach()
diff --git a/pmb2_multi/COLCON_IGNORE b/pmb2_multi/COLCON_IGNORE
new file mode 100644
index 0000000..e69de29
diff --git a/pmb2_simulation/CHANGELOG.rst b/pmb2_simulation/CHANGELOG.rst
index 081047b..e27344d 100644
--- a/pmb2_simulation/CHANGELOG.rst
+++ b/pmb2_simulation/CHANGELOG.rst
@@ -2,6 +2,20 @@
Changelog for package pmb2_simulation
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+3.0.2 (2021-10-19)
+------------------
+
+3.0.1 (2021-08-13)
+------------------
+
+3.0.0 (2021-07-20)
+------------------
+* Add ament and apply corrections
+* Remove pmb2_controller_configuration_gazebo, use default one for gazebo
+ For now we can use the default one
+* First gazebo launch with ROS2
+* Contributors: Victor Lopez
+
2.0.24 (2021-01-13)
-------------------
diff --git a/pmb2_simulation/CMakeLists.txt b/pmb2_simulation/CMakeLists.txt
index 0a84221..13c5cb9 100644
--- a/pmb2_simulation/CMakeLists.txt
+++ b/pmb2_simulation/CMakeLists.txt
@@ -1,4 +1,11 @@
-cmake_minimum_required(VERSION 2.8.3)
+cmake_minimum_required(VERSION 3.5)
project(pmb2_simulation)
-find_package(catkin REQUIRED)
-catkin_metapackage()
+find_package(ament_cmake REQUIRED)
+
+if(BUILD_TESTING)
+ find_package(ament_lint_auto REQUIRED)
+
+ ament_lint_auto_find_test_dependencies()
+endif()
+
+ament_package()
diff --git a/pmb2_simulation/package.xml b/pmb2_simulation/package.xml
index 8e82257..13a66a1 100644
--- a/pmb2_simulation/package.xml
+++ b/pmb2_simulation/package.xml
@@ -1,7 +1,7 @@
-
+
pmb2_simulation
- 2.0.24
+ 3.0.2
PMB2-specific simulation components. These include plugins
and launch scripts necessary for running PMB2 in simulation.
PAL Robotics
@@ -9,14 +9,15 @@
BSD
Enrique Fernandez
- catkin
+ ament_cmake
- pmb2_controller_configuration_gazebo
- pmb2_gazebo
- pal_hardware_gazebo
- pmb2_2dnav_gazebo
+ pmb2_gazebo
+
+ pmb2_2dnav_gazebo
+ ament_lint_auto
+ ament_lint_common
-
+ ament_cmake