From 4e060c520a4a9c6b42df6217dfb9b3848f4eb5df Mon Sep 17 00:00:00 2001 From: Alberto Soragna Date: Thu, 31 Mar 2022 12:21:13 +0100 Subject: [PATCH 01/44] set ign_ros2_control minimum version Signed-off-by: Alberto Soragna --- README.md | 1 - irobot_create_common/irobot_create_control/package.xml | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index fb802cb4..ae0f478e 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,6 @@ Required dependencies: 2. ROS 2 dev tools: - [colcon-common-extensions](https://pypi.org/project/colcon-common-extensions/) - [rosdep](https://pypi.org/project/rosdep/): Used to install dependencies when building from sources - - [vcs](https://pypi.org/project/vcstool/): Automates cloning of git repositories declared on a YAML file. Besides the aforementioned dependencies you will also need at least one among Ignition Gazebo and Classic Gazebo diff --git a/irobot_create_common/irobot_create_control/package.xml b/irobot_create_common/irobot_create_control/package.xml index c490effd..0b42852a 100644 --- a/irobot_create_common/irobot_create_control/package.xml +++ b/irobot_create_common/irobot_create_control/package.xml @@ -11,6 +11,9 @@ ament_cmake + gazebo_ros2_control + ign_ros2_control + irobot_create_nodes joint_state_broadcaster ros2launch ros2_controllers From 3e98b7e0feb7c458603ead3d73b9f689aca75ac9 Mon Sep 17 00:00:00 2001 From: Alberto Soragna Date: Thu, 5 May 2022 10:53:37 +0100 Subject: [PATCH 02/44] remove minimum version requirement Signed-off-by: Alberto Soragna --- irobot_create_common/irobot_create_control/package.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/irobot_create_common/irobot_create_control/package.xml b/irobot_create_common/irobot_create_control/package.xml index 0b42852a..bb62cc75 100644 --- a/irobot_create_common/irobot_create_control/package.xml +++ b/irobot_create_common/irobot_create_control/package.xml @@ -12,7 +12,7 @@ ament_cmake gazebo_ros2_control - ign_ros2_control + ign_ros2_control irobot_create_nodes joint_state_broadcaster ros2launch From a291e51f3101c541ed746a46e034addb70fcffe0 Mon Sep 17 00:00:00 2001 From: Alberto Soragna Date: Thu, 5 May 2022 11:02:05 +0100 Subject: [PATCH 03/44] update changelog Signed-off-by: Alberto Soragna --- .../irobot_create_common_bringup/CHANGELOG.rst | 5 +++++ irobot_create_common/irobot_create_control/CHANGELOG.rst | 7 +++++++ .../irobot_create_description/CHANGELOG.rst | 6 ++++++ irobot_create_common/irobot_create_nodes/CHANGELOG.rst | 5 +++++ irobot_create_common/irobot_create_toolbox/CHANGELOG.rst | 5 +++++ .../irobot_create_gazebo_bringup/CHANGELOG.rst | 8 ++++++++ .../irobot_create_gazebo_plugins/CHANGELOG.rst | 5 +++++ .../irobot_create_gazebo_sim/CHANGELOG.rst | 7 +++++++ .../irobot_create_ignition_bringup/CHANGELOG.rst | 6 ++++++ .../irobot_create_ignition_plugins/CHANGELOG.rst | 6 ++++++ .../irobot_create_ignition_sim/CHANGELOG.rst | 6 ++++++ .../irobot_create_ignition_toolbox/CHANGELOG.rst | 8 ++++++++ 12 files changed, 74 insertions(+) diff --git a/irobot_create_common/irobot_create_common_bringup/CHANGELOG.rst b/irobot_create_common/irobot_create_common_bringup/CHANGELOG.rst index 83baa9ec..8fc3d8d2 100644 --- a/irobot_create_common/irobot_create_common_bringup/CHANGELOG.rst +++ b/irobot_create_common/irobot_create_common_bringup/CHANGELOG.rst @@ -2,6 +2,11 @@ Changelog for package irobot_create_common_bringup ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Forthcoming +----------- +* update changelog +* Contributors: Alberto Soragna + 1.0.1 (2022-04-12) ------------------ * add boost as explicit dependency and remove unnneded boost usage (`#175 `_) diff --git a/irobot_create_common/irobot_create_control/CHANGELOG.rst b/irobot_create_common/irobot_create_control/CHANGELOG.rst index 2c1c5a2e..c245ccba 100644 --- a/irobot_create_common/irobot_create_control/CHANGELOG.rst +++ b/irobot_create_common/irobot_create_control/CHANGELOG.rst @@ -2,6 +2,13 @@ Changelog for package irobot_create_control ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Forthcoming +----------- +* fix dependency tree of create3_sim packages (`#177 `_) +* update changelog +* remove minimum version requirement +* Contributors: Alberto Soragna + 1.0.1 (2022-04-12) ------------------ * add boost as explicit dependency and remove unnneded boost usage (`#175 `_) diff --git a/irobot_create_common/irobot_create_description/CHANGELOG.rst b/irobot_create_common/irobot_create_description/CHANGELOG.rst index 9844073e..be37accf 100644 --- a/irobot_create_common/irobot_create_description/CHANGELOG.rst +++ b/irobot_create_common/irobot_create_description/CHANGELOG.rst @@ -2,6 +2,12 @@ Changelog for package irobot_create_description ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Forthcoming +----------- +* fix dependency tree of create3_sim packages (`#177 `_) +* update changelog +* Contributors: Alberto Soragna + 1.0.1 (2022-04-12) ------------------ * add boost as explicit dependency and remove unnneded boost usage (`#175 `_) diff --git a/irobot_create_common/irobot_create_nodes/CHANGELOG.rst b/irobot_create_common/irobot_create_nodes/CHANGELOG.rst index 05343e32..1d4ecc24 100644 --- a/irobot_create_common/irobot_create_nodes/CHANGELOG.rst +++ b/irobot_create_common/irobot_create_nodes/CHANGELOG.rst @@ -2,6 +2,11 @@ Changelog for package irobot_create_nodes ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Forthcoming +----------- +* update changelog +* Contributors: Alberto Soragna + 1.0.1 (2022-04-12) ------------------ * add boost as explicit dependency and remove unnneded boost usage (`#175 `_) diff --git a/irobot_create_common/irobot_create_toolbox/CHANGELOG.rst b/irobot_create_common/irobot_create_toolbox/CHANGELOG.rst index 265b8c76..58cc5ecb 100644 --- a/irobot_create_common/irobot_create_toolbox/CHANGELOG.rst +++ b/irobot_create_common/irobot_create_toolbox/CHANGELOG.rst @@ -2,6 +2,11 @@ Changelog for package irobot_create_toolbox ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Forthcoming +----------- +* update changelog +* Contributors: Alberto Soragna + 1.0.1 (2022-04-12) ------------------ * add boost as explicit dependency and remove unnneded boost usage (`#175 `_) diff --git a/irobot_create_gazebo/irobot_create_gazebo_bringup/CHANGELOG.rst b/irobot_create_gazebo/irobot_create_gazebo_bringup/CHANGELOG.rst index c158c096..d80619e2 100644 --- a/irobot_create_gazebo/irobot_create_gazebo_bringup/CHANGELOG.rst +++ b/irobot_create_gazebo/irobot_create_gazebo_bringup/CHANGELOG.rst @@ -8,6 +8,14 @@ Changelog for package irobot_create_gazebo_bringup * add boost as explicit dependency and remove unnneded boost usage * do not search for boost component in Boost library +Forthcoming +----------- +* fix dependency tree of create3_sim packages (`#177 `_) +* fix setting environment variable GAZEBO_MODEL_PATH for aws models (`#174 `_) +* 1.0.1 +* update changelog +* Contributors: Alberto Soragna, crthilakraj + 1.0.0 (2022-03-31) ------------------ * Add audio action and move UI elements to ui_mgr node (`#172 `_) diff --git a/irobot_create_gazebo/irobot_create_gazebo_plugins/CHANGELOG.rst b/irobot_create_gazebo/irobot_create_gazebo_plugins/CHANGELOG.rst index a5ca97a9..d8da350d 100644 --- a/irobot_create_gazebo/irobot_create_gazebo_plugins/CHANGELOG.rst +++ b/irobot_create_gazebo/irobot_create_gazebo_plugins/CHANGELOG.rst @@ -2,6 +2,11 @@ Changelog for package irobot_create_gazebo_plugins ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Forthcoming +----------- +* update changelog +* Contributors: Alberto Soragna + 1.0.1 (2022-04-12) ------------------ * add boost as explicit dependency and remove unnneded boost usage (`#175 `_) diff --git a/irobot_create_gazebo/irobot_create_gazebo_sim/CHANGELOG.rst b/irobot_create_gazebo/irobot_create_gazebo_sim/CHANGELOG.rst index 3deb3056..54145cd9 100644 --- a/irobot_create_gazebo/irobot_create_gazebo_sim/CHANGELOG.rst +++ b/irobot_create_gazebo/irobot_create_gazebo_sim/CHANGELOG.rst @@ -8,6 +8,13 @@ Changelog for package irobot_create_gazebo_sim * add boost as explicit dependency and remove unnneded boost usage * do not search for boost component in Boost library +Forthcoming +----------- +* fix dependency tree of create3_sim packages (`#177 `_) +* 1.0.1 +* update changelog +* Contributors: Alberto Soragna + 1.0.0 (2022-03-31) ------------------ * Split `irobot_create_toolbox` (`#153 `_) diff --git a/irobot_create_ignition/irobot_create_ignition_bringup/CHANGELOG.rst b/irobot_create_ignition/irobot_create_ignition_bringup/CHANGELOG.rst index c91a1383..62692106 100644 --- a/irobot_create_ignition/irobot_create_ignition_bringup/CHANGELOG.rst +++ b/irobot_create_ignition/irobot_create_ignition_bringup/CHANGELOG.rst @@ -2,6 +2,12 @@ Changelog for package irobot_create_ignition_bringup ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Forthcoming +----------- +* fix dependency tree of create3_sim packages (`#177 `_) +* update changelog +* Contributors: Alberto Soragna + 1.0.1 (2022-04-12) ------------------ * add boost as explicit dependency and remove unnneded boost usage (`#175 `_) diff --git a/irobot_create_ignition/irobot_create_ignition_plugins/CHANGELOG.rst b/irobot_create_ignition/irobot_create_ignition_plugins/CHANGELOG.rst index ab60f106..ea5d4420 100644 --- a/irobot_create_ignition/irobot_create_ignition_plugins/CHANGELOG.rst +++ b/irobot_create_ignition/irobot_create_ignition_plugins/CHANGELOG.rst @@ -8,6 +8,12 @@ Changelog for package irobot_create_ignition_plugins * add boost as explicit dependency and remove unnneded boost usage * do not search for boost component in Boost library +Forthcoming +----------- +* 1.0.1 +* update changelog +* Contributors: Alberto Soragna + 1.0.0 (2022-03-31) ------------------ * Ignition Gazebo support (`#144 `_) diff --git a/irobot_create_ignition/irobot_create_ignition_sim/CHANGELOG.rst b/irobot_create_ignition/irobot_create_ignition_sim/CHANGELOG.rst index 96b107e8..57a13202 100644 --- a/irobot_create_ignition/irobot_create_ignition_sim/CHANGELOG.rst +++ b/irobot_create_ignition/irobot_create_ignition_sim/CHANGELOG.rst @@ -2,6 +2,12 @@ Changelog for package irobot_create_ignition_sim ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Forthcoming +----------- +* fix dependency tree of create3_sim packages (`#177 `_) +* update changelog +* Contributors: Alberto Soragna + 1.0.1 (2022-04-12) ------------------ * add boost as explicit dependency and remove unnneded boost usage (`#175 `_) diff --git a/irobot_create_ignition/irobot_create_ignition_toolbox/CHANGELOG.rst b/irobot_create_ignition/irobot_create_ignition_toolbox/CHANGELOG.rst index 24a19ea6..6dc6e778 100644 --- a/irobot_create_ignition/irobot_create_ignition_toolbox/CHANGELOG.rst +++ b/irobot_create_ignition/irobot_create_ignition_toolbox/CHANGELOG.rst @@ -2,6 +2,14 @@ Changelog for package irobot_create_ignition_toolbox ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Forthcoming +----------- +* Renamed Ignition Toolbox libraries (`#178 `_) + * Renamed Ignition Toolbox libraries + * Pre-pend library names with irobot_create_ignition +* update changelog +* Contributors: Alberto Soragna, roni-kreinin + 1.0.1 (2022-04-12) ------------------ * add boost as explicit dependency and remove unnneded boost usage (`#175 `_) From ebfc5a4a0195289bdadbbbc0086d08bf438b944e Mon Sep 17 00:00:00 2001 From: Alberto Soragna Date: Thu, 5 May 2022 03:02:35 -0700 Subject: [PATCH 04/44] 1.0.2 --- .../irobot_create_common_bringup/CHANGELOG.rst | 4 ++-- irobot_create_common/irobot_create_common_bringup/package.xml | 2 +- irobot_create_common/irobot_create_control/CHANGELOG.rst | 4 ++-- irobot_create_common/irobot_create_control/package.xml | 2 +- irobot_create_common/irobot_create_description/CHANGELOG.rst | 4 ++-- irobot_create_common/irobot_create_description/package.xml | 2 +- irobot_create_common/irobot_create_nodes/CHANGELOG.rst | 4 ++-- irobot_create_common/irobot_create_nodes/package.xml | 2 +- irobot_create_common/irobot_create_toolbox/CHANGELOG.rst | 4 ++-- irobot_create_common/irobot_create_toolbox/package.xml | 2 +- .../irobot_create_gazebo_bringup/CHANGELOG.rst | 4 ++-- irobot_create_gazebo/irobot_create_gazebo_bringup/package.xml | 2 +- .../irobot_create_gazebo_plugins/CHANGELOG.rst | 4 ++-- irobot_create_gazebo/irobot_create_gazebo_plugins/package.xml | 2 +- irobot_create_gazebo/irobot_create_gazebo_sim/CHANGELOG.rst | 4 ++-- irobot_create_gazebo/irobot_create_gazebo_sim/package.xml | 2 +- .../irobot_create_ignition_bringup/CHANGELOG.rst | 4 ++-- .../irobot_create_ignition_bringup/package.xml | 2 +- .../irobot_create_ignition_plugins/CHANGELOG.rst | 4 ++-- .../irobot_create_ignition_plugins/package.xml | 2 +- .../irobot_create_ignition_sim/CHANGELOG.rst | 4 ++-- irobot_create_ignition/irobot_create_ignition_sim/package.xml | 2 +- .../irobot_create_ignition_toolbox/CHANGELOG.rst | 4 ++-- .../irobot_create_ignition_toolbox/package.xml | 2 +- 24 files changed, 36 insertions(+), 36 deletions(-) diff --git a/irobot_create_common/irobot_create_common_bringup/CHANGELOG.rst b/irobot_create_common/irobot_create_common_bringup/CHANGELOG.rst index 8fc3d8d2..1d976eb0 100644 --- a/irobot_create_common/irobot_create_common_bringup/CHANGELOG.rst +++ b/irobot_create_common/irobot_create_common_bringup/CHANGELOG.rst @@ -2,8 +2,8 @@ Changelog for package irobot_create_common_bringup ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Forthcoming ------------ +1.0.2 (2022-05-05) +------------------ * update changelog * Contributors: Alberto Soragna diff --git a/irobot_create_common/irobot_create_common_bringup/package.xml b/irobot_create_common/irobot_create_common_bringup/package.xml index 921ce761..f5d27bff 100644 --- a/irobot_create_common/irobot_create_common_bringup/package.xml +++ b/irobot_create_common/irobot_create_common_bringup/package.xml @@ -2,7 +2,7 @@ irobot_create_common_bringup - 1.0.1 + 1.0.2 Provides common launch and configuration scripts for a simulated iRobot(R) Create(R) 3 Educational Robot. Ekumen BSD diff --git a/irobot_create_common/irobot_create_control/CHANGELOG.rst b/irobot_create_common/irobot_create_control/CHANGELOG.rst index c245ccba..8e3710d7 100644 --- a/irobot_create_common/irobot_create_control/CHANGELOG.rst +++ b/irobot_create_common/irobot_create_control/CHANGELOG.rst @@ -2,8 +2,8 @@ Changelog for package irobot_create_control ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Forthcoming ------------ +1.0.2 (2022-05-05) +------------------ * fix dependency tree of create3_sim packages (`#177 `_) * update changelog * remove minimum version requirement diff --git a/irobot_create_common/irobot_create_control/package.xml b/irobot_create_common/irobot_create_control/package.xml index bb62cc75..22076f6e 100644 --- a/irobot_create_common/irobot_create_control/package.xml +++ b/irobot_create_common/irobot_create_control/package.xml @@ -2,7 +2,7 @@ irobot_create_control - 1.0.1 + 1.0.2 Provides the diff-drive controller for the iRobot(R) Create(R) 3 Educational Robot. Ekumen BSD diff --git a/irobot_create_common/irobot_create_description/CHANGELOG.rst b/irobot_create_common/irobot_create_description/CHANGELOG.rst index be37accf..8ae8689e 100644 --- a/irobot_create_common/irobot_create_description/CHANGELOG.rst +++ b/irobot_create_common/irobot_create_description/CHANGELOG.rst @@ -2,8 +2,8 @@ Changelog for package irobot_create_description ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Forthcoming ------------ +1.0.2 (2022-05-05) +------------------ * fix dependency tree of create3_sim packages (`#177 `_) * update changelog * Contributors: Alberto Soragna diff --git a/irobot_create_common/irobot_create_description/package.xml b/irobot_create_common/irobot_create_description/package.xml index d5da9e77..4bdaab12 100644 --- a/irobot_create_common/irobot_create_description/package.xml +++ b/irobot_create_common/irobot_create_description/package.xml @@ -2,7 +2,7 @@ irobot_create_description - 1.0.1 + 1.0.2 Provides the model description for the iRobot(R) Create(R) 3 Educational Robot. Ekumen BSD diff --git a/irobot_create_common/irobot_create_nodes/CHANGELOG.rst b/irobot_create_common/irobot_create_nodes/CHANGELOG.rst index 1d4ecc24..8e917f7f 100644 --- a/irobot_create_common/irobot_create_nodes/CHANGELOG.rst +++ b/irobot_create_common/irobot_create_nodes/CHANGELOG.rst @@ -2,8 +2,8 @@ Changelog for package irobot_create_nodes ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Forthcoming ------------ +1.0.2 (2022-05-05) +------------------ * update changelog * Contributors: Alberto Soragna diff --git a/irobot_create_common/irobot_create_nodes/package.xml b/irobot_create_common/irobot_create_nodes/package.xml index 58c1d193..4f1cff48 100644 --- a/irobot_create_common/irobot_create_nodes/package.xml +++ b/irobot_create_common/irobot_create_nodes/package.xml @@ -2,7 +2,7 @@ irobot_create_nodes - 1.0.1 + 1.0.2 ROS 2 Nodes for the simulated iRobot(R) Create(R) 3 Educational Robot. Ekumen BSD diff --git a/irobot_create_common/irobot_create_toolbox/CHANGELOG.rst b/irobot_create_common/irobot_create_toolbox/CHANGELOG.rst index 58cc5ecb..dd8bcafc 100644 --- a/irobot_create_common/irobot_create_toolbox/CHANGELOG.rst +++ b/irobot_create_common/irobot_create_toolbox/CHANGELOG.rst @@ -2,8 +2,8 @@ Changelog for package irobot_create_toolbox ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Forthcoming ------------ +1.0.2 (2022-05-05) +------------------ * update changelog * Contributors: Alberto Soragna diff --git a/irobot_create_common/irobot_create_toolbox/package.xml b/irobot_create_common/irobot_create_toolbox/package.xml index 78aba062..44523668 100644 --- a/irobot_create_common/irobot_create_toolbox/package.xml +++ b/irobot_create_common/irobot_create_toolbox/package.xml @@ -2,7 +2,7 @@ irobot_create_toolbox - 1.0.1 + 1.0.2 Components and helpers for the iRobot(R) Create(R) 3 Educational Robot. Ekumen BSD diff --git a/irobot_create_gazebo/irobot_create_gazebo_bringup/CHANGELOG.rst b/irobot_create_gazebo/irobot_create_gazebo_bringup/CHANGELOG.rst index d80619e2..ae9e7a0f 100644 --- a/irobot_create_gazebo/irobot_create_gazebo_bringup/CHANGELOG.rst +++ b/irobot_create_gazebo/irobot_create_gazebo_bringup/CHANGELOG.rst @@ -8,8 +8,8 @@ Changelog for package irobot_create_gazebo_bringup * add boost as explicit dependency and remove unnneded boost usage * do not search for boost component in Boost library -Forthcoming ------------ +1.0.2 (2022-05-05) +------------------ * fix dependency tree of create3_sim packages (`#177 `_) * fix setting environment variable GAZEBO_MODEL_PATH for aws models (`#174 `_) * 1.0.1 diff --git a/irobot_create_gazebo/irobot_create_gazebo_bringup/package.xml b/irobot_create_gazebo/irobot_create_gazebo_bringup/package.xml index 53bd1860..1ea126d4 100644 --- a/irobot_create_gazebo/irobot_create_gazebo_bringup/package.xml +++ b/irobot_create_gazebo/irobot_create_gazebo_bringup/package.xml @@ -2,7 +2,7 @@ irobot_create_gazebo_bringup - 1.0.1 + 1.0.2 Provides launch and configuration scripts for a Gazebo simulated iRobot(R) Create(R) 3 Educational Robot. Ekumen BSD diff --git a/irobot_create_gazebo/irobot_create_gazebo_plugins/CHANGELOG.rst b/irobot_create_gazebo/irobot_create_gazebo_plugins/CHANGELOG.rst index d8da350d..c4cf840e 100644 --- a/irobot_create_gazebo/irobot_create_gazebo_plugins/CHANGELOG.rst +++ b/irobot_create_gazebo/irobot_create_gazebo_plugins/CHANGELOG.rst @@ -2,8 +2,8 @@ Changelog for package irobot_create_gazebo_plugins ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Forthcoming ------------ +1.0.2 (2022-05-05) +------------------ * update changelog * Contributors: Alberto Soragna diff --git a/irobot_create_gazebo/irobot_create_gazebo_plugins/package.xml b/irobot_create_gazebo/irobot_create_gazebo_plugins/package.xml index 92c0c393..dd14c858 100644 --- a/irobot_create_gazebo/irobot_create_gazebo_plugins/package.xml +++ b/irobot_create_gazebo/irobot_create_gazebo_plugins/package.xml @@ -2,7 +2,7 @@ irobot_create_gazebo_plugins - 1.0.1 + 1.0.2 Provides the Gazebo plugins for the iRobot(R) Create(R) 3 Educational Robot. Ekumen BSD diff --git a/irobot_create_gazebo/irobot_create_gazebo_sim/CHANGELOG.rst b/irobot_create_gazebo/irobot_create_gazebo_sim/CHANGELOG.rst index 54145cd9..6e1c19cf 100644 --- a/irobot_create_gazebo/irobot_create_gazebo_sim/CHANGELOG.rst +++ b/irobot_create_gazebo/irobot_create_gazebo_sim/CHANGELOG.rst @@ -8,8 +8,8 @@ Changelog for package irobot_create_gazebo_sim * add boost as explicit dependency and remove unnneded boost usage * do not search for boost component in Boost library -Forthcoming ------------ +1.0.2 (2022-05-05) +------------------ * fix dependency tree of create3_sim packages (`#177 `_) * 1.0.1 * update changelog diff --git a/irobot_create_gazebo/irobot_create_gazebo_sim/package.xml b/irobot_create_gazebo/irobot_create_gazebo_sim/package.xml index a61e6c4c..f8cb5193 100644 --- a/irobot_create_gazebo/irobot_create_gazebo_sim/package.xml +++ b/irobot_create_gazebo/irobot_create_gazebo_sim/package.xml @@ -2,7 +2,7 @@ irobot_create_gazebo_sim - 1.0.1 + 1.0.2 Metapackage for the iRobot(R) Create(R) 3 robot Gazebo simulatorGazebo simulation stack. Ekumen diff --git a/irobot_create_ignition/irobot_create_ignition_bringup/CHANGELOG.rst b/irobot_create_ignition/irobot_create_ignition_bringup/CHANGELOG.rst index 62692106..84fc894c 100644 --- a/irobot_create_ignition/irobot_create_ignition_bringup/CHANGELOG.rst +++ b/irobot_create_ignition/irobot_create_ignition_bringup/CHANGELOG.rst @@ -2,8 +2,8 @@ Changelog for package irobot_create_ignition_bringup ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Forthcoming ------------ +1.0.2 (2022-05-05) +------------------ * fix dependency tree of create3_sim packages (`#177 `_) * update changelog * Contributors: Alberto Soragna diff --git a/irobot_create_ignition/irobot_create_ignition_bringup/package.xml b/irobot_create_ignition/irobot_create_ignition_bringup/package.xml index d44ab6b6..588bb28a 100644 --- a/irobot_create_ignition/irobot_create_ignition_bringup/package.xml +++ b/irobot_create_ignition/irobot_create_ignition_bringup/package.xml @@ -2,7 +2,7 @@ irobot_create_ignition_bringup - 1.0.1 + 1.0.2 Provides launch and configuration scripts for a Ignition simulated iRobot(R) Create(R) 3 Educational Robot. rkreinin BSD diff --git a/irobot_create_ignition/irobot_create_ignition_plugins/CHANGELOG.rst b/irobot_create_ignition/irobot_create_ignition_plugins/CHANGELOG.rst index ea5d4420..fb89a599 100644 --- a/irobot_create_ignition/irobot_create_ignition_plugins/CHANGELOG.rst +++ b/irobot_create_ignition/irobot_create_ignition_plugins/CHANGELOG.rst @@ -8,8 +8,8 @@ Changelog for package irobot_create_ignition_plugins * add boost as explicit dependency and remove unnneded boost usage * do not search for boost component in Boost library -Forthcoming ------------ +1.0.2 (2022-05-05) +------------------ * 1.0.1 * update changelog * Contributors: Alberto Soragna diff --git a/irobot_create_ignition/irobot_create_ignition_plugins/package.xml b/irobot_create_ignition/irobot_create_ignition_plugins/package.xml index c1511fdf..395a7e1d 100644 --- a/irobot_create_ignition/irobot_create_ignition_plugins/package.xml +++ b/irobot_create_ignition/irobot_create_ignition_plugins/package.xml @@ -2,7 +2,7 @@ irobot_create_ignition_plugins - 1.0.1 + 1.0.2 Ignition plugins for simulated iRobot(R) Create(R) 3 Educational Robot. rkreinin BSD diff --git a/irobot_create_ignition/irobot_create_ignition_sim/CHANGELOG.rst b/irobot_create_ignition/irobot_create_ignition_sim/CHANGELOG.rst index 57a13202..36edf26e 100644 --- a/irobot_create_ignition/irobot_create_ignition_sim/CHANGELOG.rst +++ b/irobot_create_ignition/irobot_create_ignition_sim/CHANGELOG.rst @@ -2,8 +2,8 @@ Changelog for package irobot_create_ignition_sim ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Forthcoming ------------ +1.0.2 (2022-05-05) +------------------ * fix dependency tree of create3_sim packages (`#177 `_) * update changelog * Contributors: Alberto Soragna diff --git a/irobot_create_ignition/irobot_create_ignition_sim/package.xml b/irobot_create_ignition/irobot_create_ignition_sim/package.xml index ce7f7d08..a3ac08c0 100644 --- a/irobot_create_ignition/irobot_create_ignition_sim/package.xml +++ b/irobot_create_ignition/irobot_create_ignition_sim/package.xml @@ -2,7 +2,7 @@ irobot_create_ignition_sim - 1.0.1 + 1.0.2 Metapackage for the iRobot(R) Create(R) 3 robot Ignition simulator rkreinin diff --git a/irobot_create_ignition/irobot_create_ignition_toolbox/CHANGELOG.rst b/irobot_create_ignition/irobot_create_ignition_toolbox/CHANGELOG.rst index 6dc6e778..31dffd0b 100644 --- a/irobot_create_ignition/irobot_create_ignition_toolbox/CHANGELOG.rst +++ b/irobot_create_ignition/irobot_create_ignition_toolbox/CHANGELOG.rst @@ -2,8 +2,8 @@ Changelog for package irobot_create_ignition_toolbox ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Forthcoming ------------ +1.0.2 (2022-05-05) +------------------ * Renamed Ignition Toolbox libraries (`#178 `_) * Renamed Ignition Toolbox libraries * Pre-pend library names with irobot_create_ignition diff --git a/irobot_create_ignition/irobot_create_ignition_toolbox/package.xml b/irobot_create_ignition/irobot_create_ignition_toolbox/package.xml index 07b85ae7..deb433b8 100644 --- a/irobot_create_ignition/irobot_create_ignition_toolbox/package.xml +++ b/irobot_create_ignition/irobot_create_ignition_toolbox/package.xml @@ -2,7 +2,7 @@ irobot_create_ignition_toolbox - 1.0.1 + 1.0.2 Nodes and tools for simulating in Ignition iRobot(R) Create(R) 3 Educational Robot. rkreinin BSD From 5b65541cd41b80ea0dacfa14510cd8d59d664c9e Mon Sep 17 00:00:00 2001 From: Alberto Soragna Date: Thu, 5 May 2022 12:30:19 -0700 Subject: [PATCH 05/44] update changelog --- .../irobot_create_common_bringup/CHANGELOG.rst | 3 +++ .../irobot_create_control/CHANGELOG.rst | 3 +++ .../irobot_create_description/CHANGELOG.rst | 3 +++ .../irobot_create_nodes/CHANGELOG.rst | 3 +++ .../irobot_create_toolbox/CHANGELOG.rst | 3 +++ .../irobot_create_gazebo_bringup/CHANGELOG.rst | 15 ++++++++++----- .../irobot_create_gazebo_plugins/CHANGELOG.rst | 3 +++ .../irobot_create_gazebo_sim/CHANGELOG.rst | 13 ++++++++----- .../irobot_create_ignition_bringup/CHANGELOG.rst | 5 +++++ .../irobot_create_ignition_plugins/CHANGELOG.rst | 15 ++++++++++----- .../irobot_create_ignition_sim/CHANGELOG.rst | 3 +++ .../irobot_create_ignition_toolbox/CHANGELOG.rst | 3 +++ 12 files changed, 57 insertions(+), 15 deletions(-) diff --git a/irobot_create_common/irobot_create_common_bringup/CHANGELOG.rst b/irobot_create_common/irobot_create_common_bringup/CHANGELOG.rst index 1d976eb0..cc33b39d 100644 --- a/irobot_create_common/irobot_create_common_bringup/CHANGELOG.rst +++ b/irobot_create_common/irobot_create_common_bringup/CHANGELOG.rst @@ -2,6 +2,9 @@ Changelog for package irobot_create_common_bringup ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Forthcoming +----------- + 1.0.2 (2022-05-05) ------------------ * update changelog diff --git a/irobot_create_common/irobot_create_control/CHANGELOG.rst b/irobot_create_common/irobot_create_control/CHANGELOG.rst index 8e3710d7..0b1bef92 100644 --- a/irobot_create_common/irobot_create_control/CHANGELOG.rst +++ b/irobot_create_common/irobot_create_control/CHANGELOG.rst @@ -2,6 +2,9 @@ Changelog for package irobot_create_control ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Forthcoming +----------- + 1.0.2 (2022-05-05) ------------------ * fix dependency tree of create3_sim packages (`#177 `_) diff --git a/irobot_create_common/irobot_create_description/CHANGELOG.rst b/irobot_create_common/irobot_create_description/CHANGELOG.rst index 8ae8689e..083db669 100644 --- a/irobot_create_common/irobot_create_description/CHANGELOG.rst +++ b/irobot_create_common/irobot_create_description/CHANGELOG.rst @@ -2,6 +2,9 @@ Changelog for package irobot_create_description ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Forthcoming +----------- + 1.0.2 (2022-05-05) ------------------ * fix dependency tree of create3_sim packages (`#177 `_) diff --git a/irobot_create_common/irobot_create_nodes/CHANGELOG.rst b/irobot_create_common/irobot_create_nodes/CHANGELOG.rst index 8e917f7f..e328286a 100644 --- a/irobot_create_common/irobot_create_nodes/CHANGELOG.rst +++ b/irobot_create_common/irobot_create_nodes/CHANGELOG.rst @@ -2,6 +2,9 @@ Changelog for package irobot_create_nodes ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Forthcoming +----------- + 1.0.2 (2022-05-05) ------------------ * update changelog diff --git a/irobot_create_common/irobot_create_toolbox/CHANGELOG.rst b/irobot_create_common/irobot_create_toolbox/CHANGELOG.rst index dd8bcafc..1b929f8e 100644 --- a/irobot_create_common/irobot_create_toolbox/CHANGELOG.rst +++ b/irobot_create_common/irobot_create_toolbox/CHANGELOG.rst @@ -2,6 +2,9 @@ Changelog for package irobot_create_toolbox ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Forthcoming +----------- + 1.0.2 (2022-05-05) ------------------ * update changelog diff --git a/irobot_create_gazebo/irobot_create_gazebo_bringup/CHANGELOG.rst b/irobot_create_gazebo/irobot_create_gazebo_bringup/CHANGELOG.rst index ae9e7a0f..55b5b136 100644 --- a/irobot_create_gazebo/irobot_create_gazebo_bringup/CHANGELOG.rst +++ b/irobot_create_gazebo/irobot_create_gazebo_bringup/CHANGELOG.rst @@ -2,11 +2,10 @@ Changelog for package irobot_create_gazebo_bringup ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -1.0.1 (2022-04-12) ------------------- -* add boost as explicit dependency and remove unnneded boost usage (`#175 `_) - * add boost as explicit dependency and remove unnneded boost usage - * do not search for boost component in Boost library +Forthcoming +----------- +* make gazebo classic and ignition build time dependency if they are needed by CMakeLists.txt (`#179 `_) +* Contributors: Alberto Soragna 1.0.2 (2022-05-05) ------------------ @@ -16,6 +15,12 @@ Changelog for package irobot_create_gazebo_bringup * update changelog * Contributors: Alberto Soragna, crthilakraj +1.0.1 (2022-04-12) +------------------ +* add boost as explicit dependency and remove unnneded boost usage (`#175 `_) + * add boost as explicit dependency and remove unnneded boost usage + * do not search for boost component in Boost library + 1.0.0 (2022-03-31) ------------------ * Add audio action and move UI elements to ui_mgr node (`#172 `_) diff --git a/irobot_create_gazebo/irobot_create_gazebo_plugins/CHANGELOG.rst b/irobot_create_gazebo/irobot_create_gazebo_plugins/CHANGELOG.rst index c4cf840e..1fe2ce2c 100644 --- a/irobot_create_gazebo/irobot_create_gazebo_plugins/CHANGELOG.rst +++ b/irobot_create_gazebo/irobot_create_gazebo_plugins/CHANGELOG.rst @@ -2,6 +2,9 @@ Changelog for package irobot_create_gazebo_plugins ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Forthcoming +----------- + 1.0.2 (2022-05-05) ------------------ * update changelog diff --git a/irobot_create_gazebo/irobot_create_gazebo_sim/CHANGELOG.rst b/irobot_create_gazebo/irobot_create_gazebo_sim/CHANGELOG.rst index 6e1c19cf..6a21fe4b 100644 --- a/irobot_create_gazebo/irobot_create_gazebo_sim/CHANGELOG.rst +++ b/irobot_create_gazebo/irobot_create_gazebo_sim/CHANGELOG.rst @@ -2,11 +2,8 @@ Changelog for package irobot_create_gazebo_sim ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -1.0.1 (2022-04-12) ------------------- -* add boost as explicit dependency and remove unnneded boost usage (`#175 `_) - * add boost as explicit dependency and remove unnneded boost usage - * do not search for boost component in Boost library +Forthcoming +----------- 1.0.2 (2022-05-05) ------------------ @@ -15,6 +12,12 @@ Changelog for package irobot_create_gazebo_sim * update changelog * Contributors: Alberto Soragna +1.0.1 (2022-04-12) +------------------ +* add boost as explicit dependency and remove unnneded boost usage (`#175 `_) + * add boost as explicit dependency and remove unnneded boost usage + * do not search for boost component in Boost library + 1.0.0 (2022-03-31) ------------------ * Split `irobot_create_toolbox` (`#153 `_) diff --git a/irobot_create_ignition/irobot_create_ignition_bringup/CHANGELOG.rst b/irobot_create_ignition/irobot_create_ignition_bringup/CHANGELOG.rst index 84fc894c..49295b4c 100644 --- a/irobot_create_ignition/irobot_create_ignition_bringup/CHANGELOG.rst +++ b/irobot_create_ignition/irobot_create_ignition_bringup/CHANGELOG.rst @@ -2,6 +2,11 @@ Changelog for package irobot_create_ignition_bringup ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Forthcoming +----------- +* make gazebo classic and ignition build time dependency if they are needed by CMakeLists.txt (`#179 `_) +* Contributors: Alberto Soragna + 1.0.2 (2022-05-05) ------------------ * fix dependency tree of create3_sim packages (`#177 `_) diff --git a/irobot_create_ignition/irobot_create_ignition_plugins/CHANGELOG.rst b/irobot_create_ignition/irobot_create_ignition_plugins/CHANGELOG.rst index fb89a599..4c0f309f 100644 --- a/irobot_create_ignition/irobot_create_ignition_plugins/CHANGELOG.rst +++ b/irobot_create_ignition/irobot_create_ignition_plugins/CHANGELOG.rst @@ -2,11 +2,10 @@ Changelog for package irobot_create_ignition_plugins ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -1.0.1 (2022-04-12) ------------------- -* add boost as explicit dependency and remove unnneded boost usage (`#175 `_) - * add boost as explicit dependency and remove unnneded boost usage - * do not search for boost component in Boost library +Forthcoming +----------- +* make gazebo classic and ignition build time dependency if they are needed by CMakeLists.txt (`#179 `_) +* Contributors: Alberto Soragna 1.0.2 (2022-05-05) ------------------ @@ -14,6 +13,12 @@ Changelog for package irobot_create_ignition_plugins * update changelog * Contributors: Alberto Soragna +1.0.1 (2022-04-12) +------------------ +* add boost as explicit dependency and remove unnneded boost usage (`#175 `_) + * add boost as explicit dependency and remove unnneded boost usage + * do not search for boost component in Boost library + 1.0.0 (2022-03-31) ------------------ * Ignition Gazebo support (`#144 `_) diff --git a/irobot_create_ignition/irobot_create_ignition_sim/CHANGELOG.rst b/irobot_create_ignition/irobot_create_ignition_sim/CHANGELOG.rst index 36edf26e..36086456 100644 --- a/irobot_create_ignition/irobot_create_ignition_sim/CHANGELOG.rst +++ b/irobot_create_ignition/irobot_create_ignition_sim/CHANGELOG.rst @@ -2,6 +2,9 @@ Changelog for package irobot_create_ignition_sim ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Forthcoming +----------- + 1.0.2 (2022-05-05) ------------------ * fix dependency tree of create3_sim packages (`#177 `_) diff --git a/irobot_create_ignition/irobot_create_ignition_toolbox/CHANGELOG.rst b/irobot_create_ignition/irobot_create_ignition_toolbox/CHANGELOG.rst index 31dffd0b..39ef5768 100644 --- a/irobot_create_ignition/irobot_create_ignition_toolbox/CHANGELOG.rst +++ b/irobot_create_ignition/irobot_create_ignition_toolbox/CHANGELOG.rst @@ -2,6 +2,9 @@ Changelog for package irobot_create_ignition_toolbox ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Forthcoming +----------- + 1.0.2 (2022-05-05) ------------------ * Renamed Ignition Toolbox libraries (`#178 `_) From 88458bdd7adeb3d536268441f85dec35cab2ea09 Mon Sep 17 00:00:00 2001 From: Alberto Soragna Date: Thu, 5 May 2022 12:32:09 -0700 Subject: [PATCH 06/44] 1.0.3 --- .../irobot_create_common_bringup/CHANGELOG.rst | 4 ++-- irobot_create_common/irobot_create_common_bringup/package.xml | 2 +- irobot_create_common/irobot_create_control/CHANGELOG.rst | 4 ++-- irobot_create_common/irobot_create_control/package.xml | 2 +- irobot_create_common/irobot_create_description/CHANGELOG.rst | 4 ++-- irobot_create_common/irobot_create_description/package.xml | 2 +- irobot_create_common/irobot_create_nodes/CHANGELOG.rst | 4 ++-- irobot_create_common/irobot_create_nodes/package.xml | 2 +- irobot_create_common/irobot_create_toolbox/CHANGELOG.rst | 4 ++-- irobot_create_common/irobot_create_toolbox/package.xml | 2 +- .../irobot_create_gazebo_bringup/CHANGELOG.rst | 4 ++-- irobot_create_gazebo/irobot_create_gazebo_bringup/package.xml | 2 +- .../irobot_create_gazebo_plugins/CHANGELOG.rst | 4 ++-- irobot_create_gazebo/irobot_create_gazebo_plugins/package.xml | 2 +- irobot_create_gazebo/irobot_create_gazebo_sim/CHANGELOG.rst | 4 ++-- irobot_create_gazebo/irobot_create_gazebo_sim/package.xml | 2 +- .../irobot_create_ignition_bringup/CHANGELOG.rst | 4 ++-- .../irobot_create_ignition_bringup/package.xml | 2 +- .../irobot_create_ignition_plugins/CHANGELOG.rst | 4 ++-- .../irobot_create_ignition_plugins/package.xml | 2 +- .../irobot_create_ignition_sim/CHANGELOG.rst | 4 ++-- irobot_create_ignition/irobot_create_ignition_sim/package.xml | 2 +- .../irobot_create_ignition_toolbox/CHANGELOG.rst | 4 ++-- .../irobot_create_ignition_toolbox/package.xml | 2 +- 24 files changed, 36 insertions(+), 36 deletions(-) diff --git a/irobot_create_common/irobot_create_common_bringup/CHANGELOG.rst b/irobot_create_common/irobot_create_common_bringup/CHANGELOG.rst index cc33b39d..ddb8d49f 100644 --- a/irobot_create_common/irobot_create_common_bringup/CHANGELOG.rst +++ b/irobot_create_common/irobot_create_common_bringup/CHANGELOG.rst @@ -2,8 +2,8 @@ Changelog for package irobot_create_common_bringup ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Forthcoming ------------ +1.0.3 (2022-05-05) +------------------ 1.0.2 (2022-05-05) ------------------ diff --git a/irobot_create_common/irobot_create_common_bringup/package.xml b/irobot_create_common/irobot_create_common_bringup/package.xml index f5d27bff..cfc62cbb 100644 --- a/irobot_create_common/irobot_create_common_bringup/package.xml +++ b/irobot_create_common/irobot_create_common_bringup/package.xml @@ -2,7 +2,7 @@ irobot_create_common_bringup - 1.0.2 + 1.0.3 Provides common launch and configuration scripts for a simulated iRobot(R) Create(R) 3 Educational Robot. Ekumen BSD diff --git a/irobot_create_common/irobot_create_control/CHANGELOG.rst b/irobot_create_common/irobot_create_control/CHANGELOG.rst index 0b1bef92..7609a8e5 100644 --- a/irobot_create_common/irobot_create_control/CHANGELOG.rst +++ b/irobot_create_common/irobot_create_control/CHANGELOG.rst @@ -2,8 +2,8 @@ Changelog for package irobot_create_control ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Forthcoming ------------ +1.0.3 (2022-05-05) +------------------ 1.0.2 (2022-05-05) ------------------ diff --git a/irobot_create_common/irobot_create_control/package.xml b/irobot_create_common/irobot_create_control/package.xml index 22076f6e..3bd6f9c8 100644 --- a/irobot_create_common/irobot_create_control/package.xml +++ b/irobot_create_common/irobot_create_control/package.xml @@ -2,7 +2,7 @@ irobot_create_control - 1.0.2 + 1.0.3 Provides the diff-drive controller for the iRobot(R) Create(R) 3 Educational Robot. Ekumen BSD diff --git a/irobot_create_common/irobot_create_description/CHANGELOG.rst b/irobot_create_common/irobot_create_description/CHANGELOG.rst index 083db669..7cf4149e 100644 --- a/irobot_create_common/irobot_create_description/CHANGELOG.rst +++ b/irobot_create_common/irobot_create_description/CHANGELOG.rst @@ -2,8 +2,8 @@ Changelog for package irobot_create_description ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Forthcoming ------------ +1.0.3 (2022-05-05) +------------------ 1.0.2 (2022-05-05) ------------------ diff --git a/irobot_create_common/irobot_create_description/package.xml b/irobot_create_common/irobot_create_description/package.xml index 4bdaab12..234b3faf 100644 --- a/irobot_create_common/irobot_create_description/package.xml +++ b/irobot_create_common/irobot_create_description/package.xml @@ -2,7 +2,7 @@ irobot_create_description - 1.0.2 + 1.0.3 Provides the model description for the iRobot(R) Create(R) 3 Educational Robot. Ekumen BSD diff --git a/irobot_create_common/irobot_create_nodes/CHANGELOG.rst b/irobot_create_common/irobot_create_nodes/CHANGELOG.rst index e328286a..cc443254 100644 --- a/irobot_create_common/irobot_create_nodes/CHANGELOG.rst +++ b/irobot_create_common/irobot_create_nodes/CHANGELOG.rst @@ -2,8 +2,8 @@ Changelog for package irobot_create_nodes ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Forthcoming ------------ +1.0.3 (2022-05-05) +------------------ 1.0.2 (2022-05-05) ------------------ diff --git a/irobot_create_common/irobot_create_nodes/package.xml b/irobot_create_common/irobot_create_nodes/package.xml index 4f1cff48..e4ef209a 100644 --- a/irobot_create_common/irobot_create_nodes/package.xml +++ b/irobot_create_common/irobot_create_nodes/package.xml @@ -2,7 +2,7 @@ irobot_create_nodes - 1.0.2 + 1.0.3 ROS 2 Nodes for the simulated iRobot(R) Create(R) 3 Educational Robot. Ekumen BSD diff --git a/irobot_create_common/irobot_create_toolbox/CHANGELOG.rst b/irobot_create_common/irobot_create_toolbox/CHANGELOG.rst index 1b929f8e..c4f06867 100644 --- a/irobot_create_common/irobot_create_toolbox/CHANGELOG.rst +++ b/irobot_create_common/irobot_create_toolbox/CHANGELOG.rst @@ -2,8 +2,8 @@ Changelog for package irobot_create_toolbox ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Forthcoming ------------ +1.0.3 (2022-05-05) +------------------ 1.0.2 (2022-05-05) ------------------ diff --git a/irobot_create_common/irobot_create_toolbox/package.xml b/irobot_create_common/irobot_create_toolbox/package.xml index 44523668..33d048bc 100644 --- a/irobot_create_common/irobot_create_toolbox/package.xml +++ b/irobot_create_common/irobot_create_toolbox/package.xml @@ -2,7 +2,7 @@ irobot_create_toolbox - 1.0.2 + 1.0.3 Components and helpers for the iRobot(R) Create(R) 3 Educational Robot. Ekumen BSD diff --git a/irobot_create_gazebo/irobot_create_gazebo_bringup/CHANGELOG.rst b/irobot_create_gazebo/irobot_create_gazebo_bringup/CHANGELOG.rst index 55b5b136..980aaac7 100644 --- a/irobot_create_gazebo/irobot_create_gazebo_bringup/CHANGELOG.rst +++ b/irobot_create_gazebo/irobot_create_gazebo_bringup/CHANGELOG.rst @@ -2,8 +2,8 @@ Changelog for package irobot_create_gazebo_bringup ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Forthcoming ------------ +1.0.3 (2022-05-05) +------------------ * make gazebo classic and ignition build time dependency if they are needed by CMakeLists.txt (`#179 `_) * Contributors: Alberto Soragna diff --git a/irobot_create_gazebo/irobot_create_gazebo_bringup/package.xml b/irobot_create_gazebo/irobot_create_gazebo_bringup/package.xml index 1ea126d4..c54dc835 100644 --- a/irobot_create_gazebo/irobot_create_gazebo_bringup/package.xml +++ b/irobot_create_gazebo/irobot_create_gazebo_bringup/package.xml @@ -2,7 +2,7 @@ irobot_create_gazebo_bringup - 1.0.2 + 1.0.3 Provides launch and configuration scripts for a Gazebo simulated iRobot(R) Create(R) 3 Educational Robot. Ekumen BSD diff --git a/irobot_create_gazebo/irobot_create_gazebo_plugins/CHANGELOG.rst b/irobot_create_gazebo/irobot_create_gazebo_plugins/CHANGELOG.rst index 1fe2ce2c..8fdf9f92 100644 --- a/irobot_create_gazebo/irobot_create_gazebo_plugins/CHANGELOG.rst +++ b/irobot_create_gazebo/irobot_create_gazebo_plugins/CHANGELOG.rst @@ -2,8 +2,8 @@ Changelog for package irobot_create_gazebo_plugins ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Forthcoming ------------ +1.0.3 (2022-05-05) +------------------ 1.0.2 (2022-05-05) ------------------ diff --git a/irobot_create_gazebo/irobot_create_gazebo_plugins/package.xml b/irobot_create_gazebo/irobot_create_gazebo_plugins/package.xml index dd14c858..d2c7a74c 100644 --- a/irobot_create_gazebo/irobot_create_gazebo_plugins/package.xml +++ b/irobot_create_gazebo/irobot_create_gazebo_plugins/package.xml @@ -2,7 +2,7 @@ irobot_create_gazebo_plugins - 1.0.2 + 1.0.3 Provides the Gazebo plugins for the iRobot(R) Create(R) 3 Educational Robot. Ekumen BSD diff --git a/irobot_create_gazebo/irobot_create_gazebo_sim/CHANGELOG.rst b/irobot_create_gazebo/irobot_create_gazebo_sim/CHANGELOG.rst index 6a21fe4b..132b118f 100644 --- a/irobot_create_gazebo/irobot_create_gazebo_sim/CHANGELOG.rst +++ b/irobot_create_gazebo/irobot_create_gazebo_sim/CHANGELOG.rst @@ -2,8 +2,8 @@ Changelog for package irobot_create_gazebo_sim ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Forthcoming ------------ +1.0.3 (2022-05-05) +------------------ 1.0.2 (2022-05-05) ------------------ diff --git a/irobot_create_gazebo/irobot_create_gazebo_sim/package.xml b/irobot_create_gazebo/irobot_create_gazebo_sim/package.xml index f8cb5193..4caa465e 100644 --- a/irobot_create_gazebo/irobot_create_gazebo_sim/package.xml +++ b/irobot_create_gazebo/irobot_create_gazebo_sim/package.xml @@ -2,7 +2,7 @@ irobot_create_gazebo_sim - 1.0.2 + 1.0.3 Metapackage for the iRobot(R) Create(R) 3 robot Gazebo simulatorGazebo simulation stack. Ekumen diff --git a/irobot_create_ignition/irobot_create_ignition_bringup/CHANGELOG.rst b/irobot_create_ignition/irobot_create_ignition_bringup/CHANGELOG.rst index 49295b4c..f10853d0 100644 --- a/irobot_create_ignition/irobot_create_ignition_bringup/CHANGELOG.rst +++ b/irobot_create_ignition/irobot_create_ignition_bringup/CHANGELOG.rst @@ -2,8 +2,8 @@ Changelog for package irobot_create_ignition_bringup ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Forthcoming ------------ +1.0.3 (2022-05-05) +------------------ * make gazebo classic and ignition build time dependency if they are needed by CMakeLists.txt (`#179 `_) * Contributors: Alberto Soragna diff --git a/irobot_create_ignition/irobot_create_ignition_bringup/package.xml b/irobot_create_ignition/irobot_create_ignition_bringup/package.xml index 588bb28a..0501b803 100644 --- a/irobot_create_ignition/irobot_create_ignition_bringup/package.xml +++ b/irobot_create_ignition/irobot_create_ignition_bringup/package.xml @@ -2,7 +2,7 @@ irobot_create_ignition_bringup - 1.0.2 + 1.0.3 Provides launch and configuration scripts for a Ignition simulated iRobot(R) Create(R) 3 Educational Robot. rkreinin BSD diff --git a/irobot_create_ignition/irobot_create_ignition_plugins/CHANGELOG.rst b/irobot_create_ignition/irobot_create_ignition_plugins/CHANGELOG.rst index 4c0f309f..5a17ef7b 100644 --- a/irobot_create_ignition/irobot_create_ignition_plugins/CHANGELOG.rst +++ b/irobot_create_ignition/irobot_create_ignition_plugins/CHANGELOG.rst @@ -2,8 +2,8 @@ Changelog for package irobot_create_ignition_plugins ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Forthcoming ------------ +1.0.3 (2022-05-05) +------------------ * make gazebo classic and ignition build time dependency if they are needed by CMakeLists.txt (`#179 `_) * Contributors: Alberto Soragna diff --git a/irobot_create_ignition/irobot_create_ignition_plugins/package.xml b/irobot_create_ignition/irobot_create_ignition_plugins/package.xml index 395a7e1d..37331666 100644 --- a/irobot_create_ignition/irobot_create_ignition_plugins/package.xml +++ b/irobot_create_ignition/irobot_create_ignition_plugins/package.xml @@ -2,7 +2,7 @@ irobot_create_ignition_plugins - 1.0.2 + 1.0.3 Ignition plugins for simulated iRobot(R) Create(R) 3 Educational Robot. rkreinin BSD diff --git a/irobot_create_ignition/irobot_create_ignition_sim/CHANGELOG.rst b/irobot_create_ignition/irobot_create_ignition_sim/CHANGELOG.rst index 36086456..f17ad722 100644 --- a/irobot_create_ignition/irobot_create_ignition_sim/CHANGELOG.rst +++ b/irobot_create_ignition/irobot_create_ignition_sim/CHANGELOG.rst @@ -2,8 +2,8 @@ Changelog for package irobot_create_ignition_sim ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Forthcoming ------------ +1.0.3 (2022-05-05) +------------------ 1.0.2 (2022-05-05) ------------------ diff --git a/irobot_create_ignition/irobot_create_ignition_sim/package.xml b/irobot_create_ignition/irobot_create_ignition_sim/package.xml index a3ac08c0..7eda7b41 100644 --- a/irobot_create_ignition/irobot_create_ignition_sim/package.xml +++ b/irobot_create_ignition/irobot_create_ignition_sim/package.xml @@ -2,7 +2,7 @@ irobot_create_ignition_sim - 1.0.2 + 1.0.3 Metapackage for the iRobot(R) Create(R) 3 robot Ignition simulator rkreinin diff --git a/irobot_create_ignition/irobot_create_ignition_toolbox/CHANGELOG.rst b/irobot_create_ignition/irobot_create_ignition_toolbox/CHANGELOG.rst index 39ef5768..916277ff 100644 --- a/irobot_create_ignition/irobot_create_ignition_toolbox/CHANGELOG.rst +++ b/irobot_create_ignition/irobot_create_ignition_toolbox/CHANGELOG.rst @@ -2,8 +2,8 @@ Changelog for package irobot_create_ignition_toolbox ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Forthcoming ------------ +1.0.3 (2022-05-05) +------------------ 1.0.2 (2022-05-05) ------------------ diff --git a/irobot_create_ignition/irobot_create_ignition_toolbox/package.xml b/irobot_create_ignition/irobot_create_ignition_toolbox/package.xml index deb433b8..b947816c 100644 --- a/irobot_create_ignition/irobot_create_ignition_toolbox/package.xml +++ b/irobot_create_ignition/irobot_create_ignition_toolbox/package.xml @@ -2,7 +2,7 @@ irobot_create_ignition_toolbox - 1.0.2 + 1.0.3 Nodes and tools for simulating in Ignition iRobot(R) Create(R) 3 Educational Robot. rkreinin BSD From 69030efe993bbbe0089160b1406e04855f0b63e0 Mon Sep 17 00:00:00 2001 From: Alberto Soragna Date: Fri, 8 Apr 2022 21:21:13 +0100 Subject: [PATCH 07/44] remove ignition-ros2-control from dependencies.repos this is now available via rosdep (#173) Signed-off-by: Alberto Soragna --- dependencies.repos | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 dependencies.repos diff --git a/dependencies.repos b/dependencies.repos new file mode 100644 index 00000000..06a568cd --- /dev/null +++ b/dependencies.repos @@ -0,0 +1,5 @@ +repositories: + irobot_create_msgs: + type: git + url: https://github.com/iRobotEducation/irobot_create_msgs.git + version: 1.2.4 From 0327e8be2ab9f7d3c01feb6f3da7cfa4300b6430 Mon Sep 17 00:00:00 2001 From: Alberto Soragna Date: Mon, 20 Jun 2022 08:41:13 +0100 Subject: [PATCH 08/44] remove dependencies.repos file now that irobot_create_msgs has been released (#183) Signed-off-by: Alberto Soragna --- dependencies.repos | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 dependencies.repos diff --git a/dependencies.repos b/dependencies.repos deleted file mode 100644 index 06a568cd..00000000 --- a/dependencies.repos +++ /dev/null @@ -1,5 +0,0 @@ -repositories: - irobot_create_msgs: - type: git - url: https://github.com/iRobotEducation/irobot_create_msgs.git - version: 1.2.4 From 55b7c399c157bb9995055c69c0c9ba6ad34879ce Mon Sep 17 00:00:00 2001 From: Hugo Tardiou Date: Wed, 13 Apr 2022 14:42:13 +0200 Subject: [PATCH 09/44] WIP multi-robot simulation unified robot spawn file and clean up xacro fix revert change in config files offset_parser module moved to irobot_create_common_bringup gazebo spawner launch offset parser separate pkg OffsetParser in irobot_create_common_bringup Lint / testing / cleaning linting more small fixes to namespaces arguments Signed-off-by: Alberto Soragna remove not needed rclcpp and rclpy dependencies Signed-off-by: Alberto Soragna rviz namespace fix for robot description dock and cmd_vel gui namespaced lint import order namespace create3_nodes fix robot_description in rviz --- .../CMakeLists.txt | 4 + .../config/hazard_vector_params.yaml | 2 +- .../config/ir_intensity_vector_params.yaml | 2 +- .../config/kidnap_estimator_params.yaml | 2 +- .../config/mock_params.yaml | 2 +- .../config/robot_state_params.yaml | 2 +- .../config/ui_mgr_params.yaml | 2 +- .../config/wheel_status_params.yaml | 2 +- .../offset_parser.py | 18 +++ .../launch/create3_nodes.launch.py | 74 +++++++++++-- .../launch/dock_description.launch.py | 23 ++-- .../launch/robot_description.launch.py | 10 +- .../launch/rviz2.launch.py | 49 ++++++++- .../irobot_create_common_bringup/package.xml | 1 + .../resource/irobot_create_common_dock | 0 .../irobot_create_control/config/control.yaml | 4 +- .../launch/include/control.py | 21 +++- .../urdf/create3.urdf.xacro | 11 +- .../urdf/dock/standard_dock.urdf.xacro | 6 +- .../launch/create3_gazebo.launch.py | 74 ++++--------- .../launch/create3_gazebo_spawn.launch.py | 83 ++++++++++++++ .../launch/create3_ignition.launch.py | 90 +++++---------- .../launch/create3_ignition_nodes.launch.py | 9 +- .../create3_ros_ignition_bridge.launch.py | 13 ++- .../launch/create3_spawn.launch.py | 104 ++++++++++++++++++ 25 files changed, 446 insertions(+), 162 deletions(-) create mode 100644 irobot_create_common/irobot_create_common_bringup/irobot_create_common_bringup/offset_parser.py create mode 100644 irobot_create_common/irobot_create_common_dock/resource/irobot_create_common_dock create mode 100644 irobot_create_gazebo/irobot_create_gazebo_bringup/launch/create3_gazebo_spawn.launch.py create mode 100644 irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_spawn.launch.py diff --git a/irobot_create_common/irobot_create_common_bringup/CMakeLists.txt b/irobot_create_common/irobot_create_common_bringup/CMakeLists.txt index caa2b70e..cc7942f5 100644 --- a/irobot_create_common/irobot_create_common_bringup/CMakeLists.txt +++ b/irobot_create_common/irobot_create_common_bringup/CMakeLists.txt @@ -11,6 +11,7 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") endif() find_package(ament_cmake REQUIRED) +find_package(ament_cmake_python REQUIRED) install( DIRECTORY @@ -21,6 +22,9 @@ install( share/${PROJECT_NAME} ) +# Install Python modules +ament_python_install_package(${PROJECT_NAME}) + if(BUILD_TESTING) find_package(ament_lint_auto REQUIRED) ament_lint_auto_find_test_dependencies() diff --git a/irobot_create_common/irobot_create_common_bringup/config/hazard_vector_params.yaml b/irobot_create_common/irobot_create_common_bringup/config/hazard_vector_params.yaml index 6e4d5691..4b9b02d8 100644 --- a/irobot_create_common/irobot_create_common_bringup/config/hazard_vector_params.yaml +++ b/irobot_create_common/irobot_create_common_bringup/config/hazard_vector_params.yaml @@ -1,5 +1,5 @@ --- -hazards_vector_publisher: +/**: ros__parameters: # Hazard detection publisher topic publisher_topic: /hazard_detection diff --git a/irobot_create_common/irobot_create_common_bringup/config/ir_intensity_vector_params.yaml b/irobot_create_common/irobot_create_common_bringup/config/ir_intensity_vector_params.yaml index 63f25408..85c7108c 100644 --- a/irobot_create_common/irobot_create_common_bringup/config/ir_intensity_vector_params.yaml +++ b/irobot_create_common/irobot_create_common_bringup/config/ir_intensity_vector_params.yaml @@ -1,5 +1,5 @@ --- -ir_intensity_vector_publisher: +/**: ros__parameters: # IR intensity publisher topic publisher_topic: /ir_intensity diff --git a/irobot_create_common/irobot_create_common_bringup/config/kidnap_estimator_params.yaml b/irobot_create_common/irobot_create_common_bringup/config/kidnap_estimator_params.yaml index 37906ab4..7a927eea 100644 --- a/irobot_create_common/irobot_create_common_bringup/config/kidnap_estimator_params.yaml +++ b/irobot_create_common/irobot_create_common_bringup/config/kidnap_estimator_params.yaml @@ -1,5 +1,5 @@ --- -kidnap_estimator_publisher: +/**: ros__parameters: # Kidnap status publisher topic kidnap_status_topic: /kidnap_status diff --git a/irobot_create_common/irobot_create_common_bringup/config/mock_params.yaml b/irobot_create_common/irobot_create_common_bringup/config/mock_params.yaml index 3a300bb7..edfde6ae 100644 --- a/irobot_create_common/irobot_create_common_bringup/config/mock_params.yaml +++ b/irobot_create_common/irobot_create_common_bringup/config/mock_params.yaml @@ -1,5 +1,5 @@ --- -mock_publisher: +/**: ros__parameters: # Mock slip status publisher topic slip_status_topic: /slip_status diff --git a/irobot_create_common/irobot_create_common_bringup/config/robot_state_params.yaml b/irobot_create_common/irobot_create_common_bringup/config/robot_state_params.yaml index 00977a37..b0c29c3d 100644 --- a/irobot_create_common/irobot_create_common_bringup/config/robot_state_params.yaml +++ b/irobot_create_common/irobot_create_common_bringup/config/robot_state_params.yaml @@ -1,5 +1,5 @@ --- -robot_state: +/**: ros__parameters: # Stop status publisher topic stop_status_topic: /stop_status diff --git a/irobot_create_common/irobot_create_common_bringup/config/ui_mgr_params.yaml b/irobot_create_common/irobot_create_common_bringup/config/ui_mgr_params.yaml index 34a07346..47dfc205 100644 --- a/irobot_create_common/irobot_create_common_bringup/config/ui_mgr_params.yaml +++ b/irobot_create_common/irobot_create_common_bringup/config/ui_mgr_params.yaml @@ -1,5 +1,5 @@ --- -ui_mgr: +/**: ros__parameters: # Buttons publisher topic button_topic: /interface_buttons diff --git a/irobot_create_common/irobot_create_common_bringup/config/wheel_status_params.yaml b/irobot_create_common/irobot_create_common_bringup/config/wheel_status_params.yaml index 92e5e3a7..28fb7c52 100644 --- a/irobot_create_common/irobot_create_common_bringup/config/wheel_status_params.yaml +++ b/irobot_create_common/irobot_create_common_bringup/config/wheel_status_params.yaml @@ -1,5 +1,5 @@ --- -wheel_status_publisher: +/**: ros__parameters: # Publish rate publish_rate: 62.0 diff --git a/irobot_create_common/irobot_create_common_bringup/irobot_create_common_bringup/offset_parser.py b/irobot_create_common/irobot_create_common_bringup/irobot_create_common_bringup/offset_parser.py new file mode 100644 index 00000000..0a9f6ac8 --- /dev/null +++ b/irobot_create_common/irobot_create_common_bringup/irobot_create_common_bringup/offset_parser.py @@ -0,0 +1,18 @@ +from launch import LaunchContext, SomeSubstitutionsType, Substitution + + +class OffsetParser(Substitution): + def __init__( + self, + number: SomeSubstitutionsType, + offset: float, + ) -> None: + self.__number = number + self.__offset = offset + + def perform( + self, + context: LaunchContext = None, + ) -> str: + number = float(self.__number.perform(context)) + return f'{number + self.__offset}' diff --git a/irobot_create_common/irobot_create_common_bringup/launch/create3_nodes.launch.py b/irobot_create_common/irobot_create_common_bringup/launch/create3_nodes.launch.py index 50c3cee8..065eb922 100644 --- a/irobot_create_common/irobot_create_common_bringup/launch/create3_nodes.launch.py +++ b/irobot_create_common/irobot_create_common_bringup/launch/create3_nodes.launch.py @@ -10,11 +10,14 @@ from launch.launch_description_sources import PythonLaunchDescriptionSource from launch.substitutions import LaunchConfiguration, PathJoinSubstitution from launch_ros.actions import Node +from nav2_common.launch import ReplaceString ARGUMENTS = [ DeclareLaunchArgument('gazebo', default_value='classic', choices=['classic', 'ignition'], - description='Which gazebo simulator to use') + description='Which gazebo simulator to use'), + DeclareLaunchArgument('namespace', default_value='', + description='Robot namespace') ] @@ -44,15 +47,61 @@ def generate_launch_description(): # Includes diffdrive_controller = IncludeLaunchDescription( - PythonLaunchDescriptionSource([control_launch_file]) + PythonLaunchDescriptionSource([control_launch_file]), + launch_arguments=[('namespace', LaunchConfiguration('namespace'))] + ) + + namespace = LaunchConfiguration('namespace') + + namespaced_hazards_params_yaml_file = ReplaceString( + source_file=hazards_params_yaml_file, + replacements={'/hazard_detection': ('/', namespace, '/hazard_detection')} + ) + + namespaced_ir_intensity_params_yaml_file = ReplaceString( + source_file=ir_intensity_params_yaml_file, + replacements={'/ir_intensity': ('/', namespace, '/ir_intensity')} + ) + + namespaced_wheel_status_params_yaml_file = ReplaceString( + source_file=wheel_status_params_yaml_file, + replacements={'/wheel_vels': ('/', namespace, '/wheel_vels'), + '/wheel_ticks': ('/', namespace, '/wheel_ticks')} + ) + + namespaced_mock_params_yaml_file = ReplaceString( + source_file=mock_params_yaml_file, + replacements={'/slip_status': ('/', namespace, '/slip_status')} + ) + + namespaced_robot_state_yaml_file = ReplaceString( + source_file=robot_state_yaml_file, + replacements={'/stop_status': ('/', namespace, '/stop_status'), + '/battery_state': ('/', namespace, '/battery_state'), + '/dock': ('/', namespace, '/dock'), + '/odom': ('/', namespace, '/odom')} + ) + + namespaced_kidnap_estimator_yaml_file = ReplaceString( + source_file=kidnap_estimator_yaml_file, + replacements={'/kidnap_status': ('/', namespace, '/kidnap_status'), + '/hazard_detection': ('/', namespace, '/hazard_detection')} + ) + + namespaced_ui_mgr_params_yaml_file = ReplaceString( + source_file=ui_mgr_params_yaml_file, + replacements={'/interface_buttons': ('/', namespace, '/interface_buttons'), + '/cmd_lightring': ('/', namespace, '/cmd_lightring'), + '/cmd_audio': ('/', namespace, '/cmd_audio')} ) # Publish hazards vector hazards_vector_node = Node( package='irobot_create_nodes', name='hazards_vector_publisher', + namespace=namespace, executable='hazards_vector_publisher', - parameters=[hazards_params_yaml_file, + parameters=[namespaced_hazards_params_yaml_file, {'use_sim_time': True}], output='screen', ) @@ -61,8 +110,9 @@ def generate_launch_description(): ir_intensity_vector_node = Node( package='irobot_create_nodes', name='ir_intensity_vector_publisher', + namespace=namespace, executable='ir_intensity_vector_publisher', - parameters=[ir_intensity_params_yaml_file, + parameters=[namespaced_ir_intensity_params_yaml_file, {'use_sim_time': True}], output='screen', ) @@ -71,6 +121,7 @@ def generate_launch_description(): motion_control_node = Node( package='irobot_create_nodes', name='motion_control', + namespace=namespace, executable='motion_control', parameters=[{'use_sim_time': True}], output='screen', @@ -80,8 +131,9 @@ def generate_launch_description(): wheel_status_node = Node( package='irobot_create_nodes', name='wheel_status_publisher', + namespace=namespace, executable='wheel_status_publisher', - parameters=[wheel_status_params_yaml_file, + parameters=[namespaced_wheel_status_params_yaml_file, {'use_sim_time': True}], output='screen', ) @@ -90,8 +142,9 @@ def generate_launch_description(): mock_topics_node = Node( package='irobot_create_nodes', name='mock_publisher', + namespace=namespace, executable='mock_publisher', - parameters=[mock_params_yaml_file, + parameters=[namespaced_mock_params_yaml_file, {'use_sim_time': True}], output='screen', ) @@ -100,8 +153,9 @@ def generate_launch_description(): robot_state_node = Node( package='irobot_create_nodes', name='robot_state', + namespace=namespace, executable='robot_state', - parameters=[robot_state_yaml_file, + parameters=[namespaced_robot_state_yaml_file, {'use_sim_time': True}], output='screen', ) @@ -110,8 +164,9 @@ def generate_launch_description(): kidnap_estimator_node = Node( package='irobot_create_nodes', name='kidnap_estimator_publisher', + namespace=namespace, executable='kidnap_estimator_publisher', - parameters=[kidnap_estimator_yaml_file, + parameters=[namespaced_kidnap_estimator_yaml_file, {'use_sim_time': True}], output='screen', ) @@ -120,8 +175,9 @@ def generate_launch_description(): ui_mgr_node = Node( package='irobot_create_nodes', name='ui_mgr', + namespace=namespace, executable='ui_mgr', - parameters=[ui_mgr_params_yaml_file, + parameters=[namespaced_ui_mgr_params_yaml_file, {'use_sim_time': True}, {'gazebo': LaunchConfiguration('gazebo')}], output='screen', diff --git a/irobot_create_common/irobot_create_common_bringup/launch/dock_description.launch.py b/irobot_create_common/irobot_create_common_bringup/launch/dock_description.launch.py index 1df2116b..c5b93ae5 100644 --- a/irobot_create_common/irobot_create_common_bringup/launch/dock_description.launch.py +++ b/irobot_create_common/irobot_create_common_bringup/launch/dock_description.launch.py @@ -13,11 +13,13 @@ ARGUMENTS = [ DeclareLaunchArgument('gazebo', default_value='classic', choices=['classic', 'ignition'], - description='Which gazebo simulation to use') + description='Which gazebo simulation to use'), + DeclareLaunchArgument('namespace', default_value='', + description='Create3 namespace') ] for pose_element in ['x', 'y', 'z', 'yaw']: ARGUMENTS.append(DeclareLaunchArgument(f'{pose_element}', default_value='0.0', - description=f'{pose_element} component of the dock pose.')) + description=f'{pose_element} component of the dock pose.')) ARGUMENTS.append(DeclareLaunchArgument('visualize_rays', default_value='true', choices=['true', 'false'], @@ -26,16 +28,18 @@ def generate_launch_description(): # Directory - pkg_create3_description = get_package_share_directory('irobot_create_description') + pkg_create3_description = get_package_share_directory( + 'irobot_create_description') # Path dock_xacro_file = PathJoinSubstitution( [pkg_create3_description, 'urdf', 'dock', 'standard_dock.urdf.xacro']) # Launch Configurations - x, y, z = LaunchConfiguration('x'), LaunchConfiguration('y'), LaunchConfiguration('z') + x, y, z = LaunchConfiguration('x'), LaunchConfiguration( + 'y'), LaunchConfiguration('z') yaw = LaunchConfiguration('yaw') visualize_rays = LaunchConfiguration('visualize_rays') - + namespace = LaunchConfiguration('namespace') gazebo_simulator = LaunchConfiguration('gazebo') state_publisher = Node( @@ -47,12 +51,13 @@ def generate_launch_description(): {'use_sim_time': True}, {'robot_description': Command( - ['xacro', ' ', dock_xacro_file, ' ', - 'gazebo:=', gazebo_simulator, ' ', - 'visualize_rays:=', visualize_rays])}, + ['xacro', ' ', dock_xacro_file, ' ', + 'gazebo:=', gazebo_simulator, ' ', + 'visualize_rays:=', visualize_rays, ' ', + 'namespace:=', namespace, ' '])}, ], remappings=[ - ('robot_description', 'standard_dock_description'), + ('robot_description', (namespace, '/standard_dock_description')), ], ) diff --git a/irobot_create_common/irobot_create_common_bringup/launch/robot_description.launch.py b/irobot_create_common/irobot_create_common_bringup/launch/robot_description.launch.py index 06267d09..fc2fd44c 100644 --- a/irobot_create_common/irobot_create_common_bringup/launch/robot_description.launch.py +++ b/irobot_create_common/irobot_create_common_bringup/launch/robot_description.launch.py @@ -16,7 +16,9 @@ description='Which gazebo simulator to use'), DeclareLaunchArgument('visualize_rays', default_value='false', choices=['true', 'false'], - description='Enable/disable ray visualization') + description='Enable/disable ray visualization'), + DeclareLaunchArgument('namespace', default_value='', + description='Create3 namespace') ] @@ -25,11 +27,13 @@ def generate_launch_description(): xacro_file = PathJoinSubstitution([pkg_create3_description, 'urdf', 'create3.urdf.xacro']) gazebo_simulator = LaunchConfiguration('gazebo') visualize_rays = LaunchConfiguration('visualize_rays') + namespace = LaunchConfiguration('namespace') robot_state_publisher = Node( package='robot_state_publisher', executable='robot_state_publisher', name='robot_state_publisher', + namespace=LaunchConfiguration('namespace'), output='screen', parameters=[ {'use_sim_time': True}, @@ -37,7 +41,8 @@ def generate_launch_description(): Command( ['xacro', ' ', xacro_file, ' ', 'gazebo:=', gazebo_simulator, ' ', - 'visualize_rays:=', visualize_rays])}, + 'visualize_rays:=', visualize_rays, ' ', + 'namespace:=', namespace, ' '])}, ], ) @@ -45,6 +50,7 @@ def generate_launch_description(): package='joint_state_publisher', executable='joint_state_publisher', name='joint_state_publisher', + namespace=LaunchConfiguration('namespace'), output='screen', ) diff --git a/irobot_create_common/irobot_create_common_bringup/launch/rviz2.launch.py b/irobot_create_common/irobot_create_common_bringup/launch/rviz2.launch.py index 2fea187d..19fa37b3 100644 --- a/irobot_create_common/irobot_create_common_bringup/launch/rviz2.launch.py +++ b/irobot_create_common/irobot_create_common_bringup/launch/rviz2.launch.py @@ -5,18 +5,41 @@ from ament_index_python.packages import get_package_share_directory from launch import LaunchDescription -from launch.substitutions import PathJoinSubstitution +from launch.actions import DeclareLaunchArgument +from launch.conditions import LaunchConfigurationEquals, LaunchConfigurationNotEquals +from launch.substitutions import LaunchConfiguration, PathJoinSubstitution from launch_ros.actions import Node +from nav2_common.launch import ReplaceString + +ARGUMENTS = [ + DeclareLaunchArgument('namespace', default_value='', + description='robot namespace') +] def generate_launch_description(): - create_bringup = get_package_share_directory('irobot_create_common_bringup') + create_bringup = get_package_share_directory( + 'irobot_create_common_bringup') + + namespace = LaunchConfiguration('namespace') # Rviz - rviz_config = PathJoinSubstitution([create_bringup, 'rviz', 'irobot_create_view.rviz']) - rviz_logo = PathJoinSubstitution([create_bringup, 'rviz', 'irobot_logo.jpg']) + rviz_config = PathJoinSubstitution( + [create_bringup, 'rviz', 'irobot_create_view.rviz']) + rviz_logo = PathJoinSubstitution( + [create_bringup, 'rviz', 'irobot_logo.jpg']) + + namespaced_rviz_config_file = ReplaceString( + source_file=rviz_config, + replacements={'/robot_description': ('/', namespace, '/robot_description'), + '/standard_dock_description': ('/', namespace, '/standard_dock_description'), + '/initialpose': ('/', namespace, '/initialpose'), + '/clicked_point': ('/', namespace, '/clicked_point'), + '/goal_pose': ('/', namespace, '/goal_pose')} + ) rviz = Node( + condition=LaunchConfigurationEquals('namespace', ''), package='rviz2', executable='rviz2', name='rviz2', @@ -26,6 +49,24 @@ def generate_launch_description(): ] ) + rviz = Node( + condition=LaunchConfigurationNotEquals('namespace', ''), + package='rviz2', + executable='rviz2', + name='rviz2', + arguments=[ + '--display-config', namespaced_rviz_config_file, + '--splash-screen', rviz_logo, + ], + remappings=[ + ('/tf', 'tf'), + ('/tf_static', 'tf_static'), + ('/goal_pose', 'goal_pose'), + ('/clicked_point', 'clicked_point'), + ('/initialpose', 'initialpose') + ] + ) + # Define LaunchDescription variable ld = LaunchDescription() # Add nodes to LaunchDescription diff --git a/irobot_create_common/irobot_create_common_bringup/package.xml b/irobot_create_common/irobot_create_common_bringup/package.xml index cfc62cbb..d30bed41 100644 --- a/irobot_create_common/irobot_create_common_bringup/package.xml +++ b/irobot_create_common/irobot_create_common_bringup/package.xml @@ -10,6 +10,7 @@ iRobot ament_cmake + ament_cmake_python irobot_create_control irobot_create_description diff --git a/irobot_create_common/irobot_create_common_dock/resource/irobot_create_common_dock b/irobot_create_common/irobot_create_common_dock/resource/irobot_create_common_dock new file mode 100644 index 00000000..e69de29b diff --git a/irobot_create_common/irobot_create_control/config/control.yaml b/irobot_create_common/irobot_create_control/config/control.yaml index 31e64f5f..5b1ff9fb 100644 --- a/irobot_create_common/irobot_create_control/config/control.yaml +++ b/irobot_create_common/irobot_create_control/config/control.yaml @@ -1,4 +1,4 @@ -controller_manager: +/**: ros__parameters: update_rate: 1000 # Hz @@ -8,7 +8,7 @@ controller_manager: diffdrive_controller: type: diff_drive_controller/DiffDriveController -diffdrive_controller: +/**: ros__parameters: use_sim_time: True left_wheel_names: ["left_wheel_joint"] diff --git a/irobot_create_common/irobot_create_control/launch/include/control.py b/irobot_create_common/irobot_create_control/launch/include/control.py index f8a781d9..ff5ae7be 100644 --- a/irobot_create_common/irobot_create_control/launch/include/control.py +++ b/irobot_create_common/irobot_create_control/launch/include/control.py @@ -5,13 +5,20 @@ from ament_index_python.packages import get_package_share_directory from launch import LaunchDescription -from launch.actions import RegisterEventHandler +from launch.actions import DeclareLaunchArgument, RegisterEventHandler from launch.event_handlers import OnProcessExit -from launch.substitutions import PathJoinSubstitution +from launch.substitutions import LaunchConfiguration, PathJoinSubstitution from launch_ros.actions import Node +ARGUMENTS = [ + DeclareLaunchArgument('namespace', default_value='', + description='Robot namespace') +] + def generate_launch_description(): + namespace = LaunchConfiguration('namespace') + namespaced_node_name = [namespace, '/controller_manager'] pkg_create3_control = get_package_share_directory('irobot_create_control') control_params_file = PathJoinSubstitution( @@ -20,15 +27,17 @@ def generate_launch_description(): diffdrive_controller_node = Node( package='controller_manager', executable='spawner', + namespace=namespace, parameters=[control_params_file], - arguments=['diffdrive_controller', '-c', '/controller_manager'], + arguments=['diffdrive_controller', '-c', namespaced_node_name], output='screen', ) joint_state_broadcaster_spawner = Node( package='controller_manager', executable='spawner', - arguments=['joint_state_broadcaster', '-c', '/controller_manager'], + namespace=namespace, + arguments=['joint_state_broadcaster', '-c', namespaced_node_name], output='screen', ) @@ -40,8 +49,8 @@ def generate_launch_description(): ) ) - ld = LaunchDescription() - + # Define LaunchDescription variable + ld = LaunchDescription(ARGUMENTS) ld.add_action(joint_state_broadcaster_spawner) ld.add_action(diffdrive_controller_callback) diff --git a/irobot_create_common/irobot_create_description/urdf/create3.urdf.xacro b/irobot_create_common/irobot_create_description/urdf/create3.urdf.xacro index 8cbfbcf6..2e70016c 100644 --- a/irobot_create_common/irobot_create_description/urdf/create3.urdf.xacro +++ b/irobot_create_common/irobot_create_description/urdf/create3.urdf.xacro @@ -55,6 +55,7 @@ + @@ -117,6 +118,9 @@ $(find irobot_create_control)/config/control.yaml + + $(arg namespace) + @@ -125,6 +129,9 @@ $(find irobot_create_control)/config/control.yaml + + $(arg namespace) + @@ -235,7 +242,7 @@ - / + $(arg namespace) odom:=sim_ground_truth_pose base_link @@ -251,7 +258,7 @@ - / + $(arg namespace) ~/out:=dock 1.0 diff --git a/irobot_create_common/irobot_create_description/urdf/dock/standard_dock.urdf.xacro b/irobot_create_common/irobot_create_description/urdf/dock/standard_dock.urdf.xacro index cd071e6c..47d482fe 100644 --- a/irobot_create_common/irobot_create_description/urdf/dock/standard_dock.urdf.xacro +++ b/irobot_create_common/irobot_create_description/urdf/dock/standard_dock.urdf.xacro @@ -5,6 +5,7 @@ + @@ -88,7 +89,7 @@ - / + $(arg namespace) odom:=sim_ground_truth_dock_pose ${link_name} @@ -106,6 +107,9 @@ true + true true true diff --git a/irobot_create_gazebo/irobot_create_gazebo_bringup/launch/create3_gazebo.launch.py b/irobot_create_gazebo/irobot_create_gazebo_bringup/launch/create3_gazebo.launch.py index fd9a5324..0b52f755 100644 --- a/irobot_create_gazebo/irobot_create_gazebo_bringup/launch/create3_gazebo.launch.py +++ b/irobot_create_gazebo/irobot_create_gazebo_bringup/launch/create3_gazebo.launch.py @@ -9,7 +9,10 @@ from pathlib import Path from ament_index_python.packages import get_package_share_directory -from launch import LaunchContext, LaunchDescription, SomeSubstitutionsType, Substitution + +from irobot_create_common_bringup.offset_parser import OffsetParser + +from launch import LaunchDescription from launch.actions import DeclareLaunchArgument, ExecuteProcess from launch.actions import IncludeLaunchDescription, SetEnvironmentVariable from launch.conditions import IfCondition @@ -17,24 +20,6 @@ from launch.substitutions import EnvironmentVariable, LaunchConfiguration, PathJoinSubstitution from launch_ros.actions import Node - -class OffsetParser(Substitution): - def __init__( - self, - number: SomeSubstitutionsType, - offset: float, - ) -> None: - self.__number = number - self.__offset = offset - - def perform( - self, - context: LaunchContext = None, - ) -> str: - number = float(self.__number.perform(context)) - return f'{number + self.__offset}' - - ARGUMENTS = [ DeclareLaunchArgument('use_rviz', default_value='true', choices=['true', 'false'], @@ -47,7 +32,12 @@ def perform( description='Spawn the standard dock model.'), DeclareLaunchArgument('world_path', default_value='', description='Set world path, by default is empty.world'), -] + DeclareLaunchArgument('robot_name', default_value='create3', + description='Robot name'), + DeclareLaunchArgument('namespace', default_value='', + description='robot namespace'), + + ] for pose_element in ['x', 'y', 'z', 'yaw']: ARGUMENTS.append(DeclareLaunchArgument(pose_element, default_value='0.0', @@ -76,12 +66,8 @@ def generate_launch_description(): gz_model_uri = SetEnvironmentVariable(name='GAZEBO_MODEL_URI', value=['']) # Paths - create3_nodes_launch_file = PathJoinSubstitution( - [pkg_create3_common_bringup, 'launch', 'create3_nodes.launch.py']) dock_description_launch_file = PathJoinSubstitution( [pkg_create3_common_bringup, 'launch', 'dock_description.launch.py']) - robot_description_launch_file = PathJoinSubstitution( - [pkg_create3_common_bringup, 'launch', 'robot_description.launch.py']) rviz2_launch_file = PathJoinSubstitution( [pkg_create3_common_bringup, 'launch', 'rviz2.launch.py']) @@ -95,6 +81,9 @@ def generate_launch_description(): spawn_dock = LaunchConfiguration('spawn_dock') use_gazebo_gui = LaunchConfiguration('use_gazebo_gui') use_rviz = LaunchConfiguration('use_rviz') + robot_name = LaunchConfiguration('robot_name') + namespace = LaunchConfiguration('namespace') + namespaced_robot_description = [namespace, '/robot_description'] # Gazebo server gzserver = ExecuteProcess( @@ -141,29 +130,16 @@ def generate_launch_description(): ) # Create 3 robot model and description - robot_description = IncludeLaunchDescription( - PythonLaunchDescriptionSource([robot_description_launch_file]) - ) - spawn_robot = Node( - package='gazebo_ros', - executable='spawn_entity.py', - name='spawn_create3', - arguments=['-entity', - 'create3', - '-topic', - 'robot_description', - '-x', x, - '-y', y, - '-z', z, - '-Y', yaw], - output='screen', - ) - - # Create 3 nodes - create3_nodes = IncludeLaunchDescription( - PythonLaunchDescriptionSource([create3_nodes_launch_file]) - ) - + spawn_robot = IncludeLaunchDescription( + PythonLaunchDescriptionSource(os.path.join(pkg_create3_gazebo_bringup, 'launch', + 'create3_gazebo_spawn.launch.py')), + launch_arguments={'x': x, + 'y': y, + 'z': z, + 'robot_name': robot_name, + 'robot_description': namespaced_robot_description, + 'namespace': namespace, + }.items()) # RVIZ2 rviz2 = IncludeLaunchDescription( PythonLaunchDescriptionSource([rviz2_launch_file]), @@ -178,12 +154,10 @@ def generate_launch_description(): ld.add_action(gzserver) ld.add_action(gzclient) # Include robot description - ld.add_action(robot_description) + # ld.add_action(robot_description) ld.add_action(spawn_robot) ld.add_action(spawn_dock) ld.add_action(dock_description) - # Include Create 3 nodes - ld.add_action(create3_nodes) # Rviz ld.add_action(rviz2) diff --git a/irobot_create_gazebo/irobot_create_gazebo_bringup/launch/create3_gazebo_spawn.launch.py b/irobot_create_gazebo/irobot_create_gazebo_bringup/launch/create3_gazebo_spawn.launch.py new file mode 100644 index 00000000..b75bb3f5 --- /dev/null +++ b/irobot_create_gazebo/irobot_create_gazebo_bringup/launch/create3_gazebo_spawn.launch.py @@ -0,0 +1,83 @@ +from ament_index_python.packages import get_package_share_directory + +from launch import LaunchDescription +from launch.actions import DeclareLaunchArgument, IncludeLaunchDescription +from launch.launch_description_sources import PythonLaunchDescriptionSource +from launch.substitutions import LaunchConfiguration, PathJoinSubstitution + +from launch_ros.actions import Node + +ARGUMENTS = [ + DeclareLaunchArgument('gazebo', default_value='classic', + choices=['classic', 'ignition'], + description='Which gazebo simulator to use'), + DeclareLaunchArgument('visualize_rays', default_value='false', + choices=['true', 'false'], + description='Enable/disable ray visualization'), + DeclareLaunchArgument('robot_name', default_value='create3', + description='Create3 robot name'), + DeclareLaunchArgument('robot_description', default_value='robot_description', + description='robot description topic name'), + DeclareLaunchArgument('namespace', default_value='', + description='robot namespace'), + +] + +for pose_element in ['x', 'y', 'z', 'yaw']: + ARGUMENTS.append(DeclareLaunchArgument(pose_element, default_value='0.0', + description=f'{pose_element} component of the robot pose.')) + + +def generate_launch_description(): + + pkg_create3_common_bringup = get_package_share_directory( + 'irobot_create_common_bringup') + pkg_irobot_create_common_bringup = get_package_share_directory( + 'irobot_create_common_bringup') + + robot_description_launch = PathJoinSubstitution( + [pkg_create3_common_bringup, 'launch', 'robot_description.launch.py']) + create3_nodes_launch = PathJoinSubstitution( + [pkg_irobot_create_common_bringup, 'launch', 'create3_nodes.launch.py']) + robot_description_launch = PathJoinSubstitution( + [pkg_irobot_create_common_bringup, 'launch', 'robot_description.launch.py']) + + # Launch configurations + x, y, z = LaunchConfiguration('x'), LaunchConfiguration('y'), LaunchConfiguration('z') + yaw = LaunchConfiguration('yaw') + robot_name = LaunchConfiguration('robot_name') + robot_description = LaunchConfiguration('robot_description') + namespace = LaunchConfiguration('namespace') + gazebo = LaunchConfiguration('gazebo') + + # Spawn robot + spawn_robot = Node( + package='gazebo_ros', + executable='spawn_entity.py', + name='spawn_create3', + arguments=['-entity', robot_name, + '-topic', robot_description, + '-x', x, + '-y', y, + '-z', z, + '-Y', yaw], + output='screen', + ) + + # Robot description + robot_description_launch = IncludeLaunchDescription( + PythonLaunchDescriptionSource([robot_description_launch]), + launch_arguments={'gazebo': gazebo, 'namespace': namespace}.items()) + + # Create3 nodes + create3_nodes = IncludeLaunchDescription( + PythonLaunchDescriptionSource([create3_nodes_launch]), + launch_arguments=[('namespace', namespace)]) + + # Create launch description and add actions + ld = LaunchDescription(ARGUMENTS) + ld.add_action(spawn_robot) + ld.add_action(robot_description_launch) + # Include Create 3 nodes + ld.add_action(create3_nodes) + return ld diff --git a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition.launch.py b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition.launch.py index 057c34b3..1f486df6 100644 --- a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition.launch.py +++ b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition.launch.py @@ -7,7 +7,9 @@ from ament_index_python.packages import get_package_share_directory -from launch import LaunchContext, LaunchDescription, SomeSubstitutionsType, Substitution +from irobot_create_common_bringup.offset_parser import OffsetParser + +from launch import LaunchDescription from launch.actions import DeclareLaunchArgument from launch.actions import IncludeLaunchDescription, SetEnvironmentVariable from launch.conditions import IfCondition @@ -15,24 +17,6 @@ from launch.substitutions import LaunchConfiguration, PathJoinSubstitution from launch_ros.actions import Node - -class OffsetParser(Substitution): - def __init__( - self, - number: SomeSubstitutionsType, - offset: float, - ) -> None: - self.__number = number - self.__offset = offset - - def perform( - self, - context: LaunchContext = None, - ) -> str: - number = float(self.__number.perform(context)) - return f'{number + self.__offset}' - - ARGUMENTS = [ DeclareLaunchArgument('bridge', default_value='true', choices=['true', 'false'], @@ -49,8 +33,9 @@ def perform( DeclareLaunchArgument('spawn_dock', default_value='true', choices=['true', 'false'], description='Spawn the standard dock model.'), + DeclareLaunchArgument('namespace', default_value='', + description='robot namespace'), ] - for pose_element in ['x', 'y', 'z', 'yaw']: ARGUMENTS.append(DeclareLaunchArgument(pose_element, default_value='0.0', description=f'{pose_element} component of the robot pose.')) @@ -87,22 +72,18 @@ def generate_launch_description(): # Paths ign_gazebo_launch = PathJoinSubstitution( [pkg_ros_ign_gazebo, 'launch', 'ign_gazebo.launch.py']) - ros_ign_bridge_launch = PathJoinSubstitution( - [pkg_irobot_create_ignition_bringup, 'launch', 'create3_ros_ignition_bridge.launch.py']) - create3_nodes_launch = PathJoinSubstitution( - [pkg_irobot_create_common_bringup, 'launch', 'create3_nodes.launch.py']) - create3_ignition_nodes_launch = PathJoinSubstitution( - [pkg_irobot_create_ignition_bringup, 'launch', 'create3_ignition_nodes.launch.py']) - robot_description_launch = PathJoinSubstitution( - [pkg_irobot_create_common_bringup, 'launch', 'robot_description.launch.py']) dock_description_launch = PathJoinSubstitution( [pkg_irobot_create_common_bringup, 'launch', 'dock_description.launch.py']) rviz2_launch = PathJoinSubstitution( [pkg_irobot_create_common_bringup, 'launch', 'rviz2.launch.py']) # Launch configurations - x, y, z = LaunchConfiguration('x'), LaunchConfiguration('y'), LaunchConfiguration('z') + x, y, z = LaunchConfiguration('x'), LaunchConfiguration( + 'y'), LaunchConfiguration('z') yaw = LaunchConfiguration('yaw') + robot_name = LaunchConfiguration('robot_name') + namespace = LaunchConfiguration('namespace') + namespaced_robot_description = [namespace, '/robot_description'] # Ignition gazebo ignition_gazebo = IncludeLaunchDescription( @@ -120,6 +101,9 @@ def generate_launch_description(): rviz2 = IncludeLaunchDescription( PythonLaunchDescriptionSource([rviz2_launch]), condition=IfCondition(LaunchConfiguration('use_rviz')), + launch_arguments={ 'namespace' : namespace, + 'use_namespace' : 'True', + }.items(), ) x_dock = OffsetParser(x, 0.157) @@ -129,23 +113,21 @@ def generate_launch_description(): condition=IfCondition(LaunchConfiguration('spawn_dock')), # The robot starts docked launch_arguments={'x': x_dock, 'y': y, 'z': z, 'yaw': yaw_dock, + 'namespace' : namespace, 'gazebo': 'ignition'}.items(), ) - robot_description = IncludeLaunchDescription( - PythonLaunchDescriptionSource([robot_description_launch]), - launch_arguments={'gazebo': 'ignition'}.items() - ) - # Create3 - spawn_robot = Node(package='ros_ign_gazebo', executable='create', - arguments=['-name', LaunchConfiguration('robot_name'), - '-x', x, - '-y', y, - '-z', z, - '-Y', '0.0', - '-topic', 'robot_description'], - output='screen') + spawn_robot = IncludeLaunchDescription( + PythonLaunchDescriptionSource(os.path.join(pkg_irobot_create_ignition_bringup, 'launch', + 'create3_spawn.launch.py')), + launch_arguments={'x': x, + 'y': y, + 'z': z, + 'robot_name': robot_name, + 'robot_description': namespaced_robot_description, + 'namespace': namespace, + }.items()) # Dock spawn_dock = Node(package='ros_ign_gazebo', executable='create', @@ -154,37 +136,17 @@ def generate_launch_description(): '-y', y, '-z', z, '-Y', '3.141592', - '-topic', 'standard_dock_description'], + '-topic', (namespace, '/standard_dock_description')], output='screen') - # ROS Ign bridge - ros_ign_bridge = IncludeLaunchDescription( - PythonLaunchDescriptionSource([ros_ign_bridge_launch]), - launch_arguments=[('world', LaunchConfiguration('world')), - ('robot_name', LaunchConfiguration('robot_name'))] - ) - - # Create3 nodes - create3_nodes = IncludeLaunchDescription( - PythonLaunchDescriptionSource([create3_nodes_launch]) - ) - - create3_ignition_nodes = IncludeLaunchDescription( - PythonLaunchDescriptionSource([create3_ignition_nodes_launch]), - launch_arguments=[('robot_name', LaunchConfiguration('robot_name'))] - ) - # Create launch description and add actions ld = LaunchDescription(ARGUMENTS) ld.add_action(ign_resource_path) ld.add_action(ign_gui_plugin_path) ld.add_action(ignition_gazebo) - ld.add_action(ros_ign_bridge) ld.add_action(rviz2) - ld.add_action(robot_description) ld.add_action(dock_description) ld.add_action(spawn_robot) ld.add_action(spawn_dock) - ld.add_action(create3_nodes) - ld.add_action(create3_ignition_nodes) + return ld diff --git a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition_nodes.launch.py b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition_nodes.launch.py index 21f3488f..ecb1ee6f 100644 --- a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition_nodes.launch.py +++ b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition_nodes.launch.py @@ -10,7 +10,9 @@ ARGUMENTS = [ DeclareLaunchArgument('robot_name', default_value='create3', - description='Robot name') + description='Robot name'), + DeclareLaunchArgument('namespace', default_value='', + description='Robot namespace') ] @@ -24,10 +26,13 @@ def generate_launch_description(): sensors_params_yaml_file = PathJoinSubstitution( [pkg_create3_ignition_bringup, 'config', 'sensors_params.yaml']) + namespace = LaunchConfiguration('namespace') + # Pose republisher pose_republisher_node = Node( package='irobot_create_ignition_toolbox', name='pose_republisher_node', + namespace=namespace, executable='pose_republisher_node', parameters=[pose_republisher_params_yaml_file, {'robot_name': LaunchConfiguration('robot_name')}, @@ -39,6 +44,7 @@ def generate_launch_description(): sensors_node = Node( package='irobot_create_ignition_toolbox', name='sensors_node', + namespace=namespace, executable='sensors_node', parameters=[sensors_params_yaml_file, {'use_sim_time': True}], @@ -49,6 +55,7 @@ def generate_launch_description(): interface_buttons_node = Node( package='irobot_create_ignition_toolbox', name='interface_buttons_node', + namespace=namespace, executable='interface_buttons_node', parameters=[{'use_sim_time': True}], output='screen', diff --git a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ros_ignition_bridge.launch.py b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ros_ignition_bridge.launch.py index c3997cb5..67c165b2 100644 --- a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ros_ignition_bridge.launch.py +++ b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ros_ignition_bridge.launch.py @@ -15,12 +15,14 @@ DeclareLaunchArgument('robot_name', default_value='create3', description='Ignition model name'), DeclareLaunchArgument('world', default_value='depot', - description='World name') + description='World name'), + DeclareLaunchArgument('namespace', default_value='', + description='Robot namespace') ] def generate_launch_description(): - namespace = LaunchConfiguration('robot_name') + namespace = LaunchConfiguration('namespace') use_sim_time = LaunchConfiguration('use_sim_time') cliff_sensors = [ @@ -53,18 +55,19 @@ def generate_launch_description(): # cmd_vel bridge cmd_vel_bridge = Node(package='ros_ign_bridge', executable='parameter_bridge', name='cmd_vel_bridge', + namespace=namespace, output='screen', parameters=[{ 'use_sim_time': use_sim_time }], arguments=[ - '/cmd_vel' + '@geometry_msgs/msg/Twist' + '[ignition.msgs.Twist', - ['/model/', LaunchConfiguration('robot_name'), '/cmd_vel' + + ['/',namespace, '/cmd_vel' + '@geometry_msgs/msg/Twist' + '[ignition.msgs.Twist'], + ['/model/', LaunchConfiguration('robot_name'), 'cmd_vel'+ '@geometry_msgs/msg/Twist' + ']ignition.msgs.Twist'] ], remappings=[ - (['/model/', LaunchConfiguration('robot_name'), '/cmd_vel'], + (['/model/', LaunchConfiguration('robot_name'), 'cmd_vel'], 'diffdrive_controller/cmd_vel_unstamped') ]) diff --git a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_spawn.launch.py b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_spawn.launch.py new file mode 100644 index 00000000..f49159c7 --- /dev/null +++ b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_spawn.launch.py @@ -0,0 +1,104 @@ +from ament_index_python.packages import get_package_share_directory + +from launch import LaunchDescription +from launch.actions import DeclareLaunchArgument, IncludeLaunchDescription +from launch.launch_description_sources import PythonLaunchDescriptionSource +from launch.substitutions import LaunchConfiguration, PathJoinSubstitution + +from launch_ros.actions import Node + +ARGUMENTS = [ + DeclareLaunchArgument('gazebo', default_value='classic', + choices=['classic', 'ignition'], + description='Which gazebo simulator to use'), + DeclareLaunchArgument('visualize_rays', default_value='false', + choices=['true', 'false'], + description='Enable/disable ray visualization'), + DeclareLaunchArgument('robot_name', default_value='create3', + description='Create3 robot name'), + DeclareLaunchArgument('robot_description', default_value='robot_description', + description='robot description topic name'), + DeclareLaunchArgument('namespace', default_value='', + description='Robot namespace') +] + +for pose_element in ['x', 'y', 'z', 'yaw']: + ARGUMENTS.append(DeclareLaunchArgument(pose_element, default_value='0.0', + description=f'{pose_element} component of the robot pose.')) + + +def generate_launch_description(): + + pkg_create3_common_bringup = get_package_share_directory( + 'irobot_create_common_bringup') + pkg_irobot_create_common_bringup = get_package_share_directory( + 'irobot_create_common_bringup') + pkg_irobot_create_ignition_bringup = get_package_share_directory( + 'irobot_create_ignition_bringup') + + robot_description_launch = PathJoinSubstitution( + [pkg_create3_common_bringup, 'launch', 'robot_description.launch.py']) + ros_ign_bridge_launch = PathJoinSubstitution( + [pkg_irobot_create_ignition_bringup, 'launch', 'create3_ros_ignition_bridge.launch.py']) + create3_nodes_launch = PathJoinSubstitution( + [pkg_irobot_create_common_bringup, 'launch', 'create3_nodes.launch.py']) + create3_ignition_nodes_launch = PathJoinSubstitution( + [pkg_irobot_create_ignition_bringup, 'launch', 'create3_ignition_nodes.launch.py']) + robot_description_launch = PathJoinSubstitution( + [pkg_irobot_create_common_bringup, 'launch', 'robot_description.launch.py']) + + # Launch configurations + x, y, z = LaunchConfiguration('x'), LaunchConfiguration( + 'y'), LaunchConfiguration('z') + yaw = LaunchConfiguration('yaw') + robot_name = LaunchConfiguration('robot_name') + robot_description = LaunchConfiguration('robot_description') + namespace = LaunchConfiguration('namespace') + + # Spawn robot + spawn_robot = Node( + package='ros_ign_gazebo', + executable='create', + output='screen', + arguments=[ + '-name', robot_name, + '-topic', robot_description, + '-Y', yaw, + '-x', x, + '-y', y, + '-z', z]) + + # Robot description + robot_description_launch = IncludeLaunchDescription( + PythonLaunchDescriptionSource([robot_description_launch]), + launch_arguments={'gazebo': 'ignition', 'namespace': namespace}.items()) + + # ROS Ign bridge + ros_ign_bridge = IncludeLaunchDescription( + PythonLaunchDescriptionSource([ros_ign_bridge_launch]), + launch_arguments=[('world', LaunchConfiguration('world')), + ('robot_name', robot_name), + ('namespace', namespace)] + + ) + + # Create3 nodes + create3_nodes = IncludeLaunchDescription( + PythonLaunchDescriptionSource([create3_nodes_launch]), + launch_arguments=[('namespace', namespace)] + ) + + create3_ignition_nodes = IncludeLaunchDescription( + PythonLaunchDescriptionSource([create3_ignition_nodes_launch]), + launch_arguments=[('robot_name', LaunchConfiguration('robot_name')), + ('namespace', namespace)] + ) + + # Create launch description and add actions + ld = LaunchDescription(ARGUMENTS) + ld.add_action(spawn_robot) + ld.add_action(ros_ign_bridge) + ld.add_action(robot_description_launch) + ld.add_action(create3_nodes) + ld.add_action(create3_ignition_nodes) + return ld From 64d4fac6119458daac021a5742991ae9376dde68 Mon Sep 17 00:00:00 2001 From: "badr.moutalib" Date: Wed, 13 Jul 2022 16:48:29 +0200 Subject: [PATCH 10/44] nav2 dependency, lint and rebase --- .../irobot_create_common_bringup/__init__.py | 0 .../replace_string.py | 83 +++++++++++++ .../launch/create3_nodes.launch.py | 112 ++++++++++++++++-- .../launch/robot_description.launch.py | 3 +- .../launch/rviz2.launch.py | 3 +- .../irobot_create_control/config/control.yaml | 2 +- .../launch/include/control.py | 1 - .../launch/create3_gazebo.launch.py | 4 +- .../config/pose_republisher_params.yaml | 2 +- .../launch/create3_ignition.launch.py | 13 +- .../launch/create3_ignition_nodes.launch.py | 23 +++- .../create3_ros_ignition_bridge.launch.py | 47 +++++--- .../launch/create3_spawn.launch.py | 11 +- 13 files changed, 259 insertions(+), 45 deletions(-) create mode 100644 irobot_create_common/irobot_create_common_bringup/irobot_create_common_bringup/__init__.py create mode 100644 irobot_create_common/irobot_create_common_bringup/irobot_create_common_bringup/replace_string.py diff --git a/irobot_create_common/irobot_create_common_bringup/irobot_create_common_bringup/__init__.py b/irobot_create_common/irobot_create_common_bringup/irobot_create_common_bringup/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/irobot_create_common/irobot_create_common_bringup/irobot_create_common_bringup/replace_string.py b/irobot_create_common/irobot_create_common_bringup/irobot_create_common_bringup/replace_string.py new file mode 100644 index 00000000..9bae46f8 --- /dev/null +++ b/irobot_create_common/irobot_create_common_bringup/irobot_create_common_bringup/replace_string.py @@ -0,0 +1,83 @@ +# This file has been copied from https://github.com/ros-planning/navigation2 +# for use as part of the iRobot Create 3 simulator. +# +# Copyright (c) 2019 Intel Corporation +# +# 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 tempfile +from typing import Dict +from typing import List +from typing import Text + +import launch + + +class ReplaceString(launch.Substitution): + """ + Substitution that replaces strings on a given file. + + Used in launch system + """ + + def __init__(self, + source_file: launch.SomeSubstitutionsType, + replacements: Dict) -> None: + super().__init__() + + # import here to avoid loop + from launch.utilities import normalize_to_list_of_substitutions + self.__source_file = normalize_to_list_of_substitutions(source_file) + self.__replacements = {} + for key in replacements: + self.__replacements[key] = normalize_to_list_of_substitutions(replacements[key]) + + @property + def name(self) -> List[launch.Substitution]: + """Getter for name.""" + return self.__source_file + + def describe(self) -> Text: + """Return a description of this substitution as a string.""" + return '' + + def perform(self, context: launch.LaunchContext) -> Text: + output_file = tempfile.NamedTemporaryFile(mode='w', delete=False) + replacements = self.resolve_replacements(context) + try: + input_file = open(launch.utilities.perform_substitutions(context, self.name), 'r') + self.replace(input_file, output_file, replacements) + except Exception as err: # noqa: B902 + print('ReplaceString substitution error: ', err) + finally: + input_file.close() + output_file.close() + return output_file.name + + def resolve_replacements(self, context): + resolved_replacements = {} + for key in self.__replacements: + resolved_replacements[key] = (launch.utilities.perform_substitutions + (context, self.__replacements[key])) + return resolved_replacements + + def replace(self, input_file, output_file, replacements): + for line in input_file: + for key, value in replacements.items(): + if isinstance(key, str) and isinstance(value, str): + if key in line: + line = line.replace(key, value) + else: + raise TypeError('A provided replacement pair is not a string.\ + Both key and value should be strings.') + output_file.write(line) diff --git a/irobot_create_common/irobot_create_common_bringup/launch/create3_nodes.launch.py b/irobot_create_common/irobot_create_common_bringup/launch/create3_nodes.launch.py index 065eb922..574dba7a 100644 --- a/irobot_create_common/irobot_create_common_bringup/launch/create3_nodes.launch.py +++ b/irobot_create_common/irobot_create_common_bringup/launch/create3_nodes.launch.py @@ -5,12 +5,13 @@ # Launch Create(R) 3 nodes from ament_index_python.packages import get_package_share_directory +from irobot_create_common_bringup.replace_string import ReplaceString from launch import LaunchDescription from launch.actions import DeclareLaunchArgument, IncludeLaunchDescription +from launch.conditions import LaunchConfigurationEquals, LaunchConfigurationNotEquals from launch.launch_description_sources import PythonLaunchDescriptionSource from launch.substitutions import LaunchConfiguration, PathJoinSubstitution from launch_ros.actions import Node -from nav2_common.launch import ReplaceString ARGUMENTS = [ DeclareLaunchArgument('gazebo', default_value='classic', @@ -26,6 +27,7 @@ def generate_launch_description(): # Directories pkg_create3_common_bringup = get_package_share_directory('irobot_create_common_bringup') pkg_create3_control = get_package_share_directory('irobot_create_control') + namespace = LaunchConfiguration('namespace') # Paths control_launch_file = PathJoinSubstitution( @@ -51,8 +53,6 @@ def generate_launch_description(): launch_arguments=[('namespace', LaunchConfiguration('namespace'))] ) - namespace = LaunchConfiguration('namespace') - namespaced_hazards_params_yaml_file = ReplaceString( source_file=hazards_params_yaml_file, replacements={'/hazard_detection': ('/', namespace, '/hazard_detection')} @@ -66,7 +66,7 @@ def generate_launch_description(): namespaced_wheel_status_params_yaml_file = ReplaceString( source_file=wheel_status_params_yaml_file, replacements={'/wheel_vels': ('/', namespace, '/wheel_vels'), - '/wheel_ticks': ('/', namespace, '/wheel_ticks')} + '/wheel_ticks': ('/', namespace, '/wheel_ticks')} ) namespaced_mock_params_yaml_file = ReplaceString( @@ -77,26 +77,38 @@ def generate_launch_description(): namespaced_robot_state_yaml_file = ReplaceString( source_file=robot_state_yaml_file, replacements={'/stop_status': ('/', namespace, '/stop_status'), - '/battery_state': ('/', namespace, '/battery_state'), - '/dock': ('/', namespace, '/dock'), - '/odom': ('/', namespace, '/odom')} + '/battery_state': ('/', namespace, '/battery_state'), + '/dock': ('/', namespace, '/dock'), + '/odom': ('/', namespace, '/odom')} ) namespaced_kidnap_estimator_yaml_file = ReplaceString( source_file=kidnap_estimator_yaml_file, replacements={'/kidnap_status': ('/', namespace, '/kidnap_status'), - '/hazard_detection': ('/', namespace, '/hazard_detection')} + '/hazard_detection': ('/', namespace, '/hazard_detection')} ) namespaced_ui_mgr_params_yaml_file = ReplaceString( source_file=ui_mgr_params_yaml_file, replacements={'/interface_buttons': ('/', namespace, '/interface_buttons'), - '/cmd_lightring': ('/', namespace, '/cmd_lightring'), - '/cmd_audio': ('/', namespace, '/cmd_audio')} + '/cmd_lightring': ('/', namespace, '/cmd_lightring'), + '/cmd_audio': ('/', namespace, '/cmd_audio')} ) # Publish hazards vector hazards_vector_node = Node( + condition=LaunchConfigurationEquals('namespace', ''), + package='irobot_create_nodes', + name='hazards_vector_publisher', + namespace=namespace, + executable='hazards_vector_publisher', + parameters=[hazards_params_yaml_file, + {'use_sim_time': True}], + output='screen', + ) + + hazards_vector_node_namespaced = Node( + condition=LaunchConfigurationNotEquals('namespace', ''), package='irobot_create_nodes', name='hazards_vector_publisher', namespace=namespace, @@ -108,6 +120,18 @@ def generate_launch_description(): # Publish IR intensity vector ir_intensity_vector_node = Node( + condition=LaunchConfigurationEquals('namespace', ''), + package='irobot_create_nodes', + name='ir_intensity_vector_publisher', + namespace=namespace, + executable='ir_intensity_vector_publisher', + parameters=[ir_intensity_params_yaml_file, + {'use_sim_time': True}], + output='screen', + ) + + ir_intensity_vector_node_namespaced = Node( + condition=LaunchConfigurationNotEquals('namespace', ''), package='irobot_create_nodes', name='ir_intensity_vector_publisher', namespace=namespace, @@ -129,6 +153,18 @@ def generate_launch_description(): # Publish wheel status wheel_status_node = Node( + condition=LaunchConfigurationEquals('namespace', ''), + package='irobot_create_nodes', + name='wheel_status_publisher', + namespace=namespace, + executable='wheel_status_publisher', + parameters=[wheel_status_params_yaml_file, + {'use_sim_time': True}], + output='screen', + ) + + wheel_status_node_namespaced = Node( + condition=LaunchConfigurationNotEquals('namespace', ''), package='irobot_create_nodes', name='wheel_status_publisher', namespace=namespace, @@ -140,6 +176,18 @@ def generate_launch_description(): # Publish mock topics mock_topics_node = Node( + condition=LaunchConfigurationEquals('namespace', ''), + package='irobot_create_nodes', + name='mock_publisher', + namespace=namespace, + executable='mock_publisher', + parameters=[mock_params_yaml_file, + {'use_sim_time': True}], + output='screen', + ) + + mock_topics_node_namespaced = Node( + condition=LaunchConfigurationNotEquals('namespace', ''), package='irobot_create_nodes', name='mock_publisher', namespace=namespace, @@ -151,6 +199,18 @@ def generate_launch_description(): # Publish robot state robot_state_node = Node( + condition=LaunchConfigurationEquals('namespace', ''), + package='irobot_create_nodes', + name='robot_state', + namespace=namespace, + executable='robot_state', + parameters=[robot_state_yaml_file, + {'use_sim_time': True}], + output='screen', + ) + + robot_state_node_namespaced = Node( + condition=LaunchConfigurationNotEquals('namespace', ''), package='irobot_create_nodes', name='robot_state', namespace=namespace, @@ -162,6 +222,18 @@ def generate_launch_description(): # Publish kidnap estimator kidnap_estimator_node = Node( + condition=LaunchConfigurationEquals('namespace', ''), + package='irobot_create_nodes', + name='kidnap_estimator_publisher', + namespace=namespace, + executable='kidnap_estimator_publisher', + parameters=[kidnap_estimator_yaml_file, + {'use_sim_time': True}], + output='screen', + ) + + kidnap_estimator_node_namespaced = Node( + condition=LaunchConfigurationNotEquals('namespace', ''), package='irobot_create_nodes', name='kidnap_estimator_publisher', namespace=namespace, @@ -173,6 +245,19 @@ def generate_launch_description(): # UI topics / actions ui_mgr_node = Node( + condition=LaunchConfigurationEquals('namespace', ''), + package='irobot_create_nodes', + name='ui_mgr', + namespace=namespace, + executable='ui_mgr', + parameters=[ui_mgr_params_yaml_file, + {'use_sim_time': True}, + {'gazebo': LaunchConfiguration('gazebo')}], + output='screen', + ) + + ui_mgr_node_namespaced = Node( + condition=LaunchConfigurationNotEquals('namespace', ''), package='irobot_create_nodes', name='ui_mgr', namespace=namespace, @@ -189,12 +274,19 @@ def generate_launch_description(): ld.add_action(diffdrive_controller) # Add nodes to LaunchDescription ld.add_action(hazards_vector_node) + ld.add_action(hazards_vector_node_namespaced) ld.add_action(ir_intensity_vector_node) + ld.add_action(ir_intensity_vector_node_namespaced) ld.add_action(motion_control_node) ld.add_action(wheel_status_node) + ld.add_action(wheel_status_node_namespaced) ld.add_action(mock_topics_node) + ld.add_action(mock_topics_node_namespaced) ld.add_action(robot_state_node) + ld.add_action(robot_state_node_namespaced) ld.add_action(kidnap_estimator_node) + ld.add_action(kidnap_estimator_node_namespaced) ld.add_action(ui_mgr_node) + ld.add_action(ui_mgr_node_namespaced) return ld diff --git a/irobot_create_common/irobot_create_common_bringup/launch/robot_description.launch.py b/irobot_create_common/irobot_create_common_bringup/launch/robot_description.launch.py index fc2fd44c..004e6832 100644 --- a/irobot_create_common/irobot_create_common_bringup/launch/robot_description.launch.py +++ b/irobot_create_common/irobot_create_common_bringup/launch/robot_description.launch.py @@ -42,7 +42,8 @@ def generate_launch_description(): ['xacro', ' ', xacro_file, ' ', 'gazebo:=', gazebo_simulator, ' ', 'visualize_rays:=', visualize_rays, ' ', - 'namespace:=', namespace, ' '])}, + 'namespace:=', namespace, ' ' + ])}, ], ) diff --git a/irobot_create_common/irobot_create_common_bringup/launch/rviz2.launch.py b/irobot_create_common/irobot_create_common_bringup/launch/rviz2.launch.py index 19fa37b3..d5e3cded 100644 --- a/irobot_create_common/irobot_create_common_bringup/launch/rviz2.launch.py +++ b/irobot_create_common/irobot_create_common_bringup/launch/rviz2.launch.py @@ -49,7 +49,7 @@ def generate_launch_description(): ] ) - rviz = Node( + rviz_namespaced = Node( condition=LaunchConfigurationNotEquals('namespace', ''), package='rviz2', executable='rviz2', @@ -71,5 +71,6 @@ def generate_launch_description(): ld = LaunchDescription() # Add nodes to LaunchDescription ld.add_action(rviz) + ld.add_action(rviz_namespaced) return ld diff --git a/irobot_create_common/irobot_create_control/config/control.yaml b/irobot_create_common/irobot_create_control/config/control.yaml index 5b1ff9fb..9e21753e 100644 --- a/irobot_create_common/irobot_create_control/config/control.yaml +++ b/irobot_create_common/irobot_create_control/config/control.yaml @@ -6,7 +6,7 @@ type: joint_state_broadcaster/JointStateBroadcaster diffdrive_controller: - type: diff_drive_controller/DiffDriveController + type: diff_drive_controller/DiffDriveController /**: ros__parameters: diff --git a/irobot_create_common/irobot_create_control/launch/include/control.py b/irobot_create_common/irobot_create_control/launch/include/control.py index ff5ae7be..ed0a28c1 100644 --- a/irobot_create_common/irobot_create_control/launch/include/control.py +++ b/irobot_create_common/irobot_create_control/launch/include/control.py @@ -15,7 +15,6 @@ description='Robot namespace') ] - def generate_launch_description(): namespace = LaunchConfiguration('namespace') namespaced_node_name = [namespace, '/controller_manager'] diff --git a/irobot_create_gazebo/irobot_create_gazebo_bringup/launch/create3_gazebo.launch.py b/irobot_create_gazebo/irobot_create_gazebo_bringup/launch/create3_gazebo.launch.py index 0b52f755..8988c479 100644 --- a/irobot_create_gazebo/irobot_create_gazebo_bringup/launch/create3_gazebo.launch.py +++ b/irobot_create_gazebo/irobot_create_gazebo_bringup/launch/create3_gazebo.launch.py @@ -36,7 +36,6 @@ description='Robot name'), DeclareLaunchArgument('namespace', default_value='', description='robot namespace'), - ] for pose_element in ['x', 'y', 'z', 'yaw']: @@ -113,6 +112,7 @@ def generate_launch_description(): # The robot starts docked launch_arguments={'x': x_dock, 'y': y, 'z': z, 'yaw': yaw_dock}.items(), ) + spawn_dock = Node( package='gazebo_ros', executable='spawn_entity.py', @@ -140,6 +140,7 @@ def generate_launch_description(): 'robot_description': namespaced_robot_description, 'namespace': namespace, }.items()) + # RVIZ2 rviz2 = IncludeLaunchDescription( PythonLaunchDescriptionSource([rviz2_launch_file]), @@ -154,7 +155,6 @@ def generate_launch_description(): ld.add_action(gzserver) ld.add_action(gzclient) # Include robot description - # ld.add_action(robot_description) ld.add_action(spawn_robot) ld.add_action(spawn_dock) ld.add_action(dock_description) diff --git a/irobot_create_ignition/irobot_create_ignition_bringup/config/pose_republisher_params.yaml b/irobot_create_ignition/irobot_create_ignition_bringup/config/pose_republisher_params.yaml index 8cdb5e3b..30269ac1 100644 --- a/irobot_create_ignition/irobot_create_ignition_bringup/config/pose_republisher_params.yaml +++ b/irobot_create_ignition/irobot_create_ignition_bringup/config/pose_republisher_params.yaml @@ -1,5 +1,5 @@ --- -pose_republisher_node: +/**: ros__parameters: robot_publisher_topic: /sim_ground_truth_pose robot_subscriber_topic: /_internal/sim_ground_truth_pose diff --git a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition.launch.py b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition.launch.py index 1f486df6..a7b90c3e 100644 --- a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition.launch.py +++ b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition.launch.py @@ -82,6 +82,7 @@ def generate_launch_description(): 'y'), LaunchConfiguration('z') yaw = LaunchConfiguration('yaw') robot_name = LaunchConfiguration('robot_name') + world = LaunchConfiguration('world') namespace = LaunchConfiguration('namespace') namespaced_robot_description = [namespace, '/robot_description'] @@ -101,9 +102,7 @@ def generate_launch_description(): rviz2 = IncludeLaunchDescription( PythonLaunchDescriptionSource([rviz2_launch]), condition=IfCondition(LaunchConfiguration('use_rviz')), - launch_arguments={ 'namespace' : namespace, - 'use_namespace' : 'True', - }.items(), + launch_arguments={'namespace': namespace}.items() ) x_dock = OffsetParser(x, 0.157) @@ -113,8 +112,8 @@ def generate_launch_description(): condition=IfCondition(LaunchConfiguration('spawn_dock')), # The robot starts docked launch_arguments={'x': x_dock, 'y': y, 'z': z, 'yaw': yaw_dock, - 'namespace' : namespace, - 'gazebo': 'ignition'}.items(), + 'namespace': namespace, + 'gazebo': 'ignition'}.items() ) # Create3 @@ -126,8 +125,10 @@ def generate_launch_description(): 'z': z, 'robot_name': robot_name, 'robot_description': namespaced_robot_description, + 'world' : world, 'namespace': namespace, - }.items()) + }.items() + ) # Dock spawn_dock = Node(package='ros_ign_gazebo', executable='create', diff --git a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition_nodes.launch.py b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition_nodes.launch.py index ecb1ee6f..e68510da 100644 --- a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition_nodes.launch.py +++ b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition_nodes.launch.py @@ -2,12 +2,14 @@ # @author Roni Kreinin (rkreinin@clearpathrobotics.com) from ament_index_python.packages import get_package_share_directory - +from irobot_create_common_bringup.replace_string import ReplaceString from launch import LaunchDescription from launch.actions import DeclareLaunchArgument +from launch.conditions import LaunchConfigurationEquals, LaunchConfigurationNotEquals from launch.substitutions import LaunchConfiguration, PathJoinSubstitution from launch_ros.actions import Node + ARGUMENTS = [ DeclareLaunchArgument('robot_name', default_value='create3', description='Robot name'), @@ -28,8 +30,14 @@ def generate_launch_description(): namespace = LaunchConfiguration('namespace') + namespaced_pose_republisher_params_yaml_file = ReplaceString( + source_file=pose_republisher_params_yaml_file, + replacements={'/sim_ground_truth_pose': ('/', namespace, '/sim_ground_truth_pose')} + ) + # Pose republisher pose_republisher_node = Node( + condition=LaunchConfigurationEquals('namespace', ''), package='irobot_create_ignition_toolbox', name='pose_republisher_node', namespace=namespace, @@ -40,6 +48,18 @@ def generate_launch_description(): output='screen', ) + pose_republisher_node_namespaced = Node( + condition=LaunchConfigurationNotEquals('namespace', ''), + package='irobot_create_ignition_toolbox', + name='pose_republisher_node', + namespace=namespace, + executable='pose_republisher_node', + parameters=[namespaced_pose_republisher_params_yaml_file, + {'robot_name': LaunchConfiguration('robot_name')}, + {'use_sim_time': True}], + output='screen', + ) + # Sensors sensors_node = Node( package='irobot_create_ignition_toolbox', @@ -64,6 +84,7 @@ def generate_launch_description(): # Create launch description and add actions ld = LaunchDescription(ARGUMENTS) ld.add_action(pose_republisher_node) + ld.add_action(pose_republisher_node_namespaced) ld.add_action(sensors_node) ld.add_action(interface_buttons_node) return ld diff --git a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ros_ignition_bridge.launch.py b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ros_ignition_bridge.launch.py index 67c165b2..88302370 100644 --- a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ros_ignition_bridge.launch.py +++ b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ros_ignition_bridge.launch.py @@ -3,7 +3,7 @@ from launch import LaunchDescription from launch.actions import DeclareLaunchArgument -from launch.conditions import IfCondition +from launch.conditions import IfCondition, LaunchConfigurationEquals, LaunchConfigurationNotEquals from launch.substitutions import LaunchConfiguration from launch_ros.actions import Node @@ -53,23 +53,39 @@ def generate_launch_description(): condition=IfCondition(use_sim_time)) # cmd_vel bridge - cmd_vel_bridge = Node(package='ros_ign_bridge', executable='parameter_bridge', + cmd_vel_bridge = Node(condition=LaunchConfigurationEquals('namespace', ''), + package='ros_ign_bridge', + executable='parameter_bridge', name='cmd_vel_bridge', - namespace=namespace, output='screen', parameters=[{ - 'use_sim_time': use_sim_time - }], - arguments=[ - ['/',namespace, '/cmd_vel' + '@geometry_msgs/msg/Twist' + '[ignition.msgs.Twist'], - ['/model/', LaunchConfiguration('robot_name'), 'cmd_vel'+ - '@geometry_msgs/msg/Twist' + - ']ignition.msgs.Twist'] - ], - remappings=[ - (['/model/', LaunchConfiguration('robot_name'), 'cmd_vel'], - 'diffdrive_controller/cmd_vel_unstamped') - ]) + 'use_sim_time': use_sim_time}], + arguments=['/cmd_vel' + '@geometry_msgs/msg/Twist' + + '[ignition.msgs.Twist', + ['/model/', LaunchConfiguration('robot_name'), '/cmd_vel' + + '@geometry_msgs/msg/Twist' + + ']ignition.msgs.Twist']], + remappings=[(['/model/', LaunchConfiguration('robot_name'), '/cmd_vel'], + 'diffdrive_controller/cmd_vel_unstamped')]) + + cmd_vel_bridge_namespaced = Node(condition=LaunchConfigurationNotEquals('namespace', ''), + package='ros_ign_bridge', + executable='parameter_bridge', + name='cmd_vel_bridge', + namespace=namespace, + output='screen', + parameters=[{ + 'use_sim_time': use_sim_time}], + arguments=[['/', namespace, '/cmd_vel' + + '@geometry_msgs/msg/Twist' + + '[ignition.msgs.Twist'], + ['/model/', + LaunchConfiguration('robot_name'), 'cmd_vel' + + '@geometry_msgs/msg/Twist' + + ']ignition.msgs.Twist']], + remappings=[(['/model/', + LaunchConfiguration('robot_name'), 'cmd_vel'], + 'diffdrive_controller/cmd_vel_unstamped')]) # Pose bridge pose_bridge = Node(package='ros_ign_bridge', executable='parameter_bridge', @@ -193,6 +209,7 @@ def generate_launch_description(): ld = LaunchDescription(ARGUMENTS) ld.add_action(clock_bridge) ld.add_action(cmd_vel_bridge) + ld.add_action(cmd_vel_bridge_namespaced) ld.add_action(pose_bridge) ld.add_action(odom_base_tf_bridge) ld.add_action(bumper_contact_bridge) diff --git a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_spawn.launch.py b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_spawn.launch.py index f49159c7..637686cb 100644 --- a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_spawn.launch.py +++ b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_spawn.launch.py @@ -8,12 +8,14 @@ from launch_ros.actions import Node ARGUMENTS = [ - DeclareLaunchArgument('gazebo', default_value='classic', + DeclareLaunchArgument('gazebo', default_value='ignition', choices=['classic', 'ignition'], description='Which gazebo simulator to use'), DeclareLaunchArgument('visualize_rays', default_value='false', choices=['true', 'false'], description='Enable/disable ray visualization'), + DeclareLaunchArgument('world', default_value='depot', + description='World name'), DeclareLaunchArgument('robot_name', default_value='create3', description='Create3 robot name'), DeclareLaunchArgument('robot_description', default_value='robot_description', @@ -44,16 +46,14 @@ def generate_launch_description(): [pkg_irobot_create_common_bringup, 'launch', 'create3_nodes.launch.py']) create3_ignition_nodes_launch = PathJoinSubstitution( [pkg_irobot_create_ignition_bringup, 'launch', 'create3_ignition_nodes.launch.py']) - robot_description_launch = PathJoinSubstitution( - [pkg_irobot_create_common_bringup, 'launch', 'robot_description.launch.py']) # Launch configurations x, y, z = LaunchConfiguration('x'), LaunchConfiguration( 'y'), LaunchConfiguration('z') yaw = LaunchConfiguration('yaw') robot_name = LaunchConfiguration('robot_name') - robot_description = LaunchConfiguration('robot_description') namespace = LaunchConfiguration('namespace') + namespaced_robot_description = [namespace, '/robot_description'] # Spawn robot spawn_robot = Node( @@ -62,7 +62,7 @@ def generate_launch_description(): output='screen', arguments=[ '-name', robot_name, - '-topic', robot_description, + '-topic', namespaced_robot_description, '-Y', yaw, '-x', x, '-y', y, @@ -79,7 +79,6 @@ def generate_launch_description(): launch_arguments=[('world', LaunchConfiguration('world')), ('robot_name', robot_name), ('namespace', namespace)] - ) # Create3 nodes From 4ae8550ce65cc1a974018fc774a31b7d6e2f1fe5 Mon Sep 17 00:00:00 2001 From: "badr.moutalib" Date: Fri, 29 Jul 2022 17:12:06 +0200 Subject: [PATCH 11/44] working two robot velocity cmd with cmd_vel_unstamped --- .../launch/create3_nodes.launch.py | 198 +++++++++--------- .../irobot_create_control/config/control.yaml | 87 +++++++- .../config/control_0.yaml | 0 .../config/control_1.yaml | 0 .../launch/include/control.py | 4 +- .../create3_ros_ignition_bridge.launch.py | 32 +-- 6 files changed, 198 insertions(+), 123 deletions(-) create mode 100644 irobot_create_common/irobot_create_control/config/control_0.yaml create mode 100644 irobot_create_common/irobot_create_control/config/control_1.yaml diff --git a/irobot_create_common/irobot_create_common_bringup/launch/create3_nodes.launch.py b/irobot_create_common/irobot_create_common_bringup/launch/create3_nodes.launch.py index 574dba7a..5d7ea1d1 100644 --- a/irobot_create_common/irobot_create_common_bringup/launch/create3_nodes.launch.py +++ b/irobot_create_common/irobot_create_common_bringup/launch/create3_nodes.launch.py @@ -55,60 +55,60 @@ def generate_launch_description(): namespaced_hazards_params_yaml_file = ReplaceString( source_file=hazards_params_yaml_file, - replacements={'/hazard_detection': ('/', namespace, '/hazard_detection')} + replacements={'/hazard_detection': (namespace, '/hazard_detection')} ) namespaced_ir_intensity_params_yaml_file = ReplaceString( source_file=ir_intensity_params_yaml_file, - replacements={'/ir_intensity': ('/', namespace, '/ir_intensity')} + replacements={'/ir_intensity': (namespace, '/ir_intensity')} ) namespaced_wheel_status_params_yaml_file = ReplaceString( source_file=wheel_status_params_yaml_file, - replacements={'/wheel_vels': ('/', namespace, '/wheel_vels'), - '/wheel_ticks': ('/', namespace, '/wheel_ticks')} + replacements={'/wheel_vels': (namespace, '/wheel_vels'), + '/wheel_ticks': (namespace, '/wheel_ticks')} ) namespaced_mock_params_yaml_file = ReplaceString( source_file=mock_params_yaml_file, - replacements={'/slip_status': ('/', namespace, '/slip_status')} + replacements={'/slip_status': (namespace, '/slip_status')} ) namespaced_robot_state_yaml_file = ReplaceString( source_file=robot_state_yaml_file, - replacements={'/stop_status': ('/', namespace, '/stop_status'), - '/battery_state': ('/', namespace, '/battery_state'), - '/dock': ('/', namespace, '/dock'), - '/odom': ('/', namespace, '/odom')} + replacements={'/stop_status': (namespace, '/stop_status'), + '/battery_state': (namespace, '/battery_state'), + '/dock': (namespace, '/dock'), + '/odom': (namespace, '/odom')} ) namespaced_kidnap_estimator_yaml_file = ReplaceString( source_file=kidnap_estimator_yaml_file, - replacements={'/kidnap_status': ('/', namespace, '/kidnap_status'), - '/hazard_detection': ('/', namespace, '/hazard_detection')} + replacements={'/kidnap_status': (namespace, '/kidnap_status'), + '/hazard_detection': (namespace, '/hazard_detection')} ) namespaced_ui_mgr_params_yaml_file = ReplaceString( source_file=ui_mgr_params_yaml_file, - replacements={'/interface_buttons': ('/', namespace, '/interface_buttons'), - '/cmd_lightring': ('/', namespace, '/cmd_lightring'), - '/cmd_audio': ('/', namespace, '/cmd_audio')} + replacements={'/interface_buttons': (namespace, '/interface_buttons'), + '/cmd_lightring': (namespace, '/cmd_lightring'), + '/cmd_audio': (namespace, '/cmd_audio')} ) # Publish hazards vector - hazards_vector_node = Node( - condition=LaunchConfigurationEquals('namespace', ''), - package='irobot_create_nodes', - name='hazards_vector_publisher', - namespace=namespace, - executable='hazards_vector_publisher', - parameters=[hazards_params_yaml_file, - {'use_sim_time': True}], - output='screen', - ) + # hazards_vector_node = Node( + # # condition=LaunchConfigurationEquals('namespace', ''), + # package='irobot_create_nodes', + # name='hazards_vector_publisher', + # namespace=namespace, + # executable='hazards_vector_publisher', + # parameters=[hazards_params_yaml_file, + # {'use_sim_time': True}], + # output='screen', + # ) hazards_vector_node_namespaced = Node( - condition=LaunchConfigurationNotEquals('namespace', ''), + # condition=LaunchConfigurationNotEquals('namespace', ''), package='irobot_create_nodes', name='hazards_vector_publisher', namespace=namespace, @@ -119,19 +119,19 @@ def generate_launch_description(): ) # Publish IR intensity vector - ir_intensity_vector_node = Node( - condition=LaunchConfigurationEquals('namespace', ''), - package='irobot_create_nodes', - name='ir_intensity_vector_publisher', - namespace=namespace, - executable='ir_intensity_vector_publisher', - parameters=[ir_intensity_params_yaml_file, - {'use_sim_time': True}], - output='screen', - ) + # ir_intensity_vector_node = Node( + # condition=LaunchConfigurationEquals('namespace', ''), + # package='irobot_create_nodes', + # name='ir_intensity_vector_publisher', + # namespace=namespace, + # executable='ir_intensity_vector_publisher', + # parameters=[ir_intensity_params_yaml_file, + # {'use_sim_time': True}], + # output='screen', + # ) ir_intensity_vector_node_namespaced = Node( - condition=LaunchConfigurationNotEquals('namespace', ''), + # condition=LaunchConfigurationNotEquals('namespace', ''), package='irobot_create_nodes', name='ir_intensity_vector_publisher', namespace=namespace, @@ -152,19 +152,19 @@ def generate_launch_description(): ) # Publish wheel status - wheel_status_node = Node( - condition=LaunchConfigurationEquals('namespace', ''), - package='irobot_create_nodes', - name='wheel_status_publisher', - namespace=namespace, - executable='wheel_status_publisher', - parameters=[wheel_status_params_yaml_file, - {'use_sim_time': True}], - output='screen', - ) + # wheel_status_node = Node( + # condition=LaunchConfigurationEquals('namespace', ''), + # package='irobot_create_nodes', + # name='wheel_status_publisher', + # namespace=namespace, + # executable='wheel_status_publisher', + # parameters=[wheel_status_params_yaml_file, + # {'use_sim_time': True}], + # output='screen', + # ) wheel_status_node_namespaced = Node( - condition=LaunchConfigurationNotEquals('namespace', ''), + # condition=LaunchConfigurationNotEquals('namespace', ''), package='irobot_create_nodes', name='wheel_status_publisher', namespace=namespace, @@ -175,19 +175,19 @@ def generate_launch_description(): ) # Publish mock topics - mock_topics_node = Node( - condition=LaunchConfigurationEquals('namespace', ''), - package='irobot_create_nodes', - name='mock_publisher', - namespace=namespace, - executable='mock_publisher', - parameters=[mock_params_yaml_file, - {'use_sim_time': True}], - output='screen', - ) + # mock_topics_node = Node( + # condition=LaunchConfigurationEquals('namespace', ''), + # package='irobot_create_nodes', + # name='mock_publisher', + # namespace=namespace, + # executable='mock_publisher', + # parameters=[mock_params_yaml_file, + # {'use_sim_time': True}], + # output='screen', + # ) mock_topics_node_namespaced = Node( - condition=LaunchConfigurationNotEquals('namespace', ''), + # condition=LaunchConfigurationNotEquals('namespace', ''), package='irobot_create_nodes', name='mock_publisher', namespace=namespace, @@ -198,19 +198,19 @@ def generate_launch_description(): ) # Publish robot state - robot_state_node = Node( - condition=LaunchConfigurationEquals('namespace', ''), - package='irobot_create_nodes', - name='robot_state', - namespace=namespace, - executable='robot_state', - parameters=[robot_state_yaml_file, - {'use_sim_time': True}], - output='screen', - ) + # robot_state_node = Node( + # condition=LaunchConfigurationEquals('namespace', ''), + # package='irobot_create_nodes', + # name='robot_state', + # namespace=namespace, + # executable='robot_state', + # parameters=[robot_state_yaml_file, + # {'use_sim_time': True}], + # output='screen', + # ) robot_state_node_namespaced = Node( - condition=LaunchConfigurationNotEquals('namespace', ''), + # condition=LaunchConfigurationNotEquals('namespace', ''), package='irobot_create_nodes', name='robot_state', namespace=namespace, @@ -221,19 +221,19 @@ def generate_launch_description(): ) # Publish kidnap estimator - kidnap_estimator_node = Node( - condition=LaunchConfigurationEquals('namespace', ''), - package='irobot_create_nodes', - name='kidnap_estimator_publisher', - namespace=namespace, - executable='kidnap_estimator_publisher', - parameters=[kidnap_estimator_yaml_file, - {'use_sim_time': True}], - output='screen', - ) + # kidnap_estimator_node = Node( + # condition=LaunchConfigurationEquals('namespace', ''), + # package='irobot_create_nodes', + # name='kidnap_estimator_publisher', + # namespace=namespace, + # executable='kidnap_estimator_publisher', + # parameters=[kidnap_estimator_yaml_file, + # {'use_sim_time': True}], + # output='screen', + # ) kidnap_estimator_node_namespaced = Node( - condition=LaunchConfigurationNotEquals('namespace', ''), + # condition=LaunchConfigurationNotEquals('namespace', ''), package='irobot_create_nodes', name='kidnap_estimator_publisher', namespace=namespace, @@ -244,20 +244,20 @@ def generate_launch_description(): ) # UI topics / actions - ui_mgr_node = Node( - condition=LaunchConfigurationEquals('namespace', ''), - package='irobot_create_nodes', - name='ui_mgr', - namespace=namespace, - executable='ui_mgr', - parameters=[ui_mgr_params_yaml_file, - {'use_sim_time': True}, - {'gazebo': LaunchConfiguration('gazebo')}], - output='screen', - ) + # ui_mgr_node = Node( + # # condition=LaunchConfigurationEquals('namespace', ''), + # package='irobot_create_nodes', + # name='ui_mgr', + # namespace=namespace, + # executable='ui_mgr', + # parameters=[ui_mgr_params_yaml_file, + # {'use_sim_time': True}, + # {'gazebo': LaunchConfiguration('gazebo')}], + # output='screen', + # ) ui_mgr_node_namespaced = Node( - condition=LaunchConfigurationNotEquals('namespace', ''), + # condition=LaunchConfigurationNotEquals('namespace', ''), package='irobot_create_nodes', name='ui_mgr', namespace=namespace, @@ -273,20 +273,20 @@ def generate_launch_description(): # Include robot description ld.add_action(diffdrive_controller) # Add nodes to LaunchDescription - ld.add_action(hazards_vector_node) + # ld.add_action(hazards_vector_node) ld.add_action(hazards_vector_node_namespaced) - ld.add_action(ir_intensity_vector_node) + # ld.add_action(ir_intensity_vector_node) ld.add_action(ir_intensity_vector_node_namespaced) ld.add_action(motion_control_node) - ld.add_action(wheel_status_node) + # ld.add_action(wheel_status_node) ld.add_action(wheel_status_node_namespaced) - ld.add_action(mock_topics_node) + # ld.add_action(mock_topics_node) ld.add_action(mock_topics_node_namespaced) - ld.add_action(robot_state_node) + # ld.add_action(robot_state_node) ld.add_action(robot_state_node_namespaced) - ld.add_action(kidnap_estimator_node) + # ld.add_action(kidnap_estimator_node) ld.add_action(kidnap_estimator_node_namespaced) - ld.add_action(ui_mgr_node) + # ld.add_action(ui_mgr_node) ld.add_action(ui_mgr_node_namespaced) return ld diff --git a/irobot_create_common/irobot_create_control/config/control.yaml b/irobot_create_common/irobot_create_control/config/control.yaml index 9e21753e..cbef4bc0 100644 --- a/irobot_create_common/irobot_create_control/config/control.yaml +++ b/irobot_create_common/irobot_create_control/config/control.yaml @@ -1,14 +1,89 @@ /**: + controller_manager: + ros__parameters: + update_rate: 1000 # Hz + + robot_0_joint_state_broadcaster: + type: joint_state_broadcaster/JointStateBroadcaster + + robot_0_diffdrive_controller: + type: diff_drive_controller/DiffDriveController + + robot_1_joint_state_broadcaster: + type: joint_state_broadcaster/JointStateBroadcaster + + robot_1_diffdrive_controller: + type: diff_drive_controller/DiffDriveController + +robot_0_diffdrive_controller: ros__parameters: - update_rate: 1000 # Hz + use_sim_time: True + left_wheel_names: ["left_wheel_joint"] + right_wheel_names: ["right_wheel_joint"] - joint_state_broadcaster: - type: joint_state_broadcaster/JointStateBroadcaster + wheel_separation: 0.233 + wheel_radius: 0.03575 - diffdrive_controller: - type: diff_drive_controller/DiffDriveController + # Multiplier applied to the wheel separation parameter. + # This is used to account for a difference between the robot model and a real robot. + wheel_separation_multiplier: 1.0 -/**: + # Multipliers applied to the wheel radius parameter. + # This is used to account for a difference between the robot model and a real robot. + left_wheel_radius_multiplier: 1.0 + right_wheel_radius_multiplier: 1.0 + + publish_rate: 62.0 + odom_frame_id: odom + base_frame_id: base_link + pose_covariance_diagonal : [0.001, 0.001, 0.001, 0.001, 0.001, 0.01] + twist_covariance_diagonal: [0.001, 0.001, 0.001, 0.001, 0.001, 0.01] + + open_loop: false + enable_odom_tf: true + + cmd_vel_timeout: 0.5 + use_stamped_vel: false + + # Preserve turning radius when limiting speed/acceleration/jerk + preserve_turning_radius: true + + # Publish limited velocity + publish_cmd: true + + # Publish wheel data + publish_wheel_data: true + + # Velocity and acceleration limits in cartesian + # These limits do not factor in per wheel limits + # that might be exceeded when linear and angular are combined + # Whenever a min_* is unspecified, default to -max_* + linear.x.has_velocity_limits: true + linear.x.has_acceleration_limits: true + linear.x.has_jerk_limits: false + # This is max if system is safety_override "full" + # motion_control_node will bound this to 0.306 if safety enabled (as is by default) + linear.x.max_velocity: 0.46 + linear.x.min_velocity: -0.46 + linear.x.max_acceleration: 0.9 + # Not using jerk limits yet + # linear.x.max_jerk: 0.0 + # linear.x.min_jerk: 0.0 + + angular.z.has_velocity_limits: true + angular.z.has_acceleration_limits: true + angular.z.has_jerk_limits: false + angular.z.max_velocity: 1.9 + angular.z.min_velocity: -1.9 + # Using 0.9 linear for each wheel, assuming one wheel accel to .9 + # and other to -.9 with wheelbase leads to 7.725 rad/s^2 + angular.z.max_acceleration: 7.725 + angular.z.min_acceleration: -7.725 + # Not using jerk limits yet + # angular.z.max_jerk: 0.0 + # angular.z.min_jerk: 0.0 + +robot_1_diffdrive_controller: ros__parameters: use_sim_time: True left_wheel_names: ["left_wheel_joint"] diff --git a/irobot_create_common/irobot_create_control/config/control_0.yaml b/irobot_create_common/irobot_create_control/config/control_0.yaml new file mode 100644 index 00000000..e69de29b diff --git a/irobot_create_common/irobot_create_control/config/control_1.yaml b/irobot_create_common/irobot_create_control/config/control_1.yaml new file mode 100644 index 00000000..e69de29b diff --git a/irobot_create_common/irobot_create_control/launch/include/control.py b/irobot_create_common/irobot_create_control/launch/include/control.py index ed0a28c1..5128a616 100644 --- a/irobot_create_common/irobot_create_control/launch/include/control.py +++ b/irobot_create_common/irobot_create_control/launch/include/control.py @@ -28,7 +28,7 @@ def generate_launch_description(): executable='spawner', namespace=namespace, parameters=[control_params_file], - arguments=['diffdrive_controller', '-c', namespaced_node_name], + arguments=['robot_1_diffdrive_controller', '-c', namespaced_node_name], output='screen', ) @@ -36,7 +36,7 @@ def generate_launch_description(): package='controller_manager', executable='spawner', namespace=namespace, - arguments=['joint_state_broadcaster', '-c', namespaced_node_name], + arguments=['robot_1_joint_state_broadcaster', '-c', namespaced_node_name], output='screen', ) diff --git a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ros_ignition_bridge.launch.py b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ros_ignition_bridge.launch.py index 88302370..3f97c9e1 100644 --- a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ros_ignition_bridge.launch.py +++ b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ros_ignition_bridge.launch.py @@ -53,20 +53,20 @@ def generate_launch_description(): condition=IfCondition(use_sim_time)) # cmd_vel bridge - cmd_vel_bridge = Node(condition=LaunchConfigurationEquals('namespace', ''), - package='ros_ign_bridge', - executable='parameter_bridge', - name='cmd_vel_bridge', - output='screen', - parameters=[{ - 'use_sim_time': use_sim_time}], - arguments=['/cmd_vel' + '@geometry_msgs/msg/Twist' + - '[ignition.msgs.Twist', - ['/model/', LaunchConfiguration('robot_name'), '/cmd_vel' + - '@geometry_msgs/msg/Twist' + - ']ignition.msgs.Twist']], - remappings=[(['/model/', LaunchConfiguration('robot_name'), '/cmd_vel'], - 'diffdrive_controller/cmd_vel_unstamped')]) + # cmd_vel_bridge = Node(condition=LaunchConfigurationEquals('namespace', ''), + # package='ros_ign_bridge', + # executable='parameter_bridge', + # name='cmd_vel_bridge', + # output='screen', + # parameters=[{ + # 'use_sim_time': use_sim_time}], + # arguments=['/cmd_vel' + '@geometry_msgs/msg/Twist' + + # '[ignition.msgs.Twist', + # ['/model/', LaunchConfiguration('robot_name'), '/cmd_vel' + + # '@geometry_msgs/msg/Twist' + + # ']ignition.msgs.Twist']], + # remappings=[(['/model/', LaunchConfiguration('robot_name'), '/cmd_vel'], + # 'diffdrive_controller/cmd_vel_unstamped')]) cmd_vel_bridge_namespaced = Node(condition=LaunchConfigurationNotEquals('namespace', ''), package='ros_ign_bridge', @@ -85,7 +85,7 @@ def generate_launch_description(): ']ignition.msgs.Twist']], remappings=[(['/model/', LaunchConfiguration('robot_name'), 'cmd_vel'], - 'diffdrive_controller/cmd_vel_unstamped')]) + [namespace ,'_diffdrive_controller/cmd_vel_unstamped'])]) # Pose bridge pose_bridge = Node(package='ros_ign_bridge', executable='parameter_bridge', @@ -208,7 +208,7 @@ def generate_launch_description(): # Create launch description and add actions ld = LaunchDescription(ARGUMENTS) ld.add_action(clock_bridge) - ld.add_action(cmd_vel_bridge) + # ld.add_action(cmd_vel_bridge) ld.add_action(cmd_vel_bridge_namespaced) ld.add_action(pose_bridge) ld.add_action(odom_base_tf_bridge) From c33245f4f72514f34a1f444825244cd97c4ff3a0 Mon Sep 17 00:00:00 2001 From: "badr.moutalib" Date: Wed, 3 Aug 2022 17:40:56 +0200 Subject: [PATCH 12/44] cmd_vel working for both no namespace, namespace and multi-robot namespace --- .../config/hazard_vector_params.yaml | 35 +-- .../config/ir_intensity_vector_params.yaml | 27 ++- .../config/kidnap_estimator_params.yaml | 11 +- .../config/mock_params.yaml | 11 +- .../config/robot_state_params.yaml | 42 ++-- .../config/ui_mgr_params.yaml | 17 +- .../config/wheel_status_params.yaml | 23 +- .../launch/create3_nodes.launch.py | 229 ++++++++++-------- .../irobot_create_control/config/control.yaml | 163 ++++++++++++- .../launch/include/control.py | 43 +++- .../urdf/create3.urdf.xacro | 2 +- .../src/motion_control_node.cpp | 11 +- .../launch/create3_ignition.launch.py | 4 +- .../create3_ros_ignition_bridge.launch.py | 39 +-- 14 files changed, 449 insertions(+), 208 deletions(-) diff --git a/irobot_create_common/irobot_create_common_bringup/config/hazard_vector_params.yaml b/irobot_create_common/irobot_create_common_bringup/config/hazard_vector_params.yaml index 4b9b02d8..5a1af8eb 100644 --- a/irobot_create_common/irobot_create_common_bringup/config/hazard_vector_params.yaml +++ b/irobot_create_common/irobot_create_common_bringup/config/hazard_vector_params.yaml @@ -1,19 +1,20 @@ --- /**: - ros__parameters: - # Hazard detection publisher topic - publisher_topic: /hazard_detection - publish_rate: 62.0 - subscription_topics: - # Bumper topic - - _internal/bumper/event - # Cliff topics - - _internal/cliff_front_left/event - - _internal/cliff_front_right/event - - _internal/cliff_side_left/event - - _internal/cliff_side_right/event - # Wheel drop topics - - _internal/wheel_drop/left_wheel/event - - _internal/wheel_drop/right_wheel/event - # Backup limit topic - - _internal/backup_limit + hazards_vector_publisher: + ros__parameters: + # Hazard detection publisher topic + publisher_topic: /hazard_detection + publish_rate: 62.0 + subscription_topics: + # Bumper topic + - _internal/bumper/event + # Cliff topics + - _internal/cliff_front_left/event + - _internal/cliff_front_right/event + - _internal/cliff_side_left/event + - _internal/cliff_side_right/event + # Wheel drop topics + - _internal/wheel_drop/left_wheel/event + - _internal/wheel_drop/right_wheel/event + # Backup limit topic + - _internal/backup_limit diff --git a/irobot_create_common/irobot_create_common_bringup/config/ir_intensity_vector_params.yaml b/irobot_create_common/irobot_create_common_bringup/config/ir_intensity_vector_params.yaml index 85c7108c..0a4fedb2 100644 --- a/irobot_create_common/irobot_create_common_bringup/config/ir_intensity_vector_params.yaml +++ b/irobot_create_common/irobot_create_common_bringup/config/ir_intensity_vector_params.yaml @@ -1,15 +1,16 @@ --- /**: - ros__parameters: - # IR intensity publisher topic - publisher_topic: /ir_intensity - publish_rate: 62.0 - subscription_topics: - # IR intensity topics - - _internal/ir_intensity_front_center_left - - _internal/ir_intensity_front_center_right - - _internal/ir_intensity_front_left - - _internal/ir_intensity_front_right - - _internal/ir_intensity_left - - _internal/ir_intensity_right - - _internal/ir_intensity_side_left + ir_intensity_vector_publisher: + ros__parameters: + # IR intensity publisher topic + publisher_topic: /ir_intensity + publish_rate: 62.0 + subscription_topics: + # IR intensity topics + - _internal/ir_intensity_front_center_left + - _internal/ir_intensity_front_center_right + - _internal/ir_intensity_front_left + - _internal/ir_intensity_front_right + - _internal/ir_intensity_left + - _internal/ir_intensity_right + - _internal/ir_intensity_side_left diff --git a/irobot_create_common/irobot_create_common_bringup/config/kidnap_estimator_params.yaml b/irobot_create_common/irobot_create_common_bringup/config/kidnap_estimator_params.yaml index 7a927eea..86740078 100644 --- a/irobot_create_common/irobot_create_common_bringup/config/kidnap_estimator_params.yaml +++ b/irobot_create_common/irobot_create_common_bringup/config/kidnap_estimator_params.yaml @@ -1,7 +1,8 @@ --- /**: - ros__parameters: - # Kidnap status publisher topic - kidnap_status_topic: /kidnap_status - # Subscription topics - hazard_topic: /hazard_detection + kidnap_estimator_publisher: + ros__parameters: + # Kidnap status publisher topic + kidnap_status_topic: /kidnap_status + # Subscription topics + hazard_topic: /hazard_detection diff --git a/irobot_create_common/irobot_create_common_bringup/config/mock_params.yaml b/irobot_create_common/irobot_create_common_bringup/config/mock_params.yaml index edfde6ae..0ec4f823 100644 --- a/irobot_create_common/irobot_create_common_bringup/config/mock_params.yaml +++ b/irobot_create_common/irobot_create_common_bringup/config/mock_params.yaml @@ -1,7 +1,8 @@ --- /**: - ros__parameters: - # Mock slip status publisher topic - slip_status_topic: /slip_status - # Publishers rate - slip_status_publish_rate: 62.0 + mock_publisher: + ros__parameters: + # Mock slip status publisher topic + slip_status_topic: /slip_status + # Publishers rate + slip_status_publish_rate: 62.0 diff --git a/irobot_create_common/irobot_create_common_bringup/config/robot_state_params.yaml b/irobot_create_common/irobot_create_common_bringup/config/robot_state_params.yaml index b0c29c3d..f19dbe98 100644 --- a/irobot_create_common/irobot_create_common_bringup/config/robot_state_params.yaml +++ b/irobot_create_common/irobot_create_common_bringup/config/robot_state_params.yaml @@ -1,22 +1,22 @@ ---- /**: - ros__parameters: - # Stop status publisher topic - stop_status_topic: /stop_status - # Mock battery state publisher topic - battery_state_topic: /battery_state - # Publishers rate - kidnap_status_publish_rate: 1.0 - stop_status_publish_rate: 62.0 - battery_state_publish_rate: 0.1 - # Subscription topics - dock_topic: /dock - wheel_vels_topic: /odom - # Stop status position difference tolerance - linear_velocity_tolerance: 0.01 - angular_velocity_tolerance: 0.1 - # Battery parameters - full_charge_percentage: 1.0 - battery_high_percentage: 0.9 - # Dock Parameters - undocked_charge_limit: 0.03 + robot_state: + ros__parameters: + # Stop status publisher topic + stop_status_topic: /stop_status + # Mock battery state publisher topic + battery_state_topic: /battery_state + # Publishers rate + kidnap_status_publish_rate: 1.0 + stop_status_publish_rate: 62.0 + battery_state_publish_rate: 0.1 + # Subscription topics + dock_topic: /dock + wheel_vels_topic: /odom + # Stop status position difference tolerance + linear_velocity_tolerance: 0.01 + angular_velocity_tolerance: 0.1 + # Battery parameters + full_charge_percentage: 1.0 + battery_high_percentage: 0.9 + # Dock Parameters + undocked_charge_limit: 0.03 diff --git a/irobot_create_common/irobot_create_common_bringup/config/ui_mgr_params.yaml b/irobot_create_common/irobot_create_common_bringup/config/ui_mgr_params.yaml index 47dfc205..b5d3aa21 100644 --- a/irobot_create_common/irobot_create_common_bringup/config/ui_mgr_params.yaml +++ b/irobot_create_common/irobot_create_common_bringup/config/ui_mgr_params.yaml @@ -1,10 +1,11 @@ --- /**: - ros__parameters: - # Buttons publisher topic - button_topic: /interface_buttons - # Publishers rate - buttons_publish_rate: 1.0 - # Subscription topics - lightring_topic: /cmd_lightring - audio_topic: /cmd_audio + ui_mgr: + ros__parameters: + # Buttons publisher topic + button_topic: interface_buttons + # Publishers rate + buttons_publish_rate: 1.0 + # Subscription topics + lightring_topic: cmd_lightring + audio_topic: cmd_audio diff --git a/irobot_create_common/irobot_create_common_bringup/config/wheel_status_params.yaml b/irobot_create_common/irobot_create_common_bringup/config/wheel_status_params.yaml index 28fb7c52..8366752b 100644 --- a/irobot_create_common/irobot_create_common_bringup/config/wheel_status_params.yaml +++ b/irobot_create_common/irobot_create_common_bringup/config/wheel_status_params.yaml @@ -1,13 +1,14 @@ --- /**: - ros__parameters: - # Publish rate - publish_rate: 62.0 - # Encoder resolution - encoder_resolution: 508.8 - # Wheel radius - wheel_radius: 0.03575 - # Wheels angular velocity topic - velocity_topic: /wheel_vels - # Wheels' net encoder ticks topic - ticks_topic: /wheel_ticks + wheel_status_publisher: + ros__parameters: + # Publish rate + publish_rate: 62.0 + # Encoder resolution + encoder_resolution: 508.8 + # Wheel radius + wheel_radius: 0.03575 + # Wheels angular velocity topic + velocity_topic: /wheel_vels + # Wheels' net encoder ticks topic + ticks_topic: /wheel_ticks diff --git a/irobot_create_common/irobot_create_common_bringup/launch/create3_nodes.launch.py b/irobot_create_common/irobot_create_common_bringup/launch/create3_nodes.launch.py index 5d7ea1d1..06c74a14 100644 --- a/irobot_create_common/irobot_create_common_bringup/launch/create3_nodes.launch.py +++ b/irobot_create_common/irobot_create_common_bringup/launch/create3_nodes.launch.py @@ -21,7 +21,6 @@ description='Robot namespace') ] - def generate_launch_description(): # Directories @@ -53,62 +52,91 @@ def generate_launch_description(): launch_arguments=[('namespace', LaunchConfiguration('namespace'))] ) + # hazard_vector_params namespaced_hazards_params_yaml_file = ReplaceString( source_file=hazards_params_yaml_file, - replacements={'/hazard_detection': (namespace, '/hazard_detection')} + replacements={'/hazard_detection': ('/', namespace, '/hazard_detection')} ) + # ir_intensity namespaced_ir_intensity_params_yaml_file = ReplaceString( source_file=ir_intensity_params_yaml_file, - replacements={'/ir_intensity': (namespace, '/ir_intensity')} + replacements={'/ir_intensity': ('/', namespace, '/ir_intensity')} ) + # wheel_status_publisher namespaced_wheel_status_params_yaml_file = ReplaceString( source_file=wheel_status_params_yaml_file, - replacements={'/wheel_vels': (namespace, '/wheel_vels'), - '/wheel_ticks': (namespace, '/wheel_ticks')} + replacements={'/wheel_vels': ('/', namespace, '/wheel_vels')} + ) + namespaced_wheel_status_params_yaml_file = ReplaceString( + source_file=namespaced_wheel_status_params_yaml_file, + replacements={'/wheel_ticks': ('/', namespace, '/wheel_ticks')} ) + # mock namespaced_mock_params_yaml_file = ReplaceString( source_file=mock_params_yaml_file, - replacements={'/slip_status': (namespace, '/slip_status')} + replacements={'/slip_status': ('/', namespace, '/slip_status')} ) + # robot_state namespaced_robot_state_yaml_file = ReplaceString( source_file=robot_state_yaml_file, - replacements={'/stop_status': (namespace, '/stop_status'), - '/battery_state': (namespace, '/battery_state'), - '/dock': (namespace, '/dock'), - '/odom': (namespace, '/odom')} + replacements={'/stop_status': ('/', namespace, '/stop_status')} + ) + namespaced_robot_state_yaml_file = ReplaceString( + source_file=namespaced_robot_state_yaml_file, + replacements={'/battery_state': ('/', namespace, '/battery_state')} + ) + namespaced_robot_state_yaml_file = ReplaceString( + source_file=namespaced_robot_state_yaml_file, + replacements={'/dock': ('/', namespace, '/dock')} + ) + namespaced_robot_state_yaml_file = ReplaceString( + source_file=namespaced_robot_state_yaml_file, + replacements={'/odom': ('/', namespace, '/odom')} ) + # kidnap_estimator namespaced_kidnap_estimator_yaml_file = ReplaceString( source_file=kidnap_estimator_yaml_file, - replacements={'/kidnap_status': (namespace, '/kidnap_status'), - '/hazard_detection': (namespace, '/hazard_detection')} + replacements={'/kidnap_status': ('/', namespace, '/kidnap_status')} + ) + namespaced_kidnap_estimator_yaml_file = ReplaceString( + source_file=namespaced_kidnap_estimator_yaml_file, + replacements={'/hazard_detection': ('/', namespace, '/hazard_detection')} ) + # ui_mgr_params namespaced_ui_mgr_params_yaml_file = ReplaceString( source_file=ui_mgr_params_yaml_file, - replacements={'/interface_buttons': (namespace, '/interface_buttons'), - '/cmd_lightring': (namespace, '/cmd_lightring'), - '/cmd_audio': (namespace, '/cmd_audio')} + replacements={'interface_buttons': ('/', namespace, '/interface_buttons')} + ) + namespaced_ui_mgr_params_yaml_file = ReplaceString( + source_file=namespaced_ui_mgr_params_yaml_file, + replacements={'cmd_lightring': ('/', namespace, '/cmd_lightring')} + ) + namespaced_ui_mgr_params_yaml_file = ReplaceString( + source_file=namespaced_ui_mgr_params_yaml_file, + replacements={'cmd_audio': ('/', namespace, '/cmd_audio')} ) + # Publish hazards vector - # hazards_vector_node = Node( - # # condition=LaunchConfigurationEquals('namespace', ''), - # package='irobot_create_nodes', - # name='hazards_vector_publisher', - # namespace=namespace, - # executable='hazards_vector_publisher', - # parameters=[hazards_params_yaml_file, - # {'use_sim_time': True}], - # output='screen', - # ) + hazards_vector_node = Node( + condition=LaunchConfigurationEquals('namespace', ''), + package='irobot_create_nodes', + name='hazards_vector_publisher', + namespace=namespace, + executable='hazards_vector_publisher', + parameters=[hazards_params_yaml_file, + {'use_sim_time': True}], + output='screen', + ) hazards_vector_node_namespaced = Node( - # condition=LaunchConfigurationNotEquals('namespace', ''), + condition=LaunchConfigurationNotEquals('namespace', ''), package='irobot_create_nodes', name='hazards_vector_publisher', namespace=namespace, @@ -119,19 +147,19 @@ def generate_launch_description(): ) # Publish IR intensity vector - # ir_intensity_vector_node = Node( - # condition=LaunchConfigurationEquals('namespace', ''), - # package='irobot_create_nodes', - # name='ir_intensity_vector_publisher', - # namespace=namespace, - # executable='ir_intensity_vector_publisher', - # parameters=[ir_intensity_params_yaml_file, - # {'use_sim_time': True}], - # output='screen', - # ) + ir_intensity_vector_node = Node( + condition=LaunchConfigurationEquals('namespace', ''), + package='irobot_create_nodes', + name='ir_intensity_vector_publisher', + namespace=namespace, + executable='ir_intensity_vector_publisher', + parameters=[ir_intensity_params_yaml_file, + {'use_sim_time': True}], + output='screen', + ) ir_intensity_vector_node_namespaced = Node( - # condition=LaunchConfigurationNotEquals('namespace', ''), + condition=LaunchConfigurationNotEquals('namespace', ''), package='irobot_create_nodes', name='ir_intensity_vector_publisher', namespace=namespace, @@ -152,19 +180,19 @@ def generate_launch_description(): ) # Publish wheel status - # wheel_status_node = Node( - # condition=LaunchConfigurationEquals('namespace', ''), - # package='irobot_create_nodes', - # name='wheel_status_publisher', - # namespace=namespace, - # executable='wheel_status_publisher', - # parameters=[wheel_status_params_yaml_file, - # {'use_sim_time': True}], - # output='screen', - # ) + wheel_status_node = Node( + condition=LaunchConfigurationEquals('namespace', ''), + package='irobot_create_nodes', + name='wheel_status_publisher', + namespace=namespace, + executable='wheel_status_publisher', + parameters=[wheel_status_params_yaml_file, + {'use_sim_time': True}], + output='screen', + ) wheel_status_node_namespaced = Node( - # condition=LaunchConfigurationNotEquals('namespace', ''), + condition=LaunchConfigurationNotEquals('namespace', ''), package='irobot_create_nodes', name='wheel_status_publisher', namespace=namespace, @@ -175,19 +203,19 @@ def generate_launch_description(): ) # Publish mock topics - # mock_topics_node = Node( - # condition=LaunchConfigurationEquals('namespace', ''), - # package='irobot_create_nodes', - # name='mock_publisher', - # namespace=namespace, - # executable='mock_publisher', - # parameters=[mock_params_yaml_file, - # {'use_sim_time': True}], - # output='screen', - # ) + mock_topics_node = Node( + condition=LaunchConfigurationEquals('namespace', ''), + package='irobot_create_nodes', + name='mock_publisher', + namespace=namespace, + executable='mock_publisher', + parameters=[mock_params_yaml_file, + {'use_sim_time': True}], + output='screen', + ) mock_topics_node_namespaced = Node( - # condition=LaunchConfigurationNotEquals('namespace', ''), + condition=LaunchConfigurationNotEquals('namespace', ''), package='irobot_create_nodes', name='mock_publisher', namespace=namespace, @@ -198,19 +226,19 @@ def generate_launch_description(): ) # Publish robot state - # robot_state_node = Node( - # condition=LaunchConfigurationEquals('namespace', ''), - # package='irobot_create_nodes', - # name='robot_state', - # namespace=namespace, - # executable='robot_state', - # parameters=[robot_state_yaml_file, - # {'use_sim_time': True}], - # output='screen', - # ) + robot_state_node = Node( + condition=LaunchConfigurationEquals('namespace', ''), + package='irobot_create_nodes', + name='robot_state', + namespace=namespace, + executable='robot_state', + parameters=[robot_state_yaml_file, + {'use_sim_time': True}], + output='screen', + ) robot_state_node_namespaced = Node( - # condition=LaunchConfigurationNotEquals('namespace', ''), + condition=LaunchConfigurationNotEquals('namespace', ''), package='irobot_create_nodes', name='robot_state', namespace=namespace, @@ -221,19 +249,19 @@ def generate_launch_description(): ) # Publish kidnap estimator - # kidnap_estimator_node = Node( - # condition=LaunchConfigurationEquals('namespace', ''), - # package='irobot_create_nodes', - # name='kidnap_estimator_publisher', - # namespace=namespace, - # executable='kidnap_estimator_publisher', - # parameters=[kidnap_estimator_yaml_file, - # {'use_sim_time': True}], - # output='screen', - # ) + kidnap_estimator_node = Node( + condition=LaunchConfigurationEquals('namespace', ''), + package='irobot_create_nodes', + name='kidnap_estimator_publisher', + namespace=namespace, + executable='kidnap_estimator_publisher', + parameters=[kidnap_estimator_yaml_file, + {'use_sim_time': True}], + output='screen', + ) kidnap_estimator_node_namespaced = Node( - # condition=LaunchConfigurationNotEquals('namespace', ''), + condition=LaunchConfigurationNotEquals('namespace', ''), package='irobot_create_nodes', name='kidnap_estimator_publisher', namespace=namespace, @@ -244,20 +272,20 @@ def generate_launch_description(): ) # UI topics / actions - # ui_mgr_node = Node( - # # condition=LaunchConfigurationEquals('namespace', ''), - # package='irobot_create_nodes', - # name='ui_mgr', - # namespace=namespace, - # executable='ui_mgr', - # parameters=[ui_mgr_params_yaml_file, - # {'use_sim_time': True}, - # {'gazebo': LaunchConfiguration('gazebo')}], - # output='screen', - # ) + ui_mgr_node = Node( + condition=LaunchConfigurationEquals('namespace', ''), + package='irobot_create_nodes', + name='ui_mgr', + namespace=namespace, + executable='ui_mgr', + parameters=[ui_mgr_params_yaml_file, + {'use_sim_time': True}, + {'gazebo': LaunchConfiguration('gazebo')}], + output='screen', + ) ui_mgr_node_namespaced = Node( - # condition=LaunchConfigurationNotEquals('namespace', ''), + condition=LaunchConfigurationNotEquals('namespace', ''), package='irobot_create_nodes', name='ui_mgr', namespace=namespace, @@ -273,20 +301,21 @@ def generate_launch_description(): # Include robot description ld.add_action(diffdrive_controller) # Add nodes to LaunchDescription - # ld.add_action(hazards_vector_node) + ld.add_action(hazards_vector_node) ld.add_action(hazards_vector_node_namespaced) - # ld.add_action(ir_intensity_vector_node) + ld.add_action(ir_intensity_vector_node) ld.add_action(ir_intensity_vector_node_namespaced) ld.add_action(motion_control_node) - # ld.add_action(wheel_status_node) + ld.add_action(wheel_status_node) ld.add_action(wheel_status_node_namespaced) - # ld.add_action(mock_topics_node) + ld.add_action(mock_topics_node) ld.add_action(mock_topics_node_namespaced) - # ld.add_action(robot_state_node) + ld.add_action(robot_state_node) ld.add_action(robot_state_node_namespaced) - # ld.add_action(kidnap_estimator_node) + ld.add_action(kidnap_estimator_node) ld.add_action(kidnap_estimator_node_namespaced) - # ld.add_action(ui_mgr_node) + ld.add_action(ui_mgr_node) ld.add_action(ui_mgr_node_namespaced) return ld + \ No newline at end of file diff --git a/irobot_create_common/irobot_create_control/config/control.yaml b/irobot_create_common/irobot_create_control/config/control.yaml index cbef4bc0..498596ab 100644 --- a/irobot_create_common/irobot_create_control/config/control.yaml +++ b/irobot_create_common/irobot_create_control/config/control.yaml @@ -1,4 +1,13 @@ -/**: +controller_manager: + ros__parameters: + update_rate: 1000 # Hz + + joint_state_broadcaster: + type: joint_state_broadcaster/JointStateBroadcaster + + diffdrive_controller: + type: diff_drive_controller/DiffDriveController +/robot_0: controller_manager: ros__parameters: update_rate: 1000 # Hz @@ -9,12 +18,96 @@ robot_0_diffdrive_controller: type: diff_drive_controller/DiffDriveController +/robot_1: + controller_manager: + ros__parameters: + update_rate: 1000 # Hz + robot_1_joint_state_broadcaster: type: joint_state_broadcaster/JointStateBroadcaster robot_1_diffdrive_controller: type: diff_drive_controller/DiffDriveController +/robot_2: + controller_manager: + ros__parameters: + update_rate: 1000 # Hz + + robot_2_joint_state_broadcaster: + type: joint_state_broadcaster/JointStateBroadcaster + + robot_2_diffdrive_controller: + type: diff_drive_controller/DiffDriveController + +diffdrive_controller: + ros__parameters: + use_sim_time: True + left_wheel_names: ["left_wheel_joint"] + right_wheel_names: ["right_wheel_joint"] + + wheel_separation: 0.233 + wheel_radius: 0.03575 + + # Multiplier applied to the wheel separation parameter. + # This is used to account for a difference between the robot model and a real robot. + wheel_separation_multiplier: 1.0 + + # Multipliers applied to the wheel radius parameter. + # This is used to account for a difference between the robot model and a real robot. + left_wheel_radius_multiplier: 1.0 + right_wheel_radius_multiplier: 1.0 + + publish_rate: 62.0 + odom_frame_id: odom + base_frame_id: base_link + pose_covariance_diagonal : [0.001, 0.001, 0.001, 0.001, 0.001, 0.01] + twist_covariance_diagonal: [0.001, 0.001, 0.001, 0.001, 0.001, 0.01] + + open_loop: false + enable_odom_tf: true + + cmd_vel_timeout: 0.5 + use_stamped_vel: false + + # Preserve turning radius when limiting speed/acceleration/jerk + preserve_turning_radius: true + + # Publish limited velocity + publish_cmd: true + + # Publish wheel data + publish_wheel_data: true + + # Velocity and acceleration limits in cartesian + # These limits do not factor in per wheel limits + # that might be exceeded when linear and angular are combined + # Whenever a min_* is unspecified, default to -max_* + linear.x.has_velocity_limits: true + linear.x.has_acceleration_limits: true + linear.x.has_jerk_limits: false + # This is max if system is safety_override "full" + # motion_control_node will bound this to 0.306 if safety enabled (as is by default) + linear.x.max_velocity: 0.46 + linear.x.min_velocity: -0.46 + linear.x.max_acceleration: 0.9 + # Not using jerk limits yet + # linear.x.max_jerk: 0.0 + # linear.x.min_jerk: 0.0 + + angular.z.has_velocity_limits: true + angular.z.has_acceleration_limits: true + angular.z.has_jerk_limits: false + angular.z.max_velocity: 1.9 + angular.z.min_velocity: -1.9 + # Using 0.9 linear for each wheel, assuming one wheel accel to .9 + # and other to -.9 with wheelbase leads to 7.725 rad/s^2 + angular.z.max_acceleration: 7.725 + angular.z.min_acceleration: -7.725 + # Not using jerk limits yet + # angular.z.max_jerk: 0.0 + # angular.z.min_jerk: 0.0 + robot_0_diffdrive_controller: ros__parameters: use_sim_time: True @@ -150,3 +243,71 @@ robot_1_diffdrive_controller: # Not using jerk limits yet # angular.z.max_jerk: 0.0 # angular.z.min_jerk: 0.0 + +robot_2_diffdrive_controller: + ros__parameters: + use_sim_time: True + left_wheel_names: ["left_wheel_joint"] + right_wheel_names: ["right_wheel_joint"] + + wheel_separation: 0.233 + wheel_radius: 0.03575 + + # Multiplier applied to the wheel separation parameter. + # This is used to account for a difference between the robot model and a real robot. + wheel_separation_multiplier: 1.0 + + # Multipliers applied to the wheel radius parameter. + # This is used to account for a difference between the robot model and a real robot. + left_wheel_radius_multiplier: 1.0 + right_wheel_radius_multiplier: 1.0 + + publish_rate: 62.0 + odom_frame_id: odom + base_frame_id: base_link + pose_covariance_diagonal : [0.001, 0.001, 0.001, 0.001, 0.001, 0.01] + twist_covariance_diagonal: [0.001, 0.001, 0.001, 0.001, 0.001, 0.01] + + open_loop: false + enable_odom_tf: true + + cmd_vel_timeout: 0.5 + use_stamped_vel: false + + # Preserve turning radius when limiting speed/acceleration/jerk + preserve_turning_radius: true + + # Publish limited velocity + publish_cmd: true + + # Publish wheel data + publish_wheel_data: true + + # Velocity and acceleration limits in cartesian + # These limits do not factor in per wheel limits + # that might be exceeded when linear and angular are combined + # Whenever a min_* is unspecified, default to -max_* + linear.x.has_velocity_limits: true + linear.x.has_acceleration_limits: true + linear.x.has_jerk_limits: false + # This is max if system is safety_override "full" + # motion_control_node will bound this to 0.306 if safety enabled (as is by default) + linear.x.max_velocity: 0.46 + linear.x.min_velocity: -0.46 + linear.x.max_acceleration: 0.9 + # Not using jerk limits yet + # linear.x.max_jerk: 0.0 + # linear.x.min_jerk: 0.0 + + angular.z.has_velocity_limits: true + angular.z.has_acceleration_limits: true + angular.z.has_jerk_limits: false + angular.z.max_velocity: 1.9 + angular.z.min_velocity: -1.9 + # Using 0.9 linear for each wheel, assuming one wheel accel to .9 + # and other to -.9 with wheelbase leads to 7.725 rad/s^2 + angular.z.max_acceleration: 7.725 + angular.z.min_acceleration: -7.725 + # Not using jerk limits yet + # angular.z.max_jerk: 0.0 + # angular.z.min_jerk: 0.0 \ No newline at end of file diff --git a/irobot_create_common/irobot_create_control/launch/include/control.py b/irobot_create_common/irobot_create_control/launch/include/control.py index 5128a616..1af5a779 100644 --- a/irobot_create_common/irobot_create_control/launch/include/control.py +++ b/irobot_create_common/irobot_create_control/launch/include/control.py @@ -6,6 +6,7 @@ from ament_index_python.packages import get_package_share_directory from launch import LaunchDescription from launch.actions import DeclareLaunchArgument, RegisterEventHandler +from launch.conditions import LaunchConfigurationEquals, LaunchConfigurationNotEquals from launch.event_handlers import OnProcessExit from launch.substitutions import LaunchConfiguration, PathJoinSubstitution from launch_ros.actions import Node @@ -18,39 +19,71 @@ def generate_launch_description(): namespace = LaunchConfiguration('namespace') namespaced_node_name = [namespace, '/controller_manager'] + namespaced_diffdrive_controller = [namespace, '_diffdrive_controller'] + namespaced_joint_state_broadcaster = [namespace, '_joint_state_broadcaster'] pkg_create3_control = get_package_share_directory('irobot_create_control') control_params_file = PathJoinSubstitution( [pkg_create3_control, 'config', 'control.yaml']) diffdrive_controller_node = Node( + condition=LaunchConfigurationEquals('namespace', ''), package='controller_manager', executable='spawner', - namespace=namespace, parameters=[control_params_file], - arguments=['robot_1_diffdrive_controller', '-c', namespaced_node_name], + arguments=['diffdrive_controller', '-c', namespaced_node_name], output='screen', ) joint_state_broadcaster_spawner = Node( + condition=LaunchConfigurationEquals('namespace', ''), package='controller_manager', executable='spawner', - namespace=namespace, - arguments=['robot_1_joint_state_broadcaster', '-c', namespaced_node_name], + arguments=['joint_state_broadcaster', '-c', namespaced_node_name], output='screen', ) # Ensure diffdrive_controller_node starts after joint_state_broadcaster_spawner - diffdrive_controller_callback = RegisterEventHandler( + diffdrive_controller_callback= RegisterEventHandler( event_handler=OnProcessExit( target_action=joint_state_broadcaster_spawner, on_exit=[diffdrive_controller_node], ) ) + # Launch with namespace + diffdrive_controller_node_namespaced = Node( + condition=LaunchConfigurationNotEquals('namespace', ''), + package='controller_manager', + executable='spawner', + namespace=namespace, + parameters=[control_params_file], + arguments=[namespaced_diffdrive_controller, '-c', namespaced_node_name], + output='screen', + ) + + joint_state_broadcaster_spawner_namespaced = Node( + condition=LaunchConfigurationNotEquals('namespace', ''), + package='controller_manager', + executable='spawner', + namespace=namespace, + arguments=[namespaced_joint_state_broadcaster, '-c', namespaced_node_name], + output='screen', + ) + + # Ensure diffdrive_controller_node starts after joint_state_broadcaster_spawner + diffdrive_controller_callback_namespaced = RegisterEventHandler( + event_handler=OnProcessExit( + target_action=joint_state_broadcaster_spawner_namespaced, + on_exit=[diffdrive_controller_node_namespaced], + ) + ) + # Define LaunchDescription variable ld = LaunchDescription(ARGUMENTS) ld.add_action(joint_state_broadcaster_spawner) ld.add_action(diffdrive_controller_callback) + ld.add_action(joint_state_broadcaster_spawner_namespaced) + ld.add_action(diffdrive_controller_callback_namespaced) return ld diff --git a/irobot_create_common/irobot_create_description/urdf/create3.urdf.xacro b/irobot_create_common/irobot_create_description/urdf/create3.urdf.xacro index 2e70016c..f8484f12 100644 --- a/irobot_create_common/irobot_create_description/urdf/create3.urdf.xacro +++ b/irobot_create_common/irobot_create_description/urdf/create3.urdf.xacro @@ -286,7 +286,7 @@ - ogre + ogre2 diff --git a/irobot_create_common/irobot_create_nodes/src/motion_control_node.cpp b/irobot_create_common/irobot_create_nodes/src/motion_control_node.cpp index fe0a142a..547cf39a 100644 --- a/irobot_create_common/irobot_create_nodes/src/motion_control_node.cpp +++ b/irobot_create_common/irobot_create_nodes/src/motion_control_node.cpp @@ -122,9 +122,17 @@ MotionControlNode::MotionControlNode(const rclcpp::NodeOptions & options) kidnap_sub_ = this->create_subscription( "kidnap_status", rclcpp::SensorDataQoS(), std::bind(&MotionControlNode::kidnap_callback, this, _1)); + std::string ns_prefix = this->get_namespace(); + + if(ns_prefix == "/") { + ns_prefix = ""; + } + else { + ns_prefix += "_"; + } cmd_vel_out_pub_ = this->create_publisher( - "diffdrive_controller/cmd_vel_unstamped", rclcpp::SystemDefaultsQoS()); + ns_prefix + "diffdrive_controller/cmd_vel_unstamped", rclcpp::SystemDefaultsQoS()); backup_limit_hazard_pub_ = this->create_publisher( "_internal/backup_limit", rclcpp::SensorDataQoS().reliable()); @@ -136,7 +144,6 @@ MotionControlNode::MotionControlNode(const rclcpp::NodeOptions & options) std::bind(&MotionControlNode::set_parameters_callback, this, _1)); auto_override_print_ts_ = this->now(); - current_state_.pose.setIdentity(); last_backup_pose_.setIdentity(); last_teleop_ts_ = this->now(); diff --git a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition.launch.py b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition.launch.py index a7b90c3e..be19c322 100644 --- a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition.launch.py +++ b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition.launch.py @@ -28,13 +28,13 @@ description='Ignition World'), DeclareLaunchArgument('robot_name', default_value='create3', description='Robot name'), - DeclareLaunchArgument('use_rviz', default_value='true', + DeclareLaunchArgument('use_rviz', default_value='false', choices=['true', 'false'], description='Start rviz.'), DeclareLaunchArgument('spawn_dock', default_value='true', choices=['true', 'false'], description='Spawn the standard dock model.'), DeclareLaunchArgument('namespace', default_value='', - description='robot namespace'), + description='robot namespace'), ] for pose_element in ['x', 'y', 'z', 'yaw']: ARGUMENTS.append(DeclareLaunchArgument(pose_element, default_value='0.0', diff --git a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ros_ignition_bridge.launch.py b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ros_ignition_bridge.launch.py index 3f97c9e1..4f296352 100644 --- a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ros_ignition_bridge.launch.py +++ b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ros_ignition_bridge.launch.py @@ -53,20 +53,24 @@ def generate_launch_description(): condition=IfCondition(use_sim_time)) # cmd_vel bridge - # cmd_vel_bridge = Node(condition=LaunchConfigurationEquals('namespace', ''), - # package='ros_ign_bridge', - # executable='parameter_bridge', - # name='cmd_vel_bridge', - # output='screen', - # parameters=[{ - # 'use_sim_time': use_sim_time}], - # arguments=['/cmd_vel' + '@geometry_msgs/msg/Twist' + - # '[ignition.msgs.Twist', - # ['/model/', LaunchConfiguration('robot_name'), '/cmd_vel' + - # '@geometry_msgs/msg/Twist' + - # ']ignition.msgs.Twist']], - # remappings=[(['/model/', LaunchConfiguration('robot_name'), '/cmd_vel'], - # 'diffdrive_controller/cmd_vel_unstamped')]) + cmd_vel_bridge = Node( + condition=LaunchConfigurationEquals('namespace', ''), + package='ros_ign_bridge', + executable='parameter_bridge', + name='cmd_vel_bridge', + output='screen', + parameters=[{ + 'use_sim_time': use_sim_time}], + arguments=[['/cmd_vel' + + '@geometry_msgs/msg/Twist' + + '[ignition.msgs.Twist'], + ['/model/', LaunchConfiguration('robot_name'), '/cmd_vel' + + '@geometry_msgs/msg/Twist' + + ']ignition.msgs.Twist']], + remappings=[(['/model/', + LaunchConfiguration('robot_name'), '/cmd_vel'], + ['/diffdrive_controller/cmd_vel_unstamped'])] + ) cmd_vel_bridge_namespaced = Node(condition=LaunchConfigurationNotEquals('namespace', ''), package='ros_ign_bridge', @@ -85,10 +89,11 @@ def generate_launch_description(): ']ignition.msgs.Twist']], remappings=[(['/model/', LaunchConfiguration('robot_name'), 'cmd_vel'], - [namespace ,'_diffdrive_controller/cmd_vel_unstamped'])]) + [namespace,'_diffdrive_controller/cmd_vel_unstamped'])]) # Pose bridge - pose_bridge = Node(package='ros_ign_bridge', executable='parameter_bridge', + pose_bridge = Node(package='ros_ign_bridge', + executable='parameter_bridge', namespace=namespace, name='pose_bridge', output='screen', @@ -208,7 +213,7 @@ def generate_launch_description(): # Create launch description and add actions ld = LaunchDescription(ARGUMENTS) ld.add_action(clock_bridge) - # ld.add_action(cmd_vel_bridge) + ld.add_action(cmd_vel_bridge) ld.add_action(cmd_vel_bridge_namespaced) ld.add_action(pose_bridge) ld.add_action(odom_base_tf_bridge) From 632c882ab822a3a271ed43ee125c3182bd3f563f Mon Sep 17 00:00:00 2001 From: "badr.moutalib" Date: Fri, 5 Aug 2022 17:44:19 +0200 Subject: [PATCH 13/44] fixing frame prefixing and odom topic --- .../launch/dock_description.launch.py | 45 ++++++++++++++++++- .../launch/robot_description.launch.py | 4 +- .../irobot_create_control/config/control.yaml | 1 + .../launch/create3_ignition.launch.py | 42 +---------------- .../create3_ros_ignition_bridge.launch.py | 12 +++-- .../launch/create3_spawn.launch.py | 42 ++++++++++++++++- 6 files changed, 95 insertions(+), 51 deletions(-) diff --git a/irobot_create_common/irobot_create_common_bringup/launch/dock_description.launch.py b/irobot_create_common/irobot_create_common_bringup/launch/dock_description.launch.py index c5b93ae5..0f838410 100644 --- a/irobot_create_common/irobot_create_common_bringup/launch/dock_description.launch.py +++ b/irobot_create_common/irobot_create_common_bringup/launch/dock_description.launch.py @@ -7,6 +7,7 @@ from launch import LaunchDescription from launch.actions import DeclareLaunchArgument from launch.substitutions import Command, LaunchConfiguration, PathJoinSubstitution +from launch.conditions import LaunchConfigurationEquals, LaunchConfigurationNotEquals from launch_ros.actions import Node @@ -21,7 +22,7 @@ ARGUMENTS.append(DeclareLaunchArgument(f'{pose_element}', default_value='0.0', description=f'{pose_element} component of the dock pose.')) -ARGUMENTS.append(DeclareLaunchArgument('visualize_rays', default_value='true', + ARGUMENTS.append(DeclareLaunchArgument('visualize_rays', default_value='true', choices=['true', 'false'], description='Enable/disable ray visualization')) @@ -41,8 +42,10 @@ def generate_launch_description(): visualize_rays = LaunchConfiguration('visualize_rays') namespace = LaunchConfiguration('namespace') gazebo_simulator = LaunchConfiguration('gazebo') + frame_prefix = [namespace,'/'] state_publisher = Node( + condition=LaunchConfigurationEquals('namespace', ''), package='robot_state_publisher', executable='robot_state_publisher', name='dock_state_publisher', @@ -55,6 +58,29 @@ def generate_launch_description(): 'gazebo:=', gazebo_simulator, ' ', 'visualize_rays:=', visualize_rays, ' ', 'namespace:=', namespace, ' '])}, + {'frame_prefix': frame_prefix}, + ], + remappings=[ + ('robot_description', ('/standard_dock_description')), + ], + ) + + state_publisher_namespaced = Node( + condition=LaunchConfigurationNotEquals('namespace', ''), + package='robot_state_publisher', + executable='robot_state_publisher', + name='dock_state_publisher', + output='screen', + namespace = namespace, + parameters=[ + {'use_sim_time': True}, + {'robot_description': + Command( + ['xacro', ' ', dock_xacro_file, ' ', + 'gazebo:=', gazebo_simulator, ' ', + 'visualize_rays:=', visualize_rays, ' ', + 'namespace:=', namespace, ' '])}, + {'frame_prefix': frame_prefix}, ], remappings=[ ('robot_description', (namespace, '/standard_dock_description')), @@ -62,6 +88,7 @@ def generate_launch_description(): ) tf_odom_std_dock_link_publisher = Node( + condition=LaunchConfigurationEquals('namespace', ''), package='tf2_ros', executable='static_transform_publisher', name='tf_odom_std_dock_link_publisher', @@ -73,10 +100,26 @@ def generate_launch_description(): output='screen', ) + tf_odom_std_dock_link_publisher_namespaced = Node( + condition=LaunchConfigurationNotEquals('namespace', ''), + package='tf2_ros', + executable='static_transform_publisher', + name='tf_odom_std_dock_link_publisher', + namespace = namespace, + arguments=[x, y, z, + # According to documentation (http://wiki.ros.org/tf2_ros): + # the order is yaw, pitch, roll + yaw, '0', '0', + [namespace,'/odom'], [namespace,'/std_dock_link']], + output='screen', + ) + # Define LaunchDescription variable ld = LaunchDescription(ARGUMENTS) # Add nodes to LaunchDescription ld.add_action(state_publisher) ld.add_action(tf_odom_std_dock_link_publisher) + ld.add_action(state_publisher_namespaced) + ld.add_action(tf_odom_std_dock_link_publisher_namespaced) return ld diff --git a/irobot_create_common/irobot_create_common_bringup/launch/robot_description.launch.py b/irobot_create_common/irobot_create_common_bringup/launch/robot_description.launch.py index 004e6832..3fb3de5f 100644 --- a/irobot_create_common/irobot_create_common_bringup/launch/robot_description.launch.py +++ b/irobot_create_common/irobot_create_common_bringup/launch/robot_description.launch.py @@ -28,7 +28,8 @@ def generate_launch_description(): gazebo_simulator = LaunchConfiguration('gazebo') visualize_rays = LaunchConfiguration('visualize_rays') namespace = LaunchConfiguration('namespace') - + frame_prefix = [namespace,'/'] + robot_state_publisher = Node( package='robot_state_publisher', executable='robot_state_publisher', @@ -44,6 +45,7 @@ def generate_launch_description(): 'visualize_rays:=', visualize_rays, ' ', 'namespace:=', namespace, ' ' ])}, + {'frame_prefix': frame_prefix}, ], ) diff --git a/irobot_create_common/irobot_create_control/config/control.yaml b/irobot_create_common/irobot_create_control/config/control.yaml index 498596ab..534b67d0 100644 --- a/irobot_create_common/irobot_create_control/config/control.yaml +++ b/irobot_create_common/irobot_create_control/config/control.yaml @@ -7,6 +7,7 @@ controller_manager: diffdrive_controller: type: diff_drive_controller/DiffDriveController + /robot_0: controller_manager: ros__parameters: diff --git a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition.launch.py b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition.launch.py index be19c322..ae03361a 100644 --- a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition.launch.py +++ b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition.launch.py @@ -7,8 +7,6 @@ from ament_index_python.packages import get_package_share_directory -from irobot_create_common_bringup.offset_parser import OffsetParser - from launch import LaunchDescription from launch.actions import DeclareLaunchArgument from launch.actions import IncludeLaunchDescription, SetEnvironmentVariable @@ -44,8 +42,6 @@ def generate_launch_description(): # Directories - pkg_irobot_create_common_bringup = get_package_share_directory( - 'irobot_create_common_bringup') pkg_irobot_create_ignition_bringup = get_package_share_directory( 'irobot_create_ignition_bringup') pkg_irobot_create_ignition_plugins = get_package_share_directory( @@ -72,10 +68,6 @@ def generate_launch_description(): # Paths ign_gazebo_launch = PathJoinSubstitution( [pkg_ros_ign_gazebo, 'launch', 'ign_gazebo.launch.py']) - dock_description_launch = PathJoinSubstitution( - [pkg_irobot_create_common_bringup, 'launch', 'dock_description.launch.py']) - rviz2_launch = PathJoinSubstitution( - [pkg_irobot_create_common_bringup, 'launch', 'rviz2.launch.py']) # Launch configurations x, y, z = LaunchConfiguration('x'), LaunchConfiguration( @@ -84,7 +76,6 @@ def generate_launch_description(): robot_name = LaunchConfiguration('robot_name') world = LaunchConfiguration('world') namespace = LaunchConfiguration('namespace') - namespaced_robot_description = [namespace, '/robot_description'] # Ignition gazebo ignition_gazebo = IncludeLaunchDescription( @@ -99,23 +90,6 @@ def generate_launch_description(): ] ) - rviz2 = IncludeLaunchDescription( - PythonLaunchDescriptionSource([rviz2_launch]), - condition=IfCondition(LaunchConfiguration('use_rviz')), - launch_arguments={'namespace': namespace}.items() - ) - - x_dock = OffsetParser(x, 0.157) - yaw_dock = OffsetParser(yaw, 3.1416) - dock_description = IncludeLaunchDescription( - PythonLaunchDescriptionSource([dock_description_launch]), - condition=IfCondition(LaunchConfiguration('spawn_dock')), - # The robot starts docked - launch_arguments={'x': x_dock, 'y': y, 'z': z, 'yaw': yaw_dock, - 'namespace': namespace, - 'gazebo': 'ignition'}.items() - ) - # Create3 spawn_robot = IncludeLaunchDescription( PythonLaunchDescriptionSource(os.path.join(pkg_irobot_create_ignition_bringup, 'launch', @@ -124,30 +98,18 @@ def generate_launch_description(): 'y': y, 'z': z, 'robot_name': robot_name, - 'robot_description': namespaced_robot_description, + 'robot_description': '/robot_description', 'world' : world, + 'use_rviz' : LaunchConfiguration('use_rviz'), 'namespace': namespace, }.items() ) - # Dock - spawn_dock = Node(package='ros_ign_gazebo', executable='create', - arguments=['-name', 'standard_dock', - '-x', x_dock, - '-y', y, - '-z', z, - '-Y', '3.141592', - '-topic', (namespace, '/standard_dock_description')], - output='screen') - # Create launch description and add actions ld = LaunchDescription(ARGUMENTS) ld.add_action(ign_resource_path) ld.add_action(ign_gui_plugin_path) ld.add_action(ignition_gazebo) - ld.add_action(rviz2) - ld.add_action(dock_description) ld.add_action(spawn_robot) - ld.add_action(spawn_dock) return ld diff --git a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ros_ignition_bridge.launch.py b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ros_ignition_bridge.launch.py index 4f296352..76b11aae 100644 --- a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ros_ignition_bridge.launch.py +++ b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ros_ignition_bridge.launch.py @@ -53,8 +53,7 @@ def generate_launch_description(): condition=IfCondition(use_sim_time)) # cmd_vel bridge - cmd_vel_bridge = Node( - condition=LaunchConfigurationEquals('namespace', ''), + cmd_vel_bridge = Node(condition=LaunchConfigurationEquals('namespace', ''), package='ros_ign_bridge', executable='parameter_bridge', name='cmd_vel_bridge', @@ -89,11 +88,10 @@ def generate_launch_description(): ']ignition.msgs.Twist']], remappings=[(['/model/', LaunchConfiguration('robot_name'), 'cmd_vel'], - [namespace,'_diffdrive_controller/cmd_vel_unstamped'])]) + ['/', namespace,'_diffdrive_controller/cmd_vel_unstamped'])]) # Pose bridge - pose_bridge = Node(package='ros_ign_bridge', - executable='parameter_bridge', + pose_bridge = Node(package='ros_ign_bridge', executable='parameter_bridge', namespace=namespace, name='pose_bridge', output='screen', @@ -171,7 +169,7 @@ def generate_launch_description(): (['/world/', LaunchConfiguration('world'), '/model/', LaunchConfiguration('robot_name'), '/link/base_link/sensor/' + cliff + '/scan'], - '/_internal/' + cliff + '/scan') + '/_internal/' + cliff + '/scan') for cliff in cliff_sensors ]) # IR intensity bridge @@ -205,7 +203,7 @@ def generate_launch_description(): 'use_sim_time': use_sim_time }], arguments=[ - ['/create3/buttons' + + ['/', namespace, '/create3/buttons' + '@std_msgs/msg/Int32' + '[ignition.msgs.Int32'] ]) diff --git a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_spawn.launch.py b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_spawn.launch.py index 637686cb..766000d0 100644 --- a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_spawn.launch.py +++ b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_spawn.launch.py @@ -1,7 +1,9 @@ from ament_index_python.packages import get_package_share_directory +from irobot_create_common_bringup.offset_parser import OffsetParser from launch import LaunchDescription from launch.actions import DeclareLaunchArgument, IncludeLaunchDescription +from launch.conditions import IfCondition from launch.launch_description_sources import PythonLaunchDescriptionSource from launch.substitutions import LaunchConfiguration, PathJoinSubstitution @@ -21,14 +23,15 @@ DeclareLaunchArgument('robot_description', default_value='robot_description', description='robot description topic name'), DeclareLaunchArgument('namespace', default_value='', - description='Robot namespace') + description='Robot namespace'), + DeclareLaunchArgument('use_rviz', default_value='false', + choices=['true', 'false'], description='Start rviz.'), ] for pose_element in ['x', 'y', 'z', 'yaw']: ARGUMENTS.append(DeclareLaunchArgument(pose_element, default_value='0.0', description=f'{pose_element} component of the robot pose.')) - def generate_launch_description(): pkg_create3_common_bringup = get_package_share_directory( @@ -46,6 +49,10 @@ def generate_launch_description(): [pkg_irobot_create_common_bringup, 'launch', 'create3_nodes.launch.py']) create3_ignition_nodes_launch = PathJoinSubstitution( [pkg_irobot_create_ignition_bringup, 'launch', 'create3_ignition_nodes.launch.py']) + rviz2_launch = PathJoinSubstitution( + [pkg_irobot_create_common_bringup, 'launch', 'rviz2.launch.py']) + dock_description_launch = PathJoinSubstitution( + [pkg_irobot_create_common_bringup, 'launch', 'dock_description.launch.py']) # Launch configurations x, y, z = LaunchConfiguration('x'), LaunchConfiguration( @@ -55,6 +62,23 @@ def generate_launch_description(): namespace = LaunchConfiguration('namespace') namespaced_robot_description = [namespace, '/robot_description'] + x_dock = OffsetParser(x, 0.157) + yaw_dock = OffsetParser(yaw, 3.1416) + dock_description = IncludeLaunchDescription( + PythonLaunchDescriptionSource([dock_description_launch]), + condition=IfCondition(LaunchConfiguration('spawn_dock')), + # The robot starts docked + launch_arguments={'x': x_dock, 'y': y, 'z': z, 'yaw': yaw_dock, + 'namespace': namespace, + 'gazebo': 'ignition'}.items() + ) + + rviz2 = IncludeLaunchDescription( + PythonLaunchDescriptionSource([rviz2_launch]), + condition=IfCondition(LaunchConfiguration('use_rviz')), + launch_arguments={'namespace': namespace}.items() + ) + # Spawn robot spawn_robot = Node( package='ros_ign_gazebo', @@ -68,6 +92,17 @@ def generate_launch_description(): '-y', y, '-z', z]) + # Dock + spawn_dock = Node(package='ros_ign_gazebo', executable='create', + namespace = namespace, + arguments=['-name', 'standard_dock', + '-x', x_dock, + '-y', y, + '-z', z, + '-Y', '3.141592', + '-topic', (namespace, '/standard_dock_description')], + output='screen') + # Robot description robot_description_launch = IncludeLaunchDescription( PythonLaunchDescriptionSource([robot_description_launch]), @@ -96,7 +131,10 @@ def generate_launch_description(): # Create launch description and add actions ld = LaunchDescription(ARGUMENTS) ld.add_action(spawn_robot) + ld.add_action(spawn_dock) + ld.add_action(dock_description) ld.add_action(ros_ign_bridge) + ld.add_action(rviz2) ld.add_action(robot_description_launch) ld.add_action(create3_nodes) ld.add_action(create3_ignition_nodes) From 9507e1d468f7748e0a4a27d7670f059ffef3300a Mon Sep 17 00:00:00 2001 From: "badr.moutalib" Date: Wed, 17 Aug 2022 10:39:29 +0200 Subject: [PATCH 14/44] 17/08/2022 --- .../irobot_create_control/config/control.yaml | 671 ++++++++++-------- .../launch/include/control.py | 4 +- .../src/motion_control_node.cpp | 2 +- .../launch/create3_ignition.launch.py | 1 + .../launch/create3_spawn.launch.py | 3 + 5 files changed, 377 insertions(+), 304 deletions(-) diff --git a/irobot_create_common/irobot_create_control/config/control.yaml b/irobot_create_common/irobot_create_control/config/control.yaml index 534b67d0..b12e5102 100644 --- a/irobot_create_common/irobot_create_control/config/control.yaml +++ b/irobot_create_common/irobot_create_control/config/control.yaml @@ -1,314 +1,383 @@ -controller_manager: - ros__parameters: - update_rate: 1000 # Hz +# controller_manager: +# ros__parameters: +# update_rate: 1000 # Hz - joint_state_broadcaster: - type: joint_state_broadcaster/JointStateBroadcaster +# joint_state_broadcaster: +# type: joint_state_broadcaster/JointStateBroadcaster - diffdrive_controller: - type: diff_drive_controller/DiffDriveController +# diffdrive_controller: +# type: diff_drive_controller/DiffDriveController -/robot_0: +/**: controller_manager: ros__parameters: update_rate: 1000 # Hz - robot_0_joint_state_broadcaster: + joint_state_broadcaster: type: joint_state_broadcaster/JointStateBroadcaster - robot_0_diffdrive_controller: + diffdrive_controller: type: diff_drive_controller/DiffDriveController -/robot_1: - controller_manager: + diffdrive_controller: ros__parameters: - update_rate: 1000 # Hz - - robot_1_joint_state_broadcaster: - type: joint_state_broadcaster/JointStateBroadcaster - - robot_1_diffdrive_controller: - type: diff_drive_controller/DiffDriveController - -/robot_2: - controller_manager: - ros__parameters: - update_rate: 1000 # Hz + use_sim_time: True + left_wheel_names: ["left_wheel_joint"] + right_wheel_names: ["right_wheel_joint"] + + wheel_separation: 0.233 + wheel_radius: 0.03575 + + # Multiplier applied to the wheel separation parameter. + # This is used to account for a difference between the robot model and a real robot. + wheel_separation_multiplier: 1.0 + + # Multipliers applied to the wheel radius parameter. + # This is used to account for a difference between the robot model and a real robot. + left_wheel_radius_multiplier: 1.0 + right_wheel_radius_multiplier: 1.0 + + publish_rate: 62.0 + odom_frame_id: odom + base_frame_id: base_link + pose_covariance_diagonal : [0.001, 0.001, 0.001, 0.001, 0.001, 0.01] + twist_covariance_diagonal: [0.001, 0.001, 0.001, 0.001, 0.001, 0.01] + + open_loop: false + enable_odom_tf: true + + cmd_vel_timeout: 0.5 + use_stamped_vel: false + + # Preserve turning radius when limiting speed/acceleration/jerk + preserve_turning_radius: true + + # Publish limited velocity + publish_cmd: true + + # Publish wheel data + publish_wheel_data: true + + # Velocity and acceleration limits in cartesian + # These limits do not factor in per wheel limits + # that might be exceeded when linear and angular are combined + # Whenever a min_* is unspecified, default to -max_* + linear.x.has_velocity_limits: true + linear.x.has_acceleration_limits: true + linear.x.has_jerk_limits: false + # This is max if system is safety_override "full" + # motion_control_node will bound this to 0.306 if safety enabled (as is by default) + linear.x.max_velocity: 0.46 + linear.x.min_velocity: -0.46 + linear.x.max_acceleration: 0.9 + # Not using jerk limits yet + # linear.x.max_jerk: 0.0 + # linear.x.min_jerk: 0.0 + + angular.z.has_velocity_limits: true + angular.z.has_acceleration_limits: true + angular.z.has_jerk_limits: false + angular.z.max_velocity: 1.9 + angular.z.min_velocity: -1.9 + # Using 0.9 linear for each wheel, assuming one wheel accel to .9 + # and other to -.9 with wheelbase leads to 7.725 rad/s^2 + angular.z.max_acceleration: 7.725 + angular.z.min_acceleration: -7.725 + # Not using jerk limits yet + # angular.z.max_jerk: 0.0 + # angular.z.min_jerk: 0.0 + + +# /robot_1: +# controller_manager: +# ros__parameters: +# update_rate: 1000 # Hz + +# robot_1_joint_state_broadcaster: +# type: joint_state_broadcaster/JointStateBroadcaster + +# robot_1_diffdrive_controller: +# type: diff_drive_controller/DiffDriveController + +# /robot_2: +# controller_manager: +# ros__parameters: +# update_rate: 1000 # Hz - robot_2_joint_state_broadcaster: - type: joint_state_broadcaster/JointStateBroadcaster - - robot_2_diffdrive_controller: - type: diff_drive_controller/DiffDriveController - -diffdrive_controller: - ros__parameters: - use_sim_time: True - left_wheel_names: ["left_wheel_joint"] - right_wheel_names: ["right_wheel_joint"] - - wheel_separation: 0.233 - wheel_radius: 0.03575 - - # Multiplier applied to the wheel separation parameter. - # This is used to account for a difference between the robot model and a real robot. - wheel_separation_multiplier: 1.0 - - # Multipliers applied to the wheel radius parameter. - # This is used to account for a difference between the robot model and a real robot. - left_wheel_radius_multiplier: 1.0 - right_wheel_radius_multiplier: 1.0 - - publish_rate: 62.0 - odom_frame_id: odom - base_frame_id: base_link - pose_covariance_diagonal : [0.001, 0.001, 0.001, 0.001, 0.001, 0.01] - twist_covariance_diagonal: [0.001, 0.001, 0.001, 0.001, 0.001, 0.01] - - open_loop: false - enable_odom_tf: true - - cmd_vel_timeout: 0.5 - use_stamped_vel: false - - # Preserve turning radius when limiting speed/acceleration/jerk - preserve_turning_radius: true - - # Publish limited velocity - publish_cmd: true - - # Publish wheel data - publish_wheel_data: true - - # Velocity and acceleration limits in cartesian - # These limits do not factor in per wheel limits - # that might be exceeded when linear and angular are combined - # Whenever a min_* is unspecified, default to -max_* - linear.x.has_velocity_limits: true - linear.x.has_acceleration_limits: true - linear.x.has_jerk_limits: false - # This is max if system is safety_override "full" - # motion_control_node will bound this to 0.306 if safety enabled (as is by default) - linear.x.max_velocity: 0.46 - linear.x.min_velocity: -0.46 - linear.x.max_acceleration: 0.9 - # Not using jerk limits yet - # linear.x.max_jerk: 0.0 - # linear.x.min_jerk: 0.0 - - angular.z.has_velocity_limits: true - angular.z.has_acceleration_limits: true - angular.z.has_jerk_limits: false - angular.z.max_velocity: 1.9 - angular.z.min_velocity: -1.9 - # Using 0.9 linear for each wheel, assuming one wheel accel to .9 - # and other to -.9 with wheelbase leads to 7.725 rad/s^2 - angular.z.max_acceleration: 7.725 - angular.z.min_acceleration: -7.725 - # Not using jerk limits yet - # angular.z.max_jerk: 0.0 - # angular.z.min_jerk: 0.0 - -robot_0_diffdrive_controller: - ros__parameters: - use_sim_time: True - left_wheel_names: ["left_wheel_joint"] - right_wheel_names: ["right_wheel_joint"] - - wheel_separation: 0.233 - wheel_radius: 0.03575 - - # Multiplier applied to the wheel separation parameter. - # This is used to account for a difference between the robot model and a real robot. - wheel_separation_multiplier: 1.0 - - # Multipliers applied to the wheel radius parameter. - # This is used to account for a difference between the robot model and a real robot. - left_wheel_radius_multiplier: 1.0 - right_wheel_radius_multiplier: 1.0 - - publish_rate: 62.0 - odom_frame_id: odom - base_frame_id: base_link - pose_covariance_diagonal : [0.001, 0.001, 0.001, 0.001, 0.001, 0.01] - twist_covariance_diagonal: [0.001, 0.001, 0.001, 0.001, 0.001, 0.01] - - open_loop: false - enable_odom_tf: true - - cmd_vel_timeout: 0.5 - use_stamped_vel: false - - # Preserve turning radius when limiting speed/acceleration/jerk - preserve_turning_radius: true - - # Publish limited velocity - publish_cmd: true - - # Publish wheel data - publish_wheel_data: true - - # Velocity and acceleration limits in cartesian - # These limits do not factor in per wheel limits - # that might be exceeded when linear and angular are combined - # Whenever a min_* is unspecified, default to -max_* - linear.x.has_velocity_limits: true - linear.x.has_acceleration_limits: true - linear.x.has_jerk_limits: false - # This is max if system is safety_override "full" - # motion_control_node will bound this to 0.306 if safety enabled (as is by default) - linear.x.max_velocity: 0.46 - linear.x.min_velocity: -0.46 - linear.x.max_acceleration: 0.9 - # Not using jerk limits yet - # linear.x.max_jerk: 0.0 - # linear.x.min_jerk: 0.0 - - angular.z.has_velocity_limits: true - angular.z.has_acceleration_limits: true - angular.z.has_jerk_limits: false - angular.z.max_velocity: 1.9 - angular.z.min_velocity: -1.9 - # Using 0.9 linear for each wheel, assuming one wheel accel to .9 - # and other to -.9 with wheelbase leads to 7.725 rad/s^2 - angular.z.max_acceleration: 7.725 - angular.z.min_acceleration: -7.725 - # Not using jerk limits yet - # angular.z.max_jerk: 0.0 - # angular.z.min_jerk: 0.0 - -robot_1_diffdrive_controller: - ros__parameters: - use_sim_time: True - left_wheel_names: ["left_wheel_joint"] - right_wheel_names: ["right_wheel_joint"] - - wheel_separation: 0.233 - wheel_radius: 0.03575 - - # Multiplier applied to the wheel separation parameter. - # This is used to account for a difference between the robot model and a real robot. - wheel_separation_multiplier: 1.0 - - # Multipliers applied to the wheel radius parameter. - # This is used to account for a difference between the robot model and a real robot. - left_wheel_radius_multiplier: 1.0 - right_wheel_radius_multiplier: 1.0 - - publish_rate: 62.0 - odom_frame_id: odom - base_frame_id: base_link - pose_covariance_diagonal : [0.001, 0.001, 0.001, 0.001, 0.001, 0.01] - twist_covariance_diagonal: [0.001, 0.001, 0.001, 0.001, 0.001, 0.01] - - open_loop: false - enable_odom_tf: true - - cmd_vel_timeout: 0.5 - use_stamped_vel: false - - # Preserve turning radius when limiting speed/acceleration/jerk - preserve_turning_radius: true - - # Publish limited velocity - publish_cmd: true - - # Publish wheel data - publish_wheel_data: true - - # Velocity and acceleration limits in cartesian - # These limits do not factor in per wheel limits - # that might be exceeded when linear and angular are combined - # Whenever a min_* is unspecified, default to -max_* - linear.x.has_velocity_limits: true - linear.x.has_acceleration_limits: true - linear.x.has_jerk_limits: false - # This is max if system is safety_override "full" - # motion_control_node will bound this to 0.306 if safety enabled (as is by default) - linear.x.max_velocity: 0.46 - linear.x.min_velocity: -0.46 - linear.x.max_acceleration: 0.9 - # Not using jerk limits yet - # linear.x.max_jerk: 0.0 - # linear.x.min_jerk: 0.0 - - angular.z.has_velocity_limits: true - angular.z.has_acceleration_limits: true - angular.z.has_jerk_limits: false - angular.z.max_velocity: 1.9 - angular.z.min_velocity: -1.9 - # Using 0.9 linear for each wheel, assuming one wheel accel to .9 - # and other to -.9 with wheelbase leads to 7.725 rad/s^2 - angular.z.max_acceleration: 7.725 - angular.z.min_acceleration: -7.725 - # Not using jerk limits yet - # angular.z.max_jerk: 0.0 - # angular.z.min_jerk: 0.0 - -robot_2_diffdrive_controller: - ros__parameters: - use_sim_time: True - left_wheel_names: ["left_wheel_joint"] - right_wheel_names: ["right_wheel_joint"] - - wheel_separation: 0.233 - wheel_radius: 0.03575 - - # Multiplier applied to the wheel separation parameter. - # This is used to account for a difference between the robot model and a real robot. - wheel_separation_multiplier: 1.0 - - # Multipliers applied to the wheel radius parameter. - # This is used to account for a difference between the robot model and a real robot. - left_wheel_radius_multiplier: 1.0 - right_wheel_radius_multiplier: 1.0 - - publish_rate: 62.0 - odom_frame_id: odom - base_frame_id: base_link - pose_covariance_diagonal : [0.001, 0.001, 0.001, 0.001, 0.001, 0.01] - twist_covariance_diagonal: [0.001, 0.001, 0.001, 0.001, 0.001, 0.01] - - open_loop: false - enable_odom_tf: true - - cmd_vel_timeout: 0.5 - use_stamped_vel: false - - # Preserve turning radius when limiting speed/acceleration/jerk - preserve_turning_radius: true - - # Publish limited velocity - publish_cmd: true - - # Publish wheel data - publish_wheel_data: true - - # Velocity and acceleration limits in cartesian - # These limits do not factor in per wheel limits - # that might be exceeded when linear and angular are combined - # Whenever a min_* is unspecified, default to -max_* - linear.x.has_velocity_limits: true - linear.x.has_acceleration_limits: true - linear.x.has_jerk_limits: false - # This is max if system is safety_override "full" - # motion_control_node will bound this to 0.306 if safety enabled (as is by default) - linear.x.max_velocity: 0.46 - linear.x.min_velocity: -0.46 - linear.x.max_acceleration: 0.9 - # Not using jerk limits yet - # linear.x.max_jerk: 0.0 - # linear.x.min_jerk: 0.0 - - angular.z.has_velocity_limits: true - angular.z.has_acceleration_limits: true - angular.z.has_jerk_limits: false - angular.z.max_velocity: 1.9 - angular.z.min_velocity: -1.9 - # Using 0.9 linear for each wheel, assuming one wheel accel to .9 - # and other to -.9 with wheelbase leads to 7.725 rad/s^2 - angular.z.max_acceleration: 7.725 - angular.z.min_acceleration: -7.725 - # Not using jerk limits yet - # angular.z.max_jerk: 0.0 - # angular.z.min_jerk: 0.0 \ No newline at end of file +# robot_2_joint_state_broadcaster: +# type: joint_state_broadcaster/JointStateBroadcaster + +# robot_2_diffdrive_controller: +# type: diff_drive_controller/DiffDriveController + +# diffdrive_controller: +# ros__parameters: +# use_sim_time: True +# left_wheel_names: ["left_wheel_joint"] +# right_wheel_names: ["right_wheel_joint"] + +# wheel_separation: 0.233 +# wheel_radius: 0.03575 + +# # Multiplier applied to the wheel separation parameter. +# # This is used to account for a difference between the robot model and a real robot. +# wheel_separation_multiplier: 1.0 + +# # Multipliers applied to the wheel radius parameter. +# # This is used to account for a difference between the robot model and a real robot. +# left_wheel_radius_multiplier: 1.0 +# right_wheel_radius_multiplier: 1.0 + +# publish_rate: 62.0 +# odom_frame_id: odom +# base_frame_id: base_link +# pose_covariance_diagonal : [0.001, 0.001, 0.001, 0.001, 0.001, 0.01] +# twist_covariance_diagonal: [0.001, 0.001, 0.001, 0.001, 0.001, 0.01] + +# open_loop: false +# enable_odom_tf: true + +# cmd_vel_timeout: 0.5 +# use_stamped_vel: false + +# # Preserve turning radius when limiting speed/acceleration/jerk +# preserve_turning_radius: true + +# # Publish limited velocity +# publish_cmd: true + +# # Publish wheel data +# publish_wheel_data: true + +# # Velocity and acceleration limits in cartesian +# # These limits do not factor in per wheel limits +# # that might be exceeded when linear and angular are combined +# # Whenever a min_* is unspecified, default to -max_* +# linear.x.has_velocity_limits: true +# linear.x.has_acceleration_limits: true +# linear.x.has_jerk_limits: false +# # This is max if system is safety_override "full" +# # motion_control_node will bound this to 0.306 if safety enabled (as is by default) +# linear.x.max_velocity: 0.46 +# linear.x.min_velocity: -0.46 +# linear.x.max_acceleration: 0.9 +# # Not using jerk limits yet +# # linear.x.max_jerk: 0.0 +# # linear.x.min_jerk: 0.0 + +# angular.z.has_velocity_limits: true +# angular.z.has_acceleration_limits: true +# angular.z.has_jerk_limits: false +# angular.z.max_velocity: 1.9 +# angular.z.min_velocity: -1.9 +# # Using 0.9 linear for each wheel, assuming one wheel accel to .9 +# # and other to -.9 with wheelbase leads to 7.725 rad/s^2 +# angular.z.max_acceleration: 7.725 +# angular.z.min_acceleration: -7.725 +# # Not using jerk limits yet +# # angular.z.max_jerk: 0.0 +# # angular.z.min_jerk: 0.0 + +# robot_0_diffdrive_controller: +# ros__parameters: +# use_sim_time: True +# left_wheel_names: ["left_wheel_joint"] +# right_wheel_names: ["right_wheel_joint"] + +# wheel_separation: 0.233 +# wheel_radius: 0.03575 + +# # Multiplier applied to the wheel separation parameter. +# # This is used to account for a difference between the robot model and a real robot. +# wheel_separation_multiplier: 1.0 + +# # Multipliers applied to the wheel radius parameter. +# # This is used to account for a difference between the robot model and a real robot. +# left_wheel_radius_multiplier: 1.0 +# right_wheel_radius_multiplier: 1.0 + +# publish_rate: 62.0 +# odom_frame_id: robot_0/odom +# base_frame_id: robot_0/base_link +# pose_covariance_diagonal : [0.001, 0.001, 0.001, 0.001, 0.001, 0.01] +# twist_covariance_diagonal: [0.001, 0.001, 0.001, 0.001, 0.001, 0.01] + +# open_loop: false +# enable_odom_tf: true + +# cmd_vel_timeout: 0.5 +# use_stamped_vel: false + +# # Preserve turning radius when limiting speed/acceleration/jerk +# preserve_turning_radius: true + +# # Publish limited velocity +# publish_cmd: true + +# # Publish wheel data +# publish_wheel_data: true + +# # Velocity and acceleration limits in cartesian +# # These limits do not factor in per wheel limits +# # that might be exceeded when linear and angular are combined +# # Whenever a min_* is unspecified, default to -max_* +# linear.x.has_velocity_limits: true +# linear.x.has_acceleration_limits: true +# linear.x.has_jerk_limits: false +# # This is max if system is safety_override "full" +# # motion_control_node will bound this to 0.306 if safety enabled (as is by default) +# linear.x.max_velocity: 0.46 +# linear.x.min_velocity: -0.46 +# linear.x.max_acceleration: 0.9 +# # Not using jerk limits yet +# # linear.x.max_jerk: 0.0 +# # linear.x.min_jerk: 0.0 + +# angular.z.has_velocity_limits: true +# angular.z.has_acceleration_limits: true +# angular.z.has_jerk_limits: false +# angular.z.max_velocity: 1.9 +# angular.z.min_velocity: -1.9 +# # Using 0.9 linear for each wheel, assuming one wheel accel to .9 +# # and other to -.9 with wheelbase leads to 7.725 rad/s^2 +# angular.z.max_acceleration: 7.725 +# angular.z.min_acceleration: -7.725 +# # Not using jerk limits yet +# # angular.z.max_jerk: 0.0 +# # angular.z.min_jerk: 0.0 + +# robot_1_diffdrive_controller: +# ros__parameters: +# use_sim_time: True +# left_wheel_names: ["left_wheel_joint"] +# right_wheel_names: ["right_wheel_joint"] + +# wheel_separation: 0.233 +# wheel_radius: 0.03575 + +# # Multiplier applied to the wheel separation parameter. +# # This is used to account for a difference between the robot model and a real robot. +# wheel_separation_multiplier: 1.0 + +# # Multipliers applied to the wheel radius parameter. +# # This is used to account for a difference between the robot model and a real robot. +# left_wheel_radius_multiplier: 1.0 +# right_wheel_radius_multiplier: 1.0 + +# publish_rate: 62.0 +# odom_frame_id: robot_1/odom +# base_frame_id: robot_1/base_link +# pose_covariance_diagonal : [0.001, 0.001, 0.001, 0.001, 0.001, 0.01] +# twist_covariance_diagonal: [0.001, 0.001, 0.001, 0.001, 0.001, 0.01] + +# open_loop: false +# enable_odom_tf: true + +# cmd_vel_timeout: 0.5 +# use_stamped_vel: false + +# # Preserve turning radius when limiting speed/acceleration/jerk +# preserve_turning_radius: true + +# # Publish limited velocity +# publish_cmd: true + +# # Publish wheel data +# publish_wheel_data: true + +# # Velocity and acceleration limits in cartesian +# # These limits do not factor in per wheel limits +# # that might be exceeded when linear and angular are combined +# # Whenever a min_* is unspecified, default to -max_* +# linear.x.has_velocity_limits: true +# linear.x.has_acceleration_limits: true +# linear.x.has_jerk_limits: false +# # This is max if system is safety_override "full" +# # motion_control_node will bound this to 0.306 if safety enabled (as is by default) +# linear.x.max_velocity: 0.46 +# linear.x.min_velocity: -0.46 +# linear.x.max_acceleration: 0.9 +# # Not using jerk limits yet +# # linear.x.max_jerk: 0.0 +# # linear.x.min_jerk: 0.0 + +# angular.z.has_velocity_limits: true +# angular.z.has_acceleration_limits: true +# angular.z.has_jerk_limits: false +# angular.z.max_velocity: 1.9 +# angular.z.min_velocity: -1.9 +# # Using 0.9 linear for each wheel, assuming one wheel accel to .9 +# # and other to -.9 with wheelbase leads to 7.725 rad/s^2 +# angular.z.max_acceleration: 7.725 +# angular.z.min_acceleration: -7.725 +# # Not using jerk limits yet +# # angular.z.max_jerk: 0.0 +# # angular.z.min_jerk: 0.0 + +# robot_2_diffdrive_controller: +# ros__parameters: +# use_sim_time: True +# left_wheel_names: ["left_wheel_joint"] +# right_wheel_names: ["right_wheel_joint"] + +# wheel_separation: 0.233 +# wheel_radius: 0.03575 + +# # Multiplier applied to the wheel separation parameter. +# # This is used to account for a difference between the robot model and a real robot. +# wheel_separation_multiplier: 1.0 + +# # Multipliers applied to the wheel radius parameter. +# # This is used to account for a difference between the robot model and a real robot. +# left_wheel_radius_multiplier: 1.0 +# right_wheel_radius_multiplier: 1.0 + +# publish_rate: 62.0 +# odom_frame_id: robot_2/odom +# base_frame_id: robot_2/base_link +# pose_covariance_diagonal : [0.001, 0.001, 0.001, 0.001, 0.001, 0.01] +# twist_covariance_diagonal: [0.001, 0.001, 0.001, 0.001, 0.001, 0.01] + +# open_loop: false +# enable_odom_tf: true + +# cmd_vel_timeout: 0.5 +# use_stamped_vel: false + +# # Preserve turning radius when limiting speed/acceleration/jerk +# preserve_turning_radius: true + +# # Publish limited velocity +# publish_cmd: true + +# # Publish wheel data +# publish_wheel_data: true + +# # Velocity and acceleration limits in cartesian +# # These limits do not factor in per wheel limits +# # that might be exceeded when linear and angular are combined +# # Whenever a min_* is unspecified, default to -max_* +# linear.x.has_velocity_limits: true +# linear.x.has_acceleration_limits: true +# linear.x.has_jerk_limits: false +# # This is max if system is safety_override "full" +# # motion_control_node will bound this to 0.306 if safety enabled (as is by default) +# linear.x.max_velocity: 0.46 +# linear.x.min_velocity: -0.46 +# linear.x.max_acceleration: 0.9 +# # Not using jerk limits yet +# # linear.x.max_jerk: 0.0 +# # linear.x.min_jerk: 0.0 + +# angular.z.has_velocity_limits: true +# angular.z.has_acceleration_limits: true +# angular.z.has_jerk_limits: false +# angular.z.max_velocity: 1.9 +# angular.z.min_velocity: -1.9 +# # Using 0.9 linear for each wheel, assuming one wheel accel to .9 +# # and other to -.9 with wheelbase leads to 7.725 rad/s^2 +# angular.z.max_acceleration: 7.725 +# angular.z.min_acceleration: -7.725 +# # Not using jerk limits yet +# # angular.z.max_jerk: 0.0 +# # angular.z.min_jerk: 0.0 \ No newline at end of file diff --git a/irobot_create_common/irobot_create_control/launch/include/control.py b/irobot_create_common/irobot_create_control/launch/include/control.py index 1af5a779..7e265f6f 100644 --- a/irobot_create_common/irobot_create_control/launch/include/control.py +++ b/irobot_create_common/irobot_create_control/launch/include/control.py @@ -58,7 +58,7 @@ def generate_launch_description(): executable='spawner', namespace=namespace, parameters=[control_params_file], - arguments=[namespaced_diffdrive_controller, '-c', namespaced_node_name], + arguments=['diffdrive_controller', '-c', namespaced_node_name], output='screen', ) @@ -67,7 +67,7 @@ def generate_launch_description(): package='controller_manager', executable='spawner', namespace=namespace, - arguments=[namespaced_joint_state_broadcaster, '-c', namespaced_node_name], + arguments=['joint_state_broadcaster', '-c', namespaced_node_name], output='screen', ) diff --git a/irobot_create_common/irobot_create_nodes/src/motion_control_node.cpp b/irobot_create_common/irobot_create_nodes/src/motion_control_node.cpp index 547cf39a..c393b0f8 100644 --- a/irobot_create_common/irobot_create_nodes/src/motion_control_node.cpp +++ b/irobot_create_common/irobot_create_nodes/src/motion_control_node.cpp @@ -132,7 +132,7 @@ MotionControlNode::MotionControlNode(const rclcpp::NodeOptions & options) } cmd_vel_out_pub_ = this->create_publisher( - ns_prefix + "diffdrive_controller/cmd_vel_unstamped", rclcpp::SystemDefaultsQoS()); + "diffdrive_controller/cmd_vel_unstamped", rclcpp::SystemDefaultsQoS()); backup_limit_hazard_pub_ = this->create_publisher( "_internal/backup_limit", rclcpp::SensorDataQoS().reliable()); diff --git a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition.launch.py b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition.launch.py index ae03361a..9c21120b 100644 --- a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition.launch.py +++ b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition.launch.py @@ -102,6 +102,7 @@ def generate_launch_description(): 'world' : world, 'use_rviz' : LaunchConfiguration('use_rviz'), 'namespace': namespace, + 'spawn_dock': LaunchConfiguration('spawn_dock'), }.items() ) diff --git a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_spawn.launch.py b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_spawn.launch.py index 766000d0..2aee261e 100644 --- a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_spawn.launch.py +++ b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_spawn.launch.py @@ -26,6 +26,9 @@ description='Robot namespace'), DeclareLaunchArgument('use_rviz', default_value='false', choices=['true', 'false'], description='Start rviz.'), + DeclareLaunchArgument('spawn_dock', default_value='true', + choices=['true', 'false'], + description='Spawn the standard dock model.'), ] for pose_element in ['x', 'y', 'z', 'yaw']: From 164b16fa29934d1cb166cb68728624b79cbc2237 Mon Sep 17 00:00:00 2001 From: "badr.moutalib" Date: Thu, 18 Aug 2022 17:24:53 +0200 Subject: [PATCH 15/44] clean up --- irobot_create_common/irobot_create_control/config/control.yaml | 1 - irobot_create_common/irobot_create_control/config/control_0.yaml | 0 irobot_create_common/irobot_create_control/config/control_1.yaml | 0 3 files changed, 1 deletion(-) delete mode 100644 irobot_create_common/irobot_create_control/config/control_0.yaml delete mode 100644 irobot_create_common/irobot_create_control/config/control_1.yaml diff --git a/irobot_create_common/irobot_create_control/config/control.yaml b/irobot_create_common/irobot_create_control/config/control.yaml index b12e5102..30edbbb3 100644 --- a/irobot_create_common/irobot_create_control/config/control.yaml +++ b/irobot_create_common/irobot_create_control/config/control.yaml @@ -87,7 +87,6 @@ # angular.z.max_jerk: 0.0 # angular.z.min_jerk: 0.0 - # /robot_1: # controller_manager: # ros__parameters: diff --git a/irobot_create_common/irobot_create_control/config/control_0.yaml b/irobot_create_common/irobot_create_control/config/control_0.yaml deleted file mode 100644 index e69de29b..00000000 diff --git a/irobot_create_common/irobot_create_control/config/control_1.yaml b/irobot_create_common/irobot_create_control/config/control_1.yaml deleted file mode 100644 index e69de29b..00000000 From 2ca842818782f451dfa0d1447586c7d37aec2d1b Mon Sep 17 00:00:00 2001 From: "badr.moutalib" Date: Thu, 25 Aug 2022 16:01:40 +0200 Subject: [PATCH 16/44] fixing namespaced parameters following wildcard implementation in rclcpp --- .../launch/dock_description.launch.py | 2 +- .../irobot_create_control/config/control.yaml | 326 ++---------------- .../launch/include/control.py | 4 +- .../config/pose_republisher_params.yaml | 17 +- .../launch/create3_ignition.launch.py | 1 - .../launch/create3_ignition_nodes.launch.py | 38 +- .../create3_ros_ignition_bridge.launch.py | 29 +- .../launch/create3_spawn.launch.py | 24 +- 8 files changed, 90 insertions(+), 351 deletions(-) diff --git a/irobot_create_common/irobot_create_common_bringup/launch/dock_description.launch.py b/irobot_create_common/irobot_create_common_bringup/launch/dock_description.launch.py index 0f838410..f6d7779e 100644 --- a/irobot_create_common/irobot_create_common_bringup/launch/dock_description.launch.py +++ b/irobot_create_common/irobot_create_common_bringup/launch/dock_description.launch.py @@ -83,7 +83,7 @@ def generate_launch_description(): {'frame_prefix': frame_prefix}, ], remappings=[ - ('robot_description', (namespace, '/standard_dock_description')), + ('robot_description', 'standard_dock_description'), ], ) diff --git a/irobot_create_common/irobot_create_control/config/control.yaml b/irobot_create_common/irobot_create_control/config/control.yaml index 30edbbb3..5903f49c 100644 --- a/irobot_create_common/irobot_create_control/config/control.yaml +++ b/irobot_create_common/irobot_create_control/config/control.yaml @@ -1,22 +1,30 @@ -# controller_manager: -# ros__parameters: -# update_rate: 1000 # Hz - -# joint_state_broadcaster: -# type: joint_state_broadcaster/JointStateBroadcaster - -# diffdrive_controller: -# type: diff_drive_controller/DiffDriveController - /**: controller_manager: ros__parameters: update_rate: 1000 # Hz - joint_state_broadcaster: + robot_0/joint_state_broadcaster: type: joint_state_broadcaster/JointStateBroadcaster - diffdrive_controller: + robot_0/diffdrive_controller: + type: diff_drive_controller/DiffDriveController + + robot_1/joint_state_broadcaster: + type: joint_state_broadcaster/JointStateBroadcaster + + robot_1/diffdrive_controller: + type: diff_drive_controller/DiffDriveController + + robot_2/joint_state_broadcaster: + type: joint_state_broadcaster/JointStateBroadcaster + + robot_2/diffdrive_controller: + type: diff_drive_controller/DiffDriveController + + robot_3/joint_state_broadcaster: + type: joint_state_broadcaster/JointStateBroadcaster + + robot_3/diffdrive_controller: type: diff_drive_controller/DiffDriveController diffdrive_controller: @@ -86,297 +94,3 @@ # Not using jerk limits yet # angular.z.max_jerk: 0.0 # angular.z.min_jerk: 0.0 - -# /robot_1: -# controller_manager: -# ros__parameters: -# update_rate: 1000 # Hz - -# robot_1_joint_state_broadcaster: -# type: joint_state_broadcaster/JointStateBroadcaster - -# robot_1_diffdrive_controller: -# type: diff_drive_controller/DiffDriveController - -# /robot_2: -# controller_manager: -# ros__parameters: -# update_rate: 1000 # Hz - -# robot_2_joint_state_broadcaster: -# type: joint_state_broadcaster/JointStateBroadcaster - -# robot_2_diffdrive_controller: -# type: diff_drive_controller/DiffDriveController - -# diffdrive_controller: -# ros__parameters: -# use_sim_time: True -# left_wheel_names: ["left_wheel_joint"] -# right_wheel_names: ["right_wheel_joint"] - -# wheel_separation: 0.233 -# wheel_radius: 0.03575 - -# # Multiplier applied to the wheel separation parameter. -# # This is used to account for a difference between the robot model and a real robot. -# wheel_separation_multiplier: 1.0 - -# # Multipliers applied to the wheel radius parameter. -# # This is used to account for a difference between the robot model and a real robot. -# left_wheel_radius_multiplier: 1.0 -# right_wheel_radius_multiplier: 1.0 - -# publish_rate: 62.0 -# odom_frame_id: odom -# base_frame_id: base_link -# pose_covariance_diagonal : [0.001, 0.001, 0.001, 0.001, 0.001, 0.01] -# twist_covariance_diagonal: [0.001, 0.001, 0.001, 0.001, 0.001, 0.01] - -# open_loop: false -# enable_odom_tf: true - -# cmd_vel_timeout: 0.5 -# use_stamped_vel: false - -# # Preserve turning radius when limiting speed/acceleration/jerk -# preserve_turning_radius: true - -# # Publish limited velocity -# publish_cmd: true - -# # Publish wheel data -# publish_wheel_data: true - -# # Velocity and acceleration limits in cartesian -# # These limits do not factor in per wheel limits -# # that might be exceeded when linear and angular are combined -# # Whenever a min_* is unspecified, default to -max_* -# linear.x.has_velocity_limits: true -# linear.x.has_acceleration_limits: true -# linear.x.has_jerk_limits: false -# # This is max if system is safety_override "full" -# # motion_control_node will bound this to 0.306 if safety enabled (as is by default) -# linear.x.max_velocity: 0.46 -# linear.x.min_velocity: -0.46 -# linear.x.max_acceleration: 0.9 -# # Not using jerk limits yet -# # linear.x.max_jerk: 0.0 -# # linear.x.min_jerk: 0.0 - -# angular.z.has_velocity_limits: true -# angular.z.has_acceleration_limits: true -# angular.z.has_jerk_limits: false -# angular.z.max_velocity: 1.9 -# angular.z.min_velocity: -1.9 -# # Using 0.9 linear for each wheel, assuming one wheel accel to .9 -# # and other to -.9 with wheelbase leads to 7.725 rad/s^2 -# angular.z.max_acceleration: 7.725 -# angular.z.min_acceleration: -7.725 -# # Not using jerk limits yet -# # angular.z.max_jerk: 0.0 -# # angular.z.min_jerk: 0.0 - -# robot_0_diffdrive_controller: -# ros__parameters: -# use_sim_time: True -# left_wheel_names: ["left_wheel_joint"] -# right_wheel_names: ["right_wheel_joint"] - -# wheel_separation: 0.233 -# wheel_radius: 0.03575 - -# # Multiplier applied to the wheel separation parameter. -# # This is used to account for a difference between the robot model and a real robot. -# wheel_separation_multiplier: 1.0 - -# # Multipliers applied to the wheel radius parameter. -# # This is used to account for a difference between the robot model and a real robot. -# left_wheel_radius_multiplier: 1.0 -# right_wheel_radius_multiplier: 1.0 - -# publish_rate: 62.0 -# odom_frame_id: robot_0/odom -# base_frame_id: robot_0/base_link -# pose_covariance_diagonal : [0.001, 0.001, 0.001, 0.001, 0.001, 0.01] -# twist_covariance_diagonal: [0.001, 0.001, 0.001, 0.001, 0.001, 0.01] - -# open_loop: false -# enable_odom_tf: true - -# cmd_vel_timeout: 0.5 -# use_stamped_vel: false - -# # Preserve turning radius when limiting speed/acceleration/jerk -# preserve_turning_radius: true - -# # Publish limited velocity -# publish_cmd: true - -# # Publish wheel data -# publish_wheel_data: true - -# # Velocity and acceleration limits in cartesian -# # These limits do not factor in per wheel limits -# # that might be exceeded when linear and angular are combined -# # Whenever a min_* is unspecified, default to -max_* -# linear.x.has_velocity_limits: true -# linear.x.has_acceleration_limits: true -# linear.x.has_jerk_limits: false -# # This is max if system is safety_override "full" -# # motion_control_node will bound this to 0.306 if safety enabled (as is by default) -# linear.x.max_velocity: 0.46 -# linear.x.min_velocity: -0.46 -# linear.x.max_acceleration: 0.9 -# # Not using jerk limits yet -# # linear.x.max_jerk: 0.0 -# # linear.x.min_jerk: 0.0 - -# angular.z.has_velocity_limits: true -# angular.z.has_acceleration_limits: true -# angular.z.has_jerk_limits: false -# angular.z.max_velocity: 1.9 -# angular.z.min_velocity: -1.9 -# # Using 0.9 linear for each wheel, assuming one wheel accel to .9 -# # and other to -.9 with wheelbase leads to 7.725 rad/s^2 -# angular.z.max_acceleration: 7.725 -# angular.z.min_acceleration: -7.725 -# # Not using jerk limits yet -# # angular.z.max_jerk: 0.0 -# # angular.z.min_jerk: 0.0 - -# robot_1_diffdrive_controller: -# ros__parameters: -# use_sim_time: True -# left_wheel_names: ["left_wheel_joint"] -# right_wheel_names: ["right_wheel_joint"] - -# wheel_separation: 0.233 -# wheel_radius: 0.03575 - -# # Multiplier applied to the wheel separation parameter. -# # This is used to account for a difference between the robot model and a real robot. -# wheel_separation_multiplier: 1.0 - -# # Multipliers applied to the wheel radius parameter. -# # This is used to account for a difference between the robot model and a real robot. -# left_wheel_radius_multiplier: 1.0 -# right_wheel_radius_multiplier: 1.0 - -# publish_rate: 62.0 -# odom_frame_id: robot_1/odom -# base_frame_id: robot_1/base_link -# pose_covariance_diagonal : [0.001, 0.001, 0.001, 0.001, 0.001, 0.01] -# twist_covariance_diagonal: [0.001, 0.001, 0.001, 0.001, 0.001, 0.01] - -# open_loop: false -# enable_odom_tf: true - -# cmd_vel_timeout: 0.5 -# use_stamped_vel: false - -# # Preserve turning radius when limiting speed/acceleration/jerk -# preserve_turning_radius: true - -# # Publish limited velocity -# publish_cmd: true - -# # Publish wheel data -# publish_wheel_data: true - -# # Velocity and acceleration limits in cartesian -# # These limits do not factor in per wheel limits -# # that might be exceeded when linear and angular are combined -# # Whenever a min_* is unspecified, default to -max_* -# linear.x.has_velocity_limits: true -# linear.x.has_acceleration_limits: true -# linear.x.has_jerk_limits: false -# # This is max if system is safety_override "full" -# # motion_control_node will bound this to 0.306 if safety enabled (as is by default) -# linear.x.max_velocity: 0.46 -# linear.x.min_velocity: -0.46 -# linear.x.max_acceleration: 0.9 -# # Not using jerk limits yet -# # linear.x.max_jerk: 0.0 -# # linear.x.min_jerk: 0.0 - -# angular.z.has_velocity_limits: true -# angular.z.has_acceleration_limits: true -# angular.z.has_jerk_limits: false -# angular.z.max_velocity: 1.9 -# angular.z.min_velocity: -1.9 -# # Using 0.9 linear for each wheel, assuming one wheel accel to .9 -# # and other to -.9 with wheelbase leads to 7.725 rad/s^2 -# angular.z.max_acceleration: 7.725 -# angular.z.min_acceleration: -7.725 -# # Not using jerk limits yet -# # angular.z.max_jerk: 0.0 -# # angular.z.min_jerk: 0.0 - -# robot_2_diffdrive_controller: -# ros__parameters: -# use_sim_time: True -# left_wheel_names: ["left_wheel_joint"] -# right_wheel_names: ["right_wheel_joint"] - -# wheel_separation: 0.233 -# wheel_radius: 0.03575 - -# # Multiplier applied to the wheel separation parameter. -# # This is used to account for a difference between the robot model and a real robot. -# wheel_separation_multiplier: 1.0 - -# # Multipliers applied to the wheel radius parameter. -# # This is used to account for a difference between the robot model and a real robot. -# left_wheel_radius_multiplier: 1.0 -# right_wheel_radius_multiplier: 1.0 - -# publish_rate: 62.0 -# odom_frame_id: robot_2/odom -# base_frame_id: robot_2/base_link -# pose_covariance_diagonal : [0.001, 0.001, 0.001, 0.001, 0.001, 0.01] -# twist_covariance_diagonal: [0.001, 0.001, 0.001, 0.001, 0.001, 0.01] - -# open_loop: false -# enable_odom_tf: true - -# cmd_vel_timeout: 0.5 -# use_stamped_vel: false - -# # Preserve turning radius when limiting speed/acceleration/jerk -# preserve_turning_radius: true - -# # Publish limited velocity -# publish_cmd: true - -# # Publish wheel data -# publish_wheel_data: true - -# # Velocity and acceleration limits in cartesian -# # These limits do not factor in per wheel limits -# # that might be exceeded when linear and angular are combined -# # Whenever a min_* is unspecified, default to -max_* -# linear.x.has_velocity_limits: true -# linear.x.has_acceleration_limits: true -# linear.x.has_jerk_limits: false -# # This is max if system is safety_override "full" -# # motion_control_node will bound this to 0.306 if safety enabled (as is by default) -# linear.x.max_velocity: 0.46 -# linear.x.min_velocity: -0.46 -# linear.x.max_acceleration: 0.9 -# # Not using jerk limits yet -# # linear.x.max_jerk: 0.0 -# # linear.x.min_jerk: 0.0 - -# angular.z.has_velocity_limits: true -# angular.z.has_acceleration_limits: true -# angular.z.has_jerk_limits: false -# angular.z.max_velocity: 1.9 -# angular.z.min_velocity: -1.9 -# # Using 0.9 linear for each wheel, assuming one wheel accel to .9 -# # and other to -.9 with wheelbase leads to 7.725 rad/s^2 -# angular.z.max_acceleration: 7.725 -# angular.z.min_acceleration: -7.725 -# # Not using jerk limits yet -# # angular.z.max_jerk: 0.0 -# # angular.z.min_jerk: 0.0 \ No newline at end of file diff --git a/irobot_create_common/irobot_create_control/launch/include/control.py b/irobot_create_common/irobot_create_control/launch/include/control.py index 7e265f6f..5697e70d 100644 --- a/irobot_create_common/irobot_create_control/launch/include/control.py +++ b/irobot_create_common/irobot_create_control/launch/include/control.py @@ -58,7 +58,7 @@ def generate_launch_description(): executable='spawner', namespace=namespace, parameters=[control_params_file], - arguments=['diffdrive_controller', '-c', namespaced_node_name], + arguments=['diffdrive_controller', '-c', namespaced_node_name, '-n', namespace], output='screen', ) @@ -67,7 +67,7 @@ def generate_launch_description(): package='controller_manager', executable='spawner', namespace=namespace, - arguments=['joint_state_broadcaster', '-c', namespaced_node_name], + arguments=['joint_state_broadcaster', '-c', namespaced_node_name, '-n', namespace], output='screen', ) diff --git a/irobot_create_ignition/irobot_create_ignition_bringup/config/pose_republisher_params.yaml b/irobot_create_ignition/irobot_create_ignition_bringup/config/pose_republisher_params.yaml index 30269ac1..4f7fd5cc 100644 --- a/irobot_create_ignition/irobot_create_ignition_bringup/config/pose_republisher_params.yaml +++ b/irobot_create_ignition/irobot_create_ignition_bringup/config/pose_republisher_params.yaml @@ -1,10 +1,11 @@ --- /**: - ros__parameters: - robot_publisher_topic: /sim_ground_truth_pose - robot_subscriber_topic: /_internal/sim_ground_truth_pose - mouse_publisher_topic: /_internal/sim_ground_truth_mouse_pose - dock_subscriber_topic: /_internal/sim_ground_truth_dock_pose - dock_publisher_topic: /sim_ground_truth_dock_pose - ir_emitter_publisher_topic: /_internal/sim_ground_truth_ir_emitter_pose - ir_receiver_publisher_topic: /_internal/sim_ground_truth_ir_receiver_pose \ No newline at end of file + pose_republisher_node: + ros__parameters: + robot_publisher_topic: sim_ground_truth_pose_ca_maintenant + robot_subscriber_topic: _internal/sim_ground_truth_pose + mouse_publisher_topic: _internal/sim_ground_truth_mouse_pose + dock_subscriber_topic: _internal/sim_ground_truth_dock_pose + dock_publisher_topic: sim_ground_truth_dock_posezz + ir_emitter_publisher_topic: _internal/sim_ground_truth_ir_emitter_pose + ir_receiver_publisher_topic: _internal/sim_ground_truth_ir_receiver_pose \ No newline at end of file diff --git a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition.launch.py b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition.launch.py index 9c21120b..9785844a 100644 --- a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition.launch.py +++ b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition.launch.py @@ -38,7 +38,6 @@ ARGUMENTS.append(DeclareLaunchArgument(pose_element, default_value='0.0', description=f'{pose_element} component of the robot pose.')) - def generate_launch_description(): # Directories diff --git a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition_nodes.launch.py b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition_nodes.launch.py index e68510da..6e93d244 100644 --- a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition_nodes.launch.py +++ b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition_nodes.launch.py @@ -30,17 +30,12 @@ def generate_launch_description(): namespace = LaunchConfiguration('namespace') - namespaced_pose_republisher_params_yaml_file = ReplaceString( - source_file=pose_republisher_params_yaml_file, - replacements={'/sim_ground_truth_pose': ('/', namespace, '/sim_ground_truth_pose')} - ) - # Pose republisher pose_republisher_node = Node( - condition=LaunchConfigurationEquals('namespace', ''), + # condition=LaunchConfigurationEquals('namespace', ''), package='irobot_create_ignition_toolbox', name='pose_republisher_node', - namespace=namespace, + namespace = namespace, executable='pose_republisher_node', parameters=[pose_republisher_params_yaml_file, {'robot_name': LaunchConfiguration('robot_name')}, @@ -48,17 +43,22 @@ def generate_launch_description(): output='screen', ) - pose_republisher_node_namespaced = Node( - condition=LaunchConfigurationNotEquals('namespace', ''), - package='irobot_create_ignition_toolbox', - name='pose_republisher_node', - namespace=namespace, - executable='pose_republisher_node', - parameters=[namespaced_pose_republisher_params_yaml_file, - {'robot_name': LaunchConfiguration('robot_name')}, - {'use_sim_time': True}], - output='screen', - ) + # namespaced_pose_republisher_params_yaml_file = ReplaceString( + # source_file=pose_republisher_params_yaml_file, + # replacements={'/sim_ground_truth_pose': ('/', namespace, '/sim_ground_truth_pose')} + # ) + + # pose_republisher_node_namespaced = Node( + # condition=LaunchConfigurationNotEquals('namespace', ''), + # package='irobot_create_ignition_toolbox', + # name='pose_republisher_node', + # namespace=namespace, + # executable='pose_republisher_node', + # parameters=[namespaced_pose_republisher_params_yaml_file, + # {'robot_name': LaunchConfiguration('robot_name')}, + # {'use_sim_time': True}], + # output='screen', + # ) # Sensors sensors_node = Node( @@ -84,7 +84,7 @@ def generate_launch_description(): # Create launch description and add actions ld = LaunchDescription(ARGUMENTS) ld.add_action(pose_republisher_node) - ld.add_action(pose_republisher_node_namespaced) + # ld.add_action(pose_republisher_node_namespaced) ld.add_action(sensors_node) ld.add_action(interface_buttons_node) return ld diff --git a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ros_ignition_bridge.launch.py b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ros_ignition_bridge.launch.py index 76b11aae..ba15b138 100644 --- a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ros_ignition_bridge.launch.py +++ b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ros_ignition_bridge.launch.py @@ -88,7 +88,7 @@ def generate_launch_description(): ']ignition.msgs.Twist']], remappings=[(['/model/', LaunchConfiguration('robot_name'), 'cmd_vel'], - ['/', namespace,'_diffdrive_controller/cmd_vel_unstamped'])]) + ['/', namespace,'/diffdrive_controller/cmd_vel_unstamped'])]) # Pose bridge pose_bridge = Node(package='ros_ign_bridge', executable='parameter_bridge', @@ -131,8 +131,8 @@ def generate_launch_description(): ]) # Bumper contact sensor bridge - bumper_contact_bridge = Node(package='ros_ign_bridge', executable='parameter_bridge', - namespace=namespace, + bumper_contact_bridge = Node(condition=LaunchConfigurationEquals('namespace', ''), + package='ros_ign_bridge', executable='parameter_bridge', name='bumper_contact_bridge', output='screen', parameters=[{ @@ -147,9 +147,29 @@ def generate_launch_description(): remappings=[ (['/model/', LaunchConfiguration('robot_name'), '/bumper_contact'], - '/bumper_contact') + 'bumper_contact') ]) + bumper_contact_bridge_namespaced = Node(condition=LaunchConfigurationNotEquals('namespace', ''), + package='ros_ign_bridge', executable='parameter_bridge', + namespace=namespace, + name='bumper_contact_bridge', + output='screen', + parameters=[{ + 'use_sim_time': use_sim_time + }], + arguments=[ + ['/model/', LaunchConfiguration('robot_name'), + '/bumper_contact' + + '@ros_ign_interfaces/msg/Contacts' + + '[ignition.msgs.Contacts'] + ], + remappings=[ + (['/model/', LaunchConfiguration('robot_name'), + '/bumper_contact'], + ['/', namespace, '/bumper_contact']) + ]) + # Cliff bridge cliff_bridge = Node(package='ros_ign_bridge', executable='parameter_bridge', namespace=namespace, @@ -216,6 +236,7 @@ def generate_launch_description(): ld.add_action(pose_bridge) ld.add_action(odom_base_tf_bridge) ld.add_action(bumper_contact_bridge) + ld.add_action(bumper_contact_bridge_namespaced) ld.add_action(cliff_bridge) ld.add_action(ir_intensity_bridge) ld.add_action(buttons_msg_bridge) diff --git a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_spawn.launch.py b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_spawn.launch.py index 2aee261e..a9890cb6 100644 --- a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_spawn.launch.py +++ b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_spawn.launch.py @@ -64,7 +64,15 @@ def generate_launch_description(): robot_name = LaunchConfiguration('robot_name') namespace = LaunchConfiguration('namespace') namespaced_robot_description = [namespace, '/robot_description'] + namespaced_dock_description = [namespace, '/standard_dock_description'] + + # Robot description + robot_description_launch = IncludeLaunchDescription( + PythonLaunchDescriptionSource([robot_description_launch]), + launch_arguments={'gazebo': 'ignition', 'namespace': namespace}.items()) + + # Dock description x_dock = OffsetParser(x, 0.157) yaw_dock = OffsetParser(yaw, 3.1416) dock_description = IncludeLaunchDescription( @@ -96,20 +104,16 @@ def generate_launch_description(): '-z', z]) # Dock - spawn_dock = Node(package='ros_ign_gazebo', executable='create', - namespace = namespace, - arguments=['-name', 'standard_dock', + spawn_dock = Node(package='ros_ign_gazebo', + executable='create', + output='screen', + arguments=['-name', (robot_name,'_standard_dock'), '-x', x_dock, '-y', y, '-z', z, '-Y', '3.141592', - '-topic', (namespace, '/standard_dock_description')], - output='screen') - - # Robot description - robot_description_launch = IncludeLaunchDescription( - PythonLaunchDescriptionSource([robot_description_launch]), - launch_arguments={'gazebo': 'ignition', 'namespace': namespace}.items()) + '-topic', namespaced_dock_description], + ) # ROS Ign bridge ros_ign_bridge = IncludeLaunchDescription( From 3418f976e17b6517e21dbba634dddabb89e7ba88 Mon Sep 17 00:00:00 2001 From: "badr.moutalib" Date: Thu, 25 Aug 2022 17:36:54 +0200 Subject: [PATCH 17/44] commit 2 of fixing namespaced parameters following wildcard implementation in rclcpp --- .../irobot_create_nodes/src/motion_control_node.cpp | 8 -------- .../config/pose_republisher_params.yaml | 4 ++-- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/irobot_create_common/irobot_create_nodes/src/motion_control_node.cpp b/irobot_create_common/irobot_create_nodes/src/motion_control_node.cpp index c393b0f8..c8679241 100644 --- a/irobot_create_common/irobot_create_nodes/src/motion_control_node.cpp +++ b/irobot_create_common/irobot_create_nodes/src/motion_control_node.cpp @@ -122,14 +122,6 @@ MotionControlNode::MotionControlNode(const rclcpp::NodeOptions & options) kidnap_sub_ = this->create_subscription( "kidnap_status", rclcpp::SensorDataQoS(), std::bind(&MotionControlNode::kidnap_callback, this, _1)); - std::string ns_prefix = this->get_namespace(); - - if(ns_prefix == "/") { - ns_prefix = ""; - } - else { - ns_prefix += "_"; - } cmd_vel_out_pub_ = this->create_publisher( "diffdrive_controller/cmd_vel_unstamped", rclcpp::SystemDefaultsQoS()); diff --git a/irobot_create_ignition/irobot_create_ignition_bringup/config/pose_republisher_params.yaml b/irobot_create_ignition/irobot_create_ignition_bringup/config/pose_republisher_params.yaml index 4f7fd5cc..f7a0c842 100644 --- a/irobot_create_ignition/irobot_create_ignition_bringup/config/pose_republisher_params.yaml +++ b/irobot_create_ignition/irobot_create_ignition_bringup/config/pose_republisher_params.yaml @@ -2,10 +2,10 @@ /**: pose_republisher_node: ros__parameters: - robot_publisher_topic: sim_ground_truth_pose_ca_maintenant + robot_publisher_topic: sim_ground_truth_pose robot_subscriber_topic: _internal/sim_ground_truth_pose mouse_publisher_topic: _internal/sim_ground_truth_mouse_pose dock_subscriber_topic: _internal/sim_ground_truth_dock_pose - dock_publisher_topic: sim_ground_truth_dock_posezz + dock_publisher_topic: sim_ground_truth_dock_pose ir_emitter_publisher_topic: _internal/sim_ground_truth_ir_emitter_pose ir_receiver_publisher_topic: _internal/sim_ground_truth_ir_receiver_pose \ No newline at end of file From 08ac8d429adf273e05630168386fab9342c3fb76 Mon Sep 17 00:00:00 2001 From: "badr.moutalib" Date: Fri, 26 Aug 2022 16:05:51 +0200 Subject: [PATCH 18/44] control config file fix --- .../irobot_create_control/config/control.yaml | 22 +------ .../config/sensors_params.yaml | 65 ++++++++++--------- 2 files changed, 35 insertions(+), 52 deletions(-) diff --git a/irobot_create_common/irobot_create_control/config/control.yaml b/irobot_create_common/irobot_create_control/config/control.yaml index 5903f49c..5fa8dad2 100644 --- a/irobot_create_common/irobot_create_control/config/control.yaml +++ b/irobot_create_common/irobot_create_control/config/control.yaml @@ -3,28 +3,10 @@ ros__parameters: update_rate: 1000 # Hz - robot_0/joint_state_broadcaster: + joint_state_broadcaster: type: joint_state_broadcaster/JointStateBroadcaster - robot_0/diffdrive_controller: - type: diff_drive_controller/DiffDriveController - - robot_1/joint_state_broadcaster: - type: joint_state_broadcaster/JointStateBroadcaster - - robot_1/diffdrive_controller: - type: diff_drive_controller/DiffDriveController - - robot_2/joint_state_broadcaster: - type: joint_state_broadcaster/JointStateBroadcaster - - robot_2/diffdrive_controller: - type: diff_drive_controller/DiffDriveController - - robot_3/joint_state_broadcaster: - type: joint_state_broadcaster/JointStateBroadcaster - - robot_3/diffdrive_controller: + diffdrive_controller: type: diff_drive_controller/DiffDriveController diffdrive_controller: diff --git a/irobot_create_ignition/irobot_create_ignition_bringup/config/sensors_params.yaml b/irobot_create_ignition/irobot_create_ignition_bringup/config/sensors_params.yaml index 6b0ebba7..69c7715f 100644 --- a/irobot_create_ignition/irobot_create_ignition_bringup/config/sensors_params.yaml +++ b/irobot_create_ignition/irobot_create_ignition_bringup/config/sensors_params.yaml @@ -1,37 +1,38 @@ --- -sensors_node: - ros__parameters: - cliff_subscription_topics: - - _internal/cliff_front_left/scan - - _internal/cliff_front_right/scan - - _internal/cliff_side_left/scan - - _internal/cliff_side_right/scan +/**: + sensors_node: + ros__parameters: + cliff_subscription_topics: + - _internal/cliff_front_left/scan + - _internal/cliff_front_right/scan + - _internal/cliff_side_left/scan + - _internal/cliff_side_right/scan - cliff_publish_topics: - - _internal/cliff_front_left/event - - _internal/cliff_front_right/event - - _internal/cliff_side_left/event - - _internal/cliff_side_right/event + cliff_publish_topics: + - _internal/cliff_front_left/event + - _internal/cliff_front_right/event + - _internal/cliff_side_left/event + - _internal/cliff_side_right/event - ir_scan_subscription_topics: - - _internal/ir_intensity_front_center_left/scan - - _internal/ir_intensity_front_center_right/scan - - _internal/ir_intensity_front_left/scan - - _internal/ir_intensity_front_right/scan - - _internal/ir_intensity_left/scan - - _internal/ir_intensity_right/scan - - _internal/ir_intensity_side_left/scan + ir_scan_subscription_topics: + - _internal/ir_intensity_front_center_left/scan + - _internal/ir_intensity_front_center_right/scan + - _internal/ir_intensity_front_left/scan + - _internal/ir_intensity_front_right/scan + - _internal/ir_intensity_left/scan + - _internal/ir_intensity_right/scan + - _internal/ir_intensity_side_left/scan - ir_intensity_publish_topics: - - _internal/ir_intensity_front_center_left - - _internal/ir_intensity_front_center_right - - _internal/ir_intensity_front_left - - _internal/ir_intensity_front_right - - _internal/ir_intensity_left - - _internal/ir_intensity_right - - _internal/ir_intensity_side_left + ir_intensity_publish_topics: + - _internal/ir_intensity_front_center_left + - _internal/ir_intensity_front_center_right + - _internal/ir_intensity_front_left + - _internal/ir_intensity_front_right + - _internal/ir_intensity_left + - _internal/ir_intensity_right + - _internal/ir_intensity_side_left - ir_opcode_sensor_0_fov: 3.839724 - ir_opcode_sensor_0_range: 0.1 - ir_opcode_sensor_1_fov: 1.570796 - ir_opcode_sensor_1_range: 0.5 \ No newline at end of file + ir_opcode_sensor_0_fov: 3.839724 + ir_opcode_sensor_0_range: 0.1 + ir_opcode_sensor_1_fov: 1.570796 + ir_opcode_sensor_1_range: 0.5 \ No newline at end of file From 3dfcf820ad2f84ffaf7407b193635de548a33559 Mon Sep 17 00:00:00 2001 From: Hoang David HA Date: Tue, 30 Aug 2022 19:54:36 +0200 Subject: [PATCH 19/44] removing useless namespace options --- .../launch/include/control.py | 64 +++++++++---------- 1 file changed, 31 insertions(+), 33 deletions(-) diff --git a/irobot_create_common/irobot_create_control/launch/include/control.py b/irobot_create_common/irobot_create_control/launch/include/control.py index 5697e70d..12f6a9c6 100644 --- a/irobot_create_common/irobot_create_control/launch/include/control.py +++ b/irobot_create_common/irobot_create_control/launch/include/control.py @@ -19,63 +19,61 @@ def generate_launch_description(): namespace = LaunchConfiguration('namespace') namespaced_node_name = [namespace, '/controller_manager'] - namespaced_diffdrive_controller = [namespace, '_diffdrive_controller'] - namespaced_joint_state_broadcaster = [namespace, '_joint_state_broadcaster'] pkg_create3_control = get_package_share_directory('irobot_create_control') control_params_file = PathJoinSubstitution( [pkg_create3_control, 'config', 'control.yaml']) diffdrive_controller_node = Node( - condition=LaunchConfigurationEquals('namespace', ''), - package='controller_manager', - executable='spawner', - parameters=[control_params_file], - arguments=['diffdrive_controller', '-c', namespaced_node_name], - output='screen', + condition = LaunchConfigurationEquals('namespace', ''), + package = 'controller_manager', + executable = 'spawner', + parameters = [control_params_file], + arguments = ['diffdrive_controller', '-c', namespaced_node_name], + output = 'screen', ) joint_state_broadcaster_spawner = Node( - condition=LaunchConfigurationEquals('namespace', ''), - package='controller_manager', - executable='spawner', - arguments=['joint_state_broadcaster', '-c', namespaced_node_name], - output='screen', + condition = LaunchConfigurationEquals('namespace', ''), + package = 'controller_manager', + executable = 'spawner', + arguments = ['joint_state_broadcaster', '-c', namespaced_node_name], + output = 'screen', ) # Ensure diffdrive_controller_node starts after joint_state_broadcaster_spawner - diffdrive_controller_callback= RegisterEventHandler( - event_handler=OnProcessExit( - target_action=joint_state_broadcaster_spawner, - on_exit=[diffdrive_controller_node], + diffdrive_controller_callback = RegisterEventHandler( + event_handler = OnProcessExit( + target_action = joint_state_broadcaster_spawner, + on_exit = [diffdrive_controller_node], ) ) # Launch with namespace diffdrive_controller_node_namespaced = Node( - condition=LaunchConfigurationNotEquals('namespace', ''), - package='controller_manager', - executable='spawner', - namespace=namespace, - parameters=[control_params_file], - arguments=['diffdrive_controller', '-c', namespaced_node_name, '-n', namespace], - output='screen', + condition = LaunchConfigurationNotEquals('namespace', ''), + package = 'controller_manager', + executable = 'spawner', + namespace = namespace, + parameters = [control_params_file], + arguments = ['diffdrive_controller', '-c', namespaced_node_name, '-n', namespace], + output = 'screen', ) joint_state_broadcaster_spawner_namespaced = Node( - condition=LaunchConfigurationNotEquals('namespace', ''), - package='controller_manager', - executable='spawner', - namespace=namespace, - arguments=['joint_state_broadcaster', '-c', namespaced_node_name, '-n', namespace], - output='screen', + condition = LaunchConfigurationNotEquals('namespace', ''), + package = 'controller_manager', + executable = 'spawner', + namespace = namespace, + arguments = ['joint_state_broadcaster', '-c', namespaced_node_name, '-n', namespace], + output = 'screen', ) # Ensure diffdrive_controller_node starts after joint_state_broadcaster_spawner diffdrive_controller_callback_namespaced = RegisterEventHandler( - event_handler=OnProcessExit( - target_action=joint_state_broadcaster_spawner_namespaced, - on_exit=[diffdrive_controller_node_namespaced], + event_handler = OnProcessExit( + target_action = joint_state_broadcaster_spawner_namespaced, + on_exit = [diffdrive_controller_node_namespaced], ) ) From 1b9d32146c8e487ca56fbda223400a3308d49581 Mon Sep 17 00:00:00 2001 From: "badr.moutalib" Date: Wed, 31 Aug 2022 13:47:03 +0200 Subject: [PATCH 20/44] fixing cmd_vel typo --- .../launch/create3_ros_ignition_bridge.launch.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ros_ignition_bridge.launch.py b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ros_ignition_bridge.launch.py index ba15b138..c6add7b8 100644 --- a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ros_ignition_bridge.launch.py +++ b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ros_ignition_bridge.launch.py @@ -83,11 +83,11 @@ def generate_launch_description(): '@geometry_msgs/msg/Twist' + '[ignition.msgs.Twist'], ['/model/', - LaunchConfiguration('robot_name'), 'cmd_vel' + + LaunchConfiguration('robot_name'), '/cmd_vel' + '@geometry_msgs/msg/Twist' + ']ignition.msgs.Twist']], remappings=[(['/model/', - LaunchConfiguration('robot_name'), 'cmd_vel'], + LaunchConfiguration('robot_name'), '/cmd_vel'], ['/', namespace,'/diffdrive_controller/cmd_vel_unstamped'])]) # Pose bridge From 9394b89ec3ae062f1f69948190c8e87045db9ea8 Mon Sep 17 00:00:00 2001 From: techlabs Date: Thu, 1 Sep 2022 17:18:07 +0200 Subject: [PATCH 21/44] adding an empty world for low GPU machines --- .../worlds/empty.sdf | 78 +++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 irobot_create_ignition/irobot_create_ignition_bringup/worlds/empty.sdf diff --git a/irobot_create_ignition/irobot_create_ignition_bringup/worlds/empty.sdf b/irobot_create_ignition/irobot_create_ignition_bringup/worlds/empty.sdf new file mode 100644 index 00000000..a84bb2c1 --- /dev/null +++ b/irobot_create_ignition/irobot_create_ignition_bringup/worlds/empty.sdf @@ -0,0 +1,78 @@ + + + + + false + + + 0.002 + 1.0 + + + + + + 1 + 0 0 10 0 -0 0 + 0.8 0.8 0.8 1 + 0.2 0.2 0.2 1 + + 1000 + 0.90000000000000002 + 0.01 + 0.001 + + -0.5 0.1 -0.9 + + 0 + 0 + 0 + + + 0 0 -9.8 + 6e-06 2.3e-05 -4.2e-05 + + + 0.4 0.4 0.4 1 + 0.7 0.7 0.7 1 + 1 + + + 1 + + + + + 0 0 1 + 100 100 + + + + + + + + + + + + + + 0 0 1 + 100 100 + + + + 0.8 0.8 0.8 1 + 0.8 0.8 0.8 1 + 0.8 0.8 0.8 1 + + + + + + 0 0 0 0 -0 0 + + + + \ No newline at end of file From edcbeea8c090a218d2f3d08780633f1c36435eeb Mon Sep 17 00:00:00 2001 From: techlabs Date: Fri, 2 Sep 2022 12:19:22 +0200 Subject: [PATCH 22/44] fixing ir_intensity double namespacing --- .../config/ir_intensity_vector_params.yaml | 2 +- .../launch/create3_nodes.launch.py | 19 ------------------- 2 files changed, 1 insertion(+), 20 deletions(-) diff --git a/irobot_create_common/irobot_create_common_bringup/config/ir_intensity_vector_params.yaml b/irobot_create_common/irobot_create_common_bringup/config/ir_intensity_vector_params.yaml index 0a4fedb2..bf35b9bf 100644 --- a/irobot_create_common/irobot_create_common_bringup/config/ir_intensity_vector_params.yaml +++ b/irobot_create_common/irobot_create_common_bringup/config/ir_intensity_vector_params.yaml @@ -3,7 +3,7 @@ ir_intensity_vector_publisher: ros__parameters: # IR intensity publisher topic - publisher_topic: /ir_intensity + publisher_topic: ir_intensity publish_rate: 62.0 subscription_topics: # IR intensity topics diff --git a/irobot_create_common/irobot_create_common_bringup/launch/create3_nodes.launch.py b/irobot_create_common/irobot_create_common_bringup/launch/create3_nodes.launch.py index 06c74a14..141b9acd 100644 --- a/irobot_create_common/irobot_create_common_bringup/launch/create3_nodes.launch.py +++ b/irobot_create_common/irobot_create_common_bringup/launch/create3_nodes.launch.py @@ -58,12 +58,6 @@ def generate_launch_description(): replacements={'/hazard_detection': ('/', namespace, '/hazard_detection')} ) - # ir_intensity - namespaced_ir_intensity_params_yaml_file = ReplaceString( - source_file=ir_intensity_params_yaml_file, - replacements={'/ir_intensity': ('/', namespace, '/ir_intensity')} - ) - # wheel_status_publisher namespaced_wheel_status_params_yaml_file = ReplaceString( source_file=wheel_status_params_yaml_file, @@ -148,7 +142,6 @@ def generate_launch_description(): # Publish IR intensity vector ir_intensity_vector_node = Node( - condition=LaunchConfigurationEquals('namespace', ''), package='irobot_create_nodes', name='ir_intensity_vector_publisher', namespace=namespace, @@ -158,17 +151,6 @@ def generate_launch_description(): output='screen', ) - ir_intensity_vector_node_namespaced = Node( - condition=LaunchConfigurationNotEquals('namespace', ''), - package='irobot_create_nodes', - name='ir_intensity_vector_publisher', - namespace=namespace, - executable='ir_intensity_vector_publisher', - parameters=[namespaced_ir_intensity_params_yaml_file, - {'use_sim_time': True}], - output='screen', - ) - # Motion Control motion_control_node = Node( package='irobot_create_nodes', @@ -304,7 +286,6 @@ def generate_launch_description(): ld.add_action(hazards_vector_node) ld.add_action(hazards_vector_node_namespaced) ld.add_action(ir_intensity_vector_node) - ld.add_action(ir_intensity_vector_node_namespaced) ld.add_action(motion_control_node) ld.add_action(wheel_status_node) ld.add_action(wheel_status_node_namespaced) From d579b852506d2a22506591bb3c89a4132961ea23 Mon Sep 17 00:00:00 2001 From: techlabs Date: Fri, 2 Sep 2022 15:00:35 +0200 Subject: [PATCH 23/44] remove duplicated code and move namespacing to config files --- .../config/hazard_vector_params.yaml | 2 +- .../config/kidnap_estimator_params.yaml | 4 +- .../config/mock_params.yaml | 2 +- .../config/robot_state_params.yaml | 8 +- .../config/wheel_status_params.yaml | 4 +- .../launch/create3_nodes.launch.py | 143 ------------------ .../src/sensors/cliff.cpp | 1 + 7 files changed, 11 insertions(+), 153 deletions(-) diff --git a/irobot_create_common/irobot_create_common_bringup/config/hazard_vector_params.yaml b/irobot_create_common/irobot_create_common_bringup/config/hazard_vector_params.yaml index 5a1af8eb..30c44cc9 100644 --- a/irobot_create_common/irobot_create_common_bringup/config/hazard_vector_params.yaml +++ b/irobot_create_common/irobot_create_common_bringup/config/hazard_vector_params.yaml @@ -3,7 +3,7 @@ hazards_vector_publisher: ros__parameters: # Hazard detection publisher topic - publisher_topic: /hazard_detection + publisher_topic: hazard_detection publish_rate: 62.0 subscription_topics: # Bumper topic diff --git a/irobot_create_common/irobot_create_common_bringup/config/kidnap_estimator_params.yaml b/irobot_create_common/irobot_create_common_bringup/config/kidnap_estimator_params.yaml index 86740078..84b334bd 100644 --- a/irobot_create_common/irobot_create_common_bringup/config/kidnap_estimator_params.yaml +++ b/irobot_create_common/irobot_create_common_bringup/config/kidnap_estimator_params.yaml @@ -3,6 +3,6 @@ kidnap_estimator_publisher: ros__parameters: # Kidnap status publisher topic - kidnap_status_topic: /kidnap_status + kidnap_status_topic: kidnap_status # Subscription topics - hazard_topic: /hazard_detection + hazard_topic: hazard_detection diff --git a/irobot_create_common/irobot_create_common_bringup/config/mock_params.yaml b/irobot_create_common/irobot_create_common_bringup/config/mock_params.yaml index 0ec4f823..fa28a80c 100644 --- a/irobot_create_common/irobot_create_common_bringup/config/mock_params.yaml +++ b/irobot_create_common/irobot_create_common_bringup/config/mock_params.yaml @@ -3,6 +3,6 @@ mock_publisher: ros__parameters: # Mock slip status publisher topic - slip_status_topic: /slip_status + slip_status_topic: slip_status # Publishers rate slip_status_publish_rate: 62.0 diff --git a/irobot_create_common/irobot_create_common_bringup/config/robot_state_params.yaml b/irobot_create_common/irobot_create_common_bringup/config/robot_state_params.yaml index f19dbe98..0a04b172 100644 --- a/irobot_create_common/irobot_create_common_bringup/config/robot_state_params.yaml +++ b/irobot_create_common/irobot_create_common_bringup/config/robot_state_params.yaml @@ -2,16 +2,16 @@ robot_state: ros__parameters: # Stop status publisher topic - stop_status_topic: /stop_status + stop_status_topic: stop_status # Mock battery state publisher topic - battery_state_topic: /battery_state + battery_state_topic: battery_state # Publishers rate kidnap_status_publish_rate: 1.0 stop_status_publish_rate: 62.0 battery_state_publish_rate: 0.1 # Subscription topics - dock_topic: /dock - wheel_vels_topic: /odom + dock_topic: dock + wheel_vels_topic: odom # Stop status position difference tolerance linear_velocity_tolerance: 0.01 angular_velocity_tolerance: 0.1 diff --git a/irobot_create_common/irobot_create_common_bringup/config/wheel_status_params.yaml b/irobot_create_common/irobot_create_common_bringup/config/wheel_status_params.yaml index 8366752b..ad354d4e 100644 --- a/irobot_create_common/irobot_create_common_bringup/config/wheel_status_params.yaml +++ b/irobot_create_common/irobot_create_common_bringup/config/wheel_status_params.yaml @@ -9,6 +9,6 @@ # Wheel radius wheel_radius: 0.03575 # Wheels angular velocity topic - velocity_topic: /wheel_vels + velocity_topic: wheel_vels # Wheels' net encoder ticks topic - ticks_topic: /wheel_ticks + ticks_topic: wheel_ticks diff --git a/irobot_create_common/irobot_create_common_bringup/launch/create3_nodes.launch.py b/irobot_create_common/irobot_create_common_bringup/launch/create3_nodes.launch.py index 141b9acd..5bfedb81 100644 --- a/irobot_create_common/irobot_create_common_bringup/launch/create3_nodes.launch.py +++ b/irobot_create_common/irobot_create_common_bringup/launch/create3_nodes.launch.py @@ -52,74 +52,8 @@ def generate_launch_description(): launch_arguments=[('namespace', LaunchConfiguration('namespace'))] ) - # hazard_vector_params - namespaced_hazards_params_yaml_file = ReplaceString( - source_file=hazards_params_yaml_file, - replacements={'/hazard_detection': ('/', namespace, '/hazard_detection')} - ) - - # wheel_status_publisher - namespaced_wheel_status_params_yaml_file = ReplaceString( - source_file=wheel_status_params_yaml_file, - replacements={'/wheel_vels': ('/', namespace, '/wheel_vels')} - ) - namespaced_wheel_status_params_yaml_file = ReplaceString( - source_file=namespaced_wheel_status_params_yaml_file, - replacements={'/wheel_ticks': ('/', namespace, '/wheel_ticks')} - ) - - # mock - namespaced_mock_params_yaml_file = ReplaceString( - source_file=mock_params_yaml_file, - replacements={'/slip_status': ('/', namespace, '/slip_status')} - ) - - # robot_state - namespaced_robot_state_yaml_file = ReplaceString( - source_file=robot_state_yaml_file, - replacements={'/stop_status': ('/', namespace, '/stop_status')} - ) - namespaced_robot_state_yaml_file = ReplaceString( - source_file=namespaced_robot_state_yaml_file, - replacements={'/battery_state': ('/', namespace, '/battery_state')} - ) - namespaced_robot_state_yaml_file = ReplaceString( - source_file=namespaced_robot_state_yaml_file, - replacements={'/dock': ('/', namespace, '/dock')} - ) - namespaced_robot_state_yaml_file = ReplaceString( - source_file=namespaced_robot_state_yaml_file, - replacements={'/odom': ('/', namespace, '/odom')} - ) - - # kidnap_estimator - namespaced_kidnap_estimator_yaml_file = ReplaceString( - source_file=kidnap_estimator_yaml_file, - replacements={'/kidnap_status': ('/', namespace, '/kidnap_status')} - ) - namespaced_kidnap_estimator_yaml_file = ReplaceString( - source_file=namespaced_kidnap_estimator_yaml_file, - replacements={'/hazard_detection': ('/', namespace, '/hazard_detection')} - ) - - # ui_mgr_params - namespaced_ui_mgr_params_yaml_file = ReplaceString( - source_file=ui_mgr_params_yaml_file, - replacements={'interface_buttons': ('/', namespace, '/interface_buttons')} - ) - namespaced_ui_mgr_params_yaml_file = ReplaceString( - source_file=namespaced_ui_mgr_params_yaml_file, - replacements={'cmd_lightring': ('/', namespace, '/cmd_lightring')} - ) - namespaced_ui_mgr_params_yaml_file = ReplaceString( - source_file=namespaced_ui_mgr_params_yaml_file, - replacements={'cmd_audio': ('/', namespace, '/cmd_audio')} - ) - - # Publish hazards vector hazards_vector_node = Node( - condition=LaunchConfigurationEquals('namespace', ''), package='irobot_create_nodes', name='hazards_vector_publisher', namespace=namespace, @@ -129,17 +63,6 @@ def generate_launch_description(): output='screen', ) - hazards_vector_node_namespaced = Node( - condition=LaunchConfigurationNotEquals('namespace', ''), - package='irobot_create_nodes', - name='hazards_vector_publisher', - namespace=namespace, - executable='hazards_vector_publisher', - parameters=[namespaced_hazards_params_yaml_file, - {'use_sim_time': True}], - output='screen', - ) - # Publish IR intensity vector ir_intensity_vector_node = Node( package='irobot_create_nodes', @@ -163,7 +86,6 @@ def generate_launch_description(): # Publish wheel status wheel_status_node = Node( - condition=LaunchConfigurationEquals('namespace', ''), package='irobot_create_nodes', name='wheel_status_publisher', namespace=namespace, @@ -173,20 +95,8 @@ def generate_launch_description(): output='screen', ) - wheel_status_node_namespaced = Node( - condition=LaunchConfigurationNotEquals('namespace', ''), - package='irobot_create_nodes', - name='wheel_status_publisher', - namespace=namespace, - executable='wheel_status_publisher', - parameters=[namespaced_wheel_status_params_yaml_file, - {'use_sim_time': True}], - output='screen', - ) - # Publish mock topics mock_topics_node = Node( - condition=LaunchConfigurationEquals('namespace', ''), package='irobot_create_nodes', name='mock_publisher', namespace=namespace, @@ -196,20 +106,8 @@ def generate_launch_description(): output='screen', ) - mock_topics_node_namespaced = Node( - condition=LaunchConfigurationNotEquals('namespace', ''), - package='irobot_create_nodes', - name='mock_publisher', - namespace=namespace, - executable='mock_publisher', - parameters=[namespaced_mock_params_yaml_file, - {'use_sim_time': True}], - output='screen', - ) - # Publish robot state robot_state_node = Node( - condition=LaunchConfigurationEquals('namespace', ''), package='irobot_create_nodes', name='robot_state', namespace=namespace, @@ -219,20 +117,8 @@ def generate_launch_description(): output='screen', ) - robot_state_node_namespaced = Node( - condition=LaunchConfigurationNotEquals('namespace', ''), - package='irobot_create_nodes', - name='robot_state', - namespace=namespace, - executable='robot_state', - parameters=[namespaced_robot_state_yaml_file, - {'use_sim_time': True}], - output='screen', - ) - # Publish kidnap estimator kidnap_estimator_node = Node( - condition=LaunchConfigurationEquals('namespace', ''), package='irobot_create_nodes', name='kidnap_estimator_publisher', namespace=namespace, @@ -242,17 +128,6 @@ def generate_launch_description(): output='screen', ) - kidnap_estimator_node_namespaced = Node( - condition=LaunchConfigurationNotEquals('namespace', ''), - package='irobot_create_nodes', - name='kidnap_estimator_publisher', - namespace=namespace, - executable='kidnap_estimator_publisher', - parameters=[namespaced_kidnap_estimator_yaml_file, - {'use_sim_time': True}], - output='screen', - ) - # UI topics / actions ui_mgr_node = Node( condition=LaunchConfigurationEquals('namespace', ''), @@ -266,37 +141,19 @@ def generate_launch_description(): output='screen', ) - ui_mgr_node_namespaced = Node( - condition=LaunchConfigurationNotEquals('namespace', ''), - package='irobot_create_nodes', - name='ui_mgr', - namespace=namespace, - executable='ui_mgr', - parameters=[namespaced_ui_mgr_params_yaml_file, - {'use_sim_time': True}, - {'gazebo': LaunchConfiguration('gazebo')}], - output='screen', - ) - # Define LaunchDescription variable ld = LaunchDescription(ARGUMENTS) # Include robot description ld.add_action(diffdrive_controller) # Add nodes to LaunchDescription ld.add_action(hazards_vector_node) - ld.add_action(hazards_vector_node_namespaced) ld.add_action(ir_intensity_vector_node) ld.add_action(motion_control_node) ld.add_action(wheel_status_node) - ld.add_action(wheel_status_node_namespaced) ld.add_action(mock_topics_node) - ld.add_action(mock_topics_node_namespaced) ld.add_action(robot_state_node) - ld.add_action(robot_state_node_namespaced) ld.add_action(kidnap_estimator_node) - ld.add_action(kidnap_estimator_node_namespaced) ld.add_action(ui_mgr_node) - ld.add_action(ui_mgr_node_namespaced) return ld \ No newline at end of file diff --git a/irobot_create_ignition/irobot_create_ignition_toolbox/src/sensors/cliff.cpp b/irobot_create_ignition/irobot_create_ignition_toolbox/src/sensors/cliff.cpp index 7f819ac3..7d49ca8c 100644 --- a/irobot_create_ignition/irobot_create_ignition_toolbox/src/sensors/cliff.cpp +++ b/irobot_create_ignition/irobot_create_ignition_toolbox/src/sensors/cliff.cpp @@ -35,6 +35,7 @@ Cliff::Cliff(std::shared_ptr & nh) std::bind(&Cliff::cliff_callback, this, std::placeholders::_1))); } + // TODO(sophia) namespace for (std::string topic : cliff_pub_topics) { for (const std::string sensor : cliff_sensors_) { if (topic.find(sensor) != std::string::npos) { From 6e60d56b84564425157c4e3cb3abfda9f0faf2f6 Mon Sep 17 00:00:00 2001 From: techlabs Date: Fri, 2 Sep 2022 17:28:42 +0200 Subject: [PATCH 24/44] -internal namespacing WIP --- .../launch/create3_ignition_nodes.launch.py | 19 -- .../create3_ros_ignition_bridge.launch.py | 221 ++++++++++++------ .../src/sensors/ir_opcode.cpp | 4 +- .../src/sensors/mouse.cpp | 2 +- 4 files changed, 159 insertions(+), 87 deletions(-) diff --git a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition_nodes.launch.py b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition_nodes.launch.py index 6e93d244..25138444 100644 --- a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition_nodes.launch.py +++ b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition_nodes.launch.py @@ -32,7 +32,6 @@ def generate_launch_description(): # Pose republisher pose_republisher_node = Node( - # condition=LaunchConfigurationEquals('namespace', ''), package='irobot_create_ignition_toolbox', name='pose_republisher_node', namespace = namespace, @@ -43,23 +42,6 @@ def generate_launch_description(): output='screen', ) - # namespaced_pose_republisher_params_yaml_file = ReplaceString( - # source_file=pose_republisher_params_yaml_file, - # replacements={'/sim_ground_truth_pose': ('/', namespace, '/sim_ground_truth_pose')} - # ) - - # pose_republisher_node_namespaced = Node( - # condition=LaunchConfigurationNotEquals('namespace', ''), - # package='irobot_create_ignition_toolbox', - # name='pose_republisher_node', - # namespace=namespace, - # executable='pose_republisher_node', - # parameters=[namespaced_pose_republisher_params_yaml_file, - # {'robot_name': LaunchConfiguration('robot_name')}, - # {'use_sim_time': True}], - # output='screen', - # ) - # Sensors sensors_node = Node( package='irobot_create_ignition_toolbox', @@ -84,7 +66,6 @@ def generate_launch_description(): # Create launch description and add actions ld = LaunchDescription(ARGUMENTS) ld.add_action(pose_republisher_node) - # ld.add_action(pose_republisher_node_namespaced) ld.add_action(sensors_node) ld.add_action(interface_buttons_node) return ld diff --git a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ros_ignition_bridge.launch.py b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ros_ignition_bridge.launch.py index c6add7b8..c2dd8cdc 100644 --- a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ros_ignition_bridge.launch.py +++ b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ros_ignition_bridge.launch.py @@ -72,26 +72,27 @@ def generate_launch_description(): ) cmd_vel_bridge_namespaced = Node(condition=LaunchConfigurationNotEquals('namespace', ''), - package='ros_ign_bridge', - executable='parameter_bridge', - name='cmd_vel_bridge', - namespace=namespace, - output='screen', - parameters=[{ - 'use_sim_time': use_sim_time}], - arguments=[['/', namespace, '/cmd_vel' + - '@geometry_msgs/msg/Twist' + - '[ignition.msgs.Twist'], - ['/model/', - LaunchConfiguration('robot_name'), '/cmd_vel' + - '@geometry_msgs/msg/Twist' + - ']ignition.msgs.Twist']], - remappings=[(['/model/', - LaunchConfiguration('robot_name'), '/cmd_vel'], - ['/', namespace,'/diffdrive_controller/cmd_vel_unstamped'])]) + package='ros_ign_bridge', + executable='parameter_bridge', + name='cmd_vel_bridge', + namespace=namespace, + output='screen', + parameters=[{ + 'use_sim_time': use_sim_time}], + arguments=[['/', namespace, '/cmd_vel' + + '@geometry_msgs/msg/Twist' + + '[ignition.msgs.Twist'], + ['/model/', + LaunchConfiguration('robot_name'), '/cmd_vel' + + '@geometry_msgs/msg/Twist' + + ']ignition.msgs.Twist']], + remappings=[(['/model/', + LaunchConfiguration('robot_name'), '/cmd_vel'], + ['/', namespace,'/diffdrive_controller/cmd_vel_unstamped'])]) # Pose bridge - pose_bridge = Node(package='ros_ign_bridge', executable='parameter_bridge', + pose_bridge = Node(condition=LaunchConfigurationEquals('namespace', ''), + package='ros_ign_bridge', executable='parameter_bridge', namespace=namespace, name='pose_bridge', output='screen', @@ -113,6 +114,29 @@ def generate_launch_description(): '/_internal/sim_ground_truth_dock_pose') ]) + pose_bridge_namespaced = Node(condition=LaunchConfigurationNotEquals('namespace', ''), + package='ros_ign_bridge', executable='parameter_bridge', + namespace=namespace, + name='pose_bridge', + output='screen', + parameters=[{ + 'use_sim_time': use_sim_time + }], + arguments=[ + ['/model/', LaunchConfiguration('robot_name'), '/pose' + + '@tf2_msgs/msg/TFMessage' + + '[ignition.msgs.Pose_V'], + '/model/standard_dock/pose' + + '@tf2_msgs/msg/TFMessage' + + '[ignition.msgs.Pose_V' + ], + remappings=[ + (['/model/', LaunchConfiguration('robot_name'), '/pose'], + ['/', namespace, '/_internal/sim_ground_truth_pose']), + ('/model/standard_dock/pose', + ['/', namespace, '/_internal/sim_ground_truth_dock_pose']) + ]) + # odom to base_link transform bridge odom_base_tf_bridge = Node(package='ros_ign_bridge', executable='parameter_bridge', namespace=namespace, @@ -132,46 +156,46 @@ def generate_launch_description(): # Bumper contact sensor bridge bumper_contact_bridge = Node(condition=LaunchConfigurationEquals('namespace', ''), - package='ros_ign_bridge', executable='parameter_bridge', - name='bumper_contact_bridge', - output='screen', - parameters=[{ - 'use_sim_time': use_sim_time - }], - arguments=[ - ['/model/', LaunchConfiguration('robot_name'), - '/bumper_contact' + - '@ros_ign_interfaces/msg/Contacts' + - '[ignition.msgs.Contacts'] - ], - remappings=[ - (['/model/', LaunchConfiguration('robot_name'), - '/bumper_contact'], - 'bumper_contact') - ]) + package='ros_ign_bridge', executable='parameter_bridge', + name='bumper_contact_bridge', + output='screen', + parameters=[{ + 'use_sim_time': use_sim_time + }], + arguments=[ + ['/model/', LaunchConfiguration('robot_name'), + '/bumper_contact' + + '@ros_ign_interfaces/msg/Contacts' + + '[ignition.msgs.Contacts'] + ], + remappings=[ + (['/model/', LaunchConfiguration('robot_name'), + '/bumper_contact'], + 'bumper_contact') + ]) bumper_contact_bridge_namespaced = Node(condition=LaunchConfigurationNotEquals('namespace', ''), - package='ros_ign_bridge', executable='parameter_bridge', - namespace=namespace, - name='bumper_contact_bridge', - output='screen', - parameters=[{ - 'use_sim_time': use_sim_time - }], - arguments=[ - ['/model/', LaunchConfiguration('robot_name'), - '/bumper_contact' + - '@ros_ign_interfaces/msg/Contacts' + - '[ignition.msgs.Contacts'] - ], - remappings=[ - (['/model/', LaunchConfiguration('robot_name'), - '/bumper_contact'], - ['/', namespace, '/bumper_contact']) - ]) + package='ros_ign_bridge', executable='parameter_bridge', + name='bumper_contact_bridge', + output='screen', + parameters=[{ + 'use_sim_time': use_sim_time + }], + arguments=[ + ['/model/', LaunchConfiguration('robot_name'), + '/bumper_contact' + + '@ros_ign_interfaces/msg/Contacts' + + '[ignition.msgs.Contacts'] + ], + remappings=[ + (['/model/', LaunchConfiguration('robot_name'), + '/bumper_contact'], + ['/', namespace, '/bumper_contact']) + ]) # Cliff bridge - cliff_bridge = Node(package='ros_ign_bridge', executable='parameter_bridge', + cliff_bridge = Node(condition=LaunchConfigurationEquals('namespace', ''), + package='ros_ign_bridge', executable='parameter_bridge', namespace=namespace, name='cliff_bridge', output='screen', @@ -192,8 +216,33 @@ def generate_launch_description(): '/_internal/' + cliff + '/scan') for cliff in cliff_sensors ]) + + cliff_bridge_namespaced = Node(condition=LaunchConfigurationNotEquals('namespace', ''), + package='ros_ign_bridge', executable='parameter_bridge', + namespace=namespace, + name='cliff_bridge', + output='screen', + parameters=[{ + 'use_sim_time': use_sim_time + }], + arguments=[ + ['/world/', LaunchConfiguration('world'), + '/model/', LaunchConfiguration('robot_name'), + '/link/base_link/sensor/' + cliff + '/scan' + + '@sensor_msgs/msg/LaserScan[ignition.msgs.LaserScan'] + for cliff in cliff_sensors + ], + remappings=[ + (['/world/', LaunchConfiguration('world'), + '/model/', LaunchConfiguration('robot_name'), + '/link/base_link/sensor/' + cliff + '/scan'], + ['/', namespace,'/_internal/', cliff, '/scan']) + for cliff in cliff_sensors + ]) + # IR intensity bridge - ir_intensity_bridge = Node(package='ros_ign_bridge', executable='parameter_bridge', + ir_intensity_bridge = Node(condition=LaunchConfigurationEquals('namespace', ''), + package='ros_ign_bridge', executable='parameter_bridge', namespace=namespace, name='ir_intensity_bridge', output='screen', @@ -214,19 +263,57 @@ def generate_launch_description(): '/_internal/' + ir + '/scan') for ir in ir_intensity_sensors ]) + + ir_intensity_bridge_namespaced = Node(condition=LaunchConfigurationNotEquals('namespace', ''), + package='ros_ign_bridge', executable='parameter_bridge', + namespace=namespace, + name='ir_intensity_bridge', + output='screen', + parameters=[{ + 'use_sim_time': use_sim_time + }], + arguments=[ + ['/world/', LaunchConfiguration('world'), + '/model/', LaunchConfiguration('robot_name'), + '/link/' + ir + '/sensor/' + ir + '/scan' + + '@sensor_msgs/msg/LaserScan[ignition.msgs.LaserScan'] + for ir in ir_intensity_sensors + ], + remappings=[ + (['/world/', LaunchConfiguration('world'), + '/model/', LaunchConfiguration('robot_name'), + '/link/' + ir + '/sensor/' + ir + '/scan'], + ['/', namespace, '/_internal/', ir, '/scan']) for ir in ir_intensity_sensors + ]) + # Buttons message bridge - buttons_msg_bridge = Node(package='ros_ign_bridge', executable='parameter_bridge', - namespace=namespace, - name='buttons_msg_bridge', - output='screen', - parameters=[{ - 'use_sim_time': use_sim_time - }], - arguments=[ - ['/', namespace, '/create3/buttons' + + buttons_msg_bridge = Node(condition=LaunchConfigurationEquals('namespace', ''), + package='ros_ign_bridge', executable='parameter_bridge', + namespace=namespace, + name='buttons_msg_bridge', + output='screen', + parameters=[{ + 'use_sim_time': use_sim_time + }], + arguments=[ + ['/create3/buttons' + + '@std_msgs/msg/Int32' + + '[ignition.msgs.Int32'] + ]) + + buttons_msg_bridge_namespaced = Node(condition=LaunchConfigurationNotEquals('namespace', ''), + package='ros_ign_bridge', executable='parameter_bridge', + namespace=namespace, + name='buttons_msg_bridge', + output='screen', + parameters=[{ + 'use_sim_time': use_sim_time + }], + arguments=[ + ['/', namespace, '/create3/buttons' + '@std_msgs/msg/Int32' + '[ignition.msgs.Int32'] - ]) + ]) # Create launch description and add actions ld = LaunchDescription(ARGUMENTS) @@ -234,10 +321,14 @@ def generate_launch_description(): ld.add_action(cmd_vel_bridge) ld.add_action(cmd_vel_bridge_namespaced) ld.add_action(pose_bridge) + ld.add_action(pose_bridge_namespaced) ld.add_action(odom_base_tf_bridge) ld.add_action(bumper_contact_bridge) ld.add_action(bumper_contact_bridge_namespaced) ld.add_action(cliff_bridge) + ld.add_action(cliff_bridge_namespaced) ld.add_action(ir_intensity_bridge) + ld.add_action(ir_intensity_bridge_namespaced) ld.add_action(buttons_msg_bridge) + ld.add_action(buttons_msg_bridge_namespaced) return ld diff --git a/irobot_create_ignition/irobot_create_ignition_toolbox/src/sensors/ir_opcode.cpp b/irobot_create_ignition/irobot_create_ignition_toolbox/src/sensors/ir_opcode.cpp index 18eaed2c..44db2fbb 100644 --- a/irobot_create_ignition/irobot_create_ignition_toolbox/src/sensors/ir_opcode.cpp +++ b/irobot_create_ignition/irobot_create_ignition_toolbox/src/sensors/ir_opcode.cpp @@ -15,12 +15,12 @@ IrOpcode::IrOpcode(std::shared_ptr & nh) : nh_(nh) { emitter_pose_sub_ = nh_->create_subscription( - "/_internal/sim_ground_truth_ir_emitter_pose", + "_internal/sim_ground_truth_ir_emitter_pose", rclcpp::SensorDataQoS(), std::bind(&IrOpcode::emitter_pose_callback, this, std::placeholders::_1)); receiver_pose_sub_ = nh_->create_subscription( - "/_internal/sim_ground_truth_ir_receiver_pose", + "_internal/sim_ground_truth_ir_receiver_pose", rclcpp::SensorDataQoS(), std::bind(&IrOpcode::receiver_pose_callback, this, std::placeholders::_1)); diff --git a/irobot_create_ignition/irobot_create_ignition_toolbox/src/sensors/mouse.cpp b/irobot_create_ignition/irobot_create_ignition_toolbox/src/sensors/mouse.cpp index ea578a87..e2d24f53 100644 --- a/irobot_create_ignition/irobot_create_ignition_toolbox/src/sensors/mouse.cpp +++ b/irobot_create_ignition/irobot_create_ignition_toolbox/src/sensors/mouse.cpp @@ -16,7 +16,7 @@ Mouse::Mouse(std::shared_ptr & nh) last_mouse_position_{0, 0, 0} { mouse_pose_sub_ = nh_->create_subscription( - "/_internal/sim_ground_truth_mouse_pose", + "_internal/sim_ground_truth_mouse_pose", rclcpp::SensorDataQoS(), std::bind(&Mouse::mouse_pose_callback, this, std::placeholders::_1)); From 2a3bb3fefeaec8772392a9153b04bcf148538f99 Mon Sep 17 00:00:00 2001 From: techlabs Date: Fri, 2 Sep 2022 18:24:55 +0200 Subject: [PATCH 25/44] hotfix bumper_contact namespacing --- .../launch/create3_ros_ignition_bridge.launch.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ros_ignition_bridge.launch.py b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ros_ignition_bridge.launch.py index c2dd8cdc..c051b67a 100644 --- a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ros_ignition_bridge.launch.py +++ b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ros_ignition_bridge.launch.py @@ -135,7 +135,7 @@ def generate_launch_description(): ['/', namespace, '/_internal/sim_ground_truth_pose']), ('/model/standard_dock/pose', ['/', namespace, '/_internal/sim_ground_truth_dock_pose']) - ]) + ]) # odom to base_link transform bridge odom_base_tf_bridge = Node(package='ros_ign_bridge', executable='parameter_bridge', @@ -171,7 +171,7 @@ def generate_launch_description(): remappings=[ (['/model/', LaunchConfiguration('robot_name'), '/bumper_contact'], - 'bumper_contact') + '/bumper_contact') ]) bumper_contact_bridge_namespaced = Node(condition=LaunchConfigurationNotEquals('namespace', ''), From 24bc1d2a61b32d1222fefbe5a5f87ceb6f1516f1 Mon Sep 17 00:00:00 2001 From: techlabs Date: Wed, 7 Sep 2022 16:32:37 +0200 Subject: [PATCH 26/44] small cleanup all topic are namespaced correctly --- .../launch/create3_ignition_nodes.launch.py | 2 +- .../launch/create3_spawn.launch.py | 5 ++--- .../irobot_create_ignition_toolbox/src/sensors/cliff.cpp | 1 - 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition_nodes.launch.py b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition_nodes.launch.py index 25138444..f32d77ac 100644 --- a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition_nodes.launch.py +++ b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition_nodes.launch.py @@ -5,7 +5,7 @@ from irobot_create_common_bringup.replace_string import ReplaceString from launch import LaunchDescription from launch.actions import DeclareLaunchArgument -from launch.conditions import LaunchConfigurationEquals, LaunchConfigurationNotEquals +#from launch.conditions import LaunchConfigurationEquals, LaunchConfigurationNotEquals from launch.substitutions import LaunchConfiguration, PathJoinSubstitution from launch_ros.actions import Node diff --git a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_spawn.launch.py b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_spawn.launch.py index a9890cb6..6f1c99cc 100644 --- a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_spawn.launch.py +++ b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_spawn.launch.py @@ -58,8 +58,7 @@ def generate_launch_description(): [pkg_irobot_create_common_bringup, 'launch', 'dock_description.launch.py']) # Launch configurations - x, y, z = LaunchConfiguration('x'), LaunchConfiguration( - 'y'), LaunchConfiguration('z') + x, y, z = LaunchConfiguration('x'), LaunchConfiguration('y'), LaunchConfiguration('z') yaw = LaunchConfiguration('yaw') robot_name = LaunchConfiguration('robot_name') namespace = LaunchConfiguration('namespace') @@ -127,7 +126,7 @@ def generate_launch_description(): create3_nodes = IncludeLaunchDescription( PythonLaunchDescriptionSource([create3_nodes_launch]), launch_arguments=[('namespace', namespace)] - ) + ) create3_ignition_nodes = IncludeLaunchDescription( PythonLaunchDescriptionSource([create3_ignition_nodes_launch]), diff --git a/irobot_create_ignition/irobot_create_ignition_toolbox/src/sensors/cliff.cpp b/irobot_create_ignition/irobot_create_ignition_toolbox/src/sensors/cliff.cpp index 7d49ca8c..7f819ac3 100644 --- a/irobot_create_ignition/irobot_create_ignition_toolbox/src/sensors/cliff.cpp +++ b/irobot_create_ignition/irobot_create_ignition_toolbox/src/sensors/cliff.cpp @@ -35,7 +35,6 @@ Cliff::Cliff(std::shared_ptr & nh) std::bind(&Cliff::cliff_callback, this, std::placeholders::_1))); } - // TODO(sophia) namespace for (std::string topic : cliff_pub_topics) { for (const std::string sensor : cliff_sensors_) { if (topic.find(sensor) != std::string::npos) { From 592bbf10a0121264c4da1d22852accdae2bba19c Mon Sep 17 00:00:00 2001 From: techlabs Date: Wed, 21 Sep 2022 16:35:24 +0200 Subject: [PATCH 27/44] fix bridge between /model/standard_dock/pose and _internal/sim_ground_truth_dock_pose --- .../resource/irobot_create_common_dock | 0 .../launch/create3_ignition_nodes.launch.py | 3 ++- .../launch/create3_ros_ignition_bridge.launch.py | 12 ++++++------ .../src/sensors/ir_opcode.cpp | 1 + 4 files changed, 9 insertions(+), 7 deletions(-) delete mode 100644 irobot_create_common/irobot_create_common_dock/resource/irobot_create_common_dock diff --git a/irobot_create_common/irobot_create_common_dock/resource/irobot_create_common_dock b/irobot_create_common/irobot_create_common_dock/resource/irobot_create_common_dock deleted file mode 100644 index e69de29b..00000000 diff --git a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition_nodes.launch.py b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition_nodes.launch.py index f32d77ac..7f55fbde 100644 --- a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition_nodes.launch.py +++ b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition_nodes.launch.py @@ -19,7 +19,8 @@ def generate_launch_description(): - + #TODO(sophia) investigate that this is redirected correctly with the namespacing + # Directories pkg_create3_ignition_bringup = get_package_share_directory('irobot_create_ignition_bringup') diff --git a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ros_ignition_bridge.launch.py b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ros_ignition_bridge.launch.py index c051b67a..22a64418 100644 --- a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ros_ignition_bridge.launch.py +++ b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ros_ignition_bridge.launch.py @@ -103,14 +103,14 @@ def generate_launch_description(): ['/model/', LaunchConfiguration('robot_name'), '/pose' + '@tf2_msgs/msg/TFMessage' + '[ignition.msgs.Pose_V'], - '/model/standard_dock/pose' + + ['/model/', LaunchConfiguration('robot_name'), '_standard_dock', '/pose' + '@tf2_msgs/msg/TFMessage' + - '[ignition.msgs.Pose_V' + '[ignition.msgs.Pose_V'] ], remappings=[ (['/model/', LaunchConfiguration('robot_name'), '/pose'], '/_internal/sim_ground_truth_pose'), - ('/model/standard_dock/pose', + (['/model/', LaunchConfiguration('robot_name'), '_standard_dock', '/pose'], '/_internal/sim_ground_truth_dock_pose') ]) @@ -126,14 +126,14 @@ def generate_launch_description(): ['/model/', LaunchConfiguration('robot_name'), '/pose' + '@tf2_msgs/msg/TFMessage' + '[ignition.msgs.Pose_V'], - '/model/standard_dock/pose' + + ['/model/', LaunchConfiguration('robot_name'), '_standard_dock', '/pose' + '@tf2_msgs/msg/TFMessage' + - '[ignition.msgs.Pose_V' + '[ignition.msgs.Pose_V'] ], remappings=[ (['/model/', LaunchConfiguration('robot_name'), '/pose'], ['/', namespace, '/_internal/sim_ground_truth_pose']), - ('/model/standard_dock/pose', + (['/model/', LaunchConfiguration('robot_name'), '_standard_dock', '/pose'], ['/', namespace, '/_internal/sim_ground_truth_dock_pose']) ]) diff --git a/irobot_create_ignition/irobot_create_ignition_toolbox/src/sensors/ir_opcode.cpp b/irobot_create_ignition/irobot_create_ignition_toolbox/src/sensors/ir_opcode.cpp index 44db2fbb..881b41ab 100644 --- a/irobot_create_ignition/irobot_create_ignition_toolbox/src/sensors/ir_opcode.cpp +++ b/irobot_create_ignition/irobot_create_ignition_toolbox/src/sensors/ir_opcode.cpp @@ -257,6 +257,7 @@ void IrOpcode::PublishSensors(const std::array detected_opcodes) // First for sensor 0 then sensor 1 for (size_t k = 0; k < detected_opcodes.size(); k++) { const int detected_opcode = detected_opcodes[k]; + if (detected_opcode > 0) { // Fill msg for this iteration auto msg_ = irobot_create_msgs::msg::IrOpcode(); From a602cf3959a0d33781b4d65891f77ea0f1b844ae Mon Sep 17 00:00:00 2001 From: techlabs Date: Wed, 21 Sep 2022 18:45:42 +0200 Subject: [PATCH 28/44] fix sim_ground_truth_dock_pose republishing --- .../src/pose_republisher/pose_republisher_node.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/irobot_create_ignition/irobot_create_ignition_toolbox/src/pose_republisher/pose_republisher_node.cpp b/irobot_create_ignition/irobot_create_ignition_toolbox/src/pose_republisher/pose_republisher_node.cpp index 29b3b4e7..a428fdf6 100644 --- a/irobot_create_ignition/irobot_create_ignition_toolbox/src/pose_republisher/pose_republisher_node.cpp +++ b/irobot_create_ignition/irobot_create_ignition_toolbox/src/pose_republisher/pose_republisher_node.cpp @@ -116,7 +116,7 @@ void PoseRepublisher::dock_subscriber_callback(const tf2_msgs::msg::TFMessage::S { for (uint16_t i = 0; i < msg->transforms.size(); i++) { // Child frame is model name - if (msg->transforms[i].child_frame_id == "standard_dock") { + if (msg->transforms[i].child_frame_id.find("standard_dock") != std::string::npos) { auto odom_msg = utils::tf_message_to_odom(msg, i); // Save dock pose tf2::convert(odom_msg->pose.pose, last_dock_pose_); From a5a58bd13ddda970365366258e41e8361309adc5 Mon Sep 17 00:00:00 2001 From: techlabs Date: Mon, 26 Sep 2022 18:49:34 +0200 Subject: [PATCH 29/44] fix is_docked and cleanup buttons topics --- .../urdf/dock/standard_dock.urdf.xacro | 3 --- .../launch/create3_ignition_nodes.launch.py | 1 - .../launch/create3_ros_ignition_bridge.launch.py | 7 +++++-- .../interface_buttons/interface_buttons_node.cpp | 3 ++- .../src/pose_republisher/pose_republisher_node.cpp | 13 +++++++------ 5 files changed, 14 insertions(+), 13 deletions(-) diff --git a/irobot_create_common/irobot_create_description/urdf/dock/standard_dock.urdf.xacro b/irobot_create_common/irobot_create_description/urdf/dock/standard_dock.urdf.xacro index 47d482fe..281b4d4e 100644 --- a/irobot_create_common/irobot_create_description/urdf/dock/standard_dock.urdf.xacro +++ b/irobot_create_common/irobot_create_description/urdf/dock/standard_dock.urdf.xacro @@ -107,9 +107,6 @@ true - true true true diff --git a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition_nodes.launch.py b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition_nodes.launch.py index 7f55fbde..fceba070 100644 --- a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition_nodes.launch.py +++ b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition_nodes.launch.py @@ -19,7 +19,6 @@ def generate_launch_description(): - #TODO(sophia) investigate that this is redirected correctly with the namespacing # Directories pkg_create3_ignition_bringup = get_package_share_directory('irobot_create_ignition_bringup') diff --git a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ros_ignition_bridge.launch.py b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ros_ignition_bridge.launch.py index 22a64418..5711f3da 100644 --- a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ros_ignition_bridge.launch.py +++ b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ros_ignition_bridge.launch.py @@ -1,6 +1,7 @@ # Copyright 2021 Clearpath Robotics, Inc. # @author Roni Kreinin (rkreinin@clearpathrobotics.com) +from argparse import Namespace from launch import LaunchDescription from launch.actions import DeclareLaunchArgument from launch.conditions import IfCondition, LaunchConfigurationEquals, LaunchConfigurationNotEquals @@ -296,11 +297,13 @@ def generate_launch_description(): 'use_sim_time': use_sim_time }], arguments=[ - ['/create3/buttons' + + ['/', LaunchConfiguration('robot_name'), '/buttons' + '@std_msgs/msg/Int32' + '[ignition.msgs.Int32'] ]) + + # TODO(sophia) check if this is working properly, usefull? buttons_msg_bridge_namespaced = Node(condition=LaunchConfigurationNotEquals('namespace', ''), package='ros_ign_bridge', executable='parameter_bridge', namespace=namespace, @@ -310,7 +313,7 @@ def generate_launch_description(): 'use_sim_time': use_sim_time }], arguments=[ - ['/', namespace, '/create3/buttons' + + ['/', LaunchConfiguration('robot_name'), '/buttons' + '@std_msgs/msg/Int32' + '[ignition.msgs.Int32'] ]) diff --git a/irobot_create_ignition/irobot_create_ignition_toolbox/src/interface_buttons/interface_buttons_node.cpp b/irobot_create_ignition/irobot_create_ignition_toolbox/src/interface_buttons/interface_buttons_node.cpp index 62442f82..c37f64a4 100644 --- a/irobot_create_ignition/irobot_create_ignition_toolbox/src/interface_buttons/interface_buttons_node.cpp +++ b/irobot_create_ignition/irobot_create_ignition_toolbox/src/interface_buttons/interface_buttons_node.cpp @@ -8,11 +8,12 @@ using irobot_create_ignition_toolbox::InterfaceButtons; + InterfaceButtons::InterfaceButtons() : rclcpp::Node("sensors_node") { interface_buttons_sub_ = this->create_subscription( - "create3/buttons", + "buttons", rclcpp::SensorDataQoS(), std::bind(&InterfaceButtons::create3_buttons_callback, this, std::placeholders::_1)); diff --git a/irobot_create_ignition/irobot_create_ignition_toolbox/src/pose_republisher/pose_republisher_node.cpp b/irobot_create_ignition/irobot_create_ignition_toolbox/src/pose_republisher/pose_republisher_node.cpp index a428fdf6..83c05f7e 100644 --- a/irobot_create_ignition/irobot_create_ignition_toolbox/src/pose_republisher/pose_republisher_node.cpp +++ b/irobot_create_ignition/irobot_create_ignition_toolbox/src/pose_republisher/pose_republisher_node.cpp @@ -116,12 +116,7 @@ void PoseRepublisher::dock_subscriber_callback(const tf2_msgs::msg::TFMessage::S { for (uint16_t i = 0; i < msg->transforms.size(); i++) { // Child frame is model name - if (msg->transforms[i].child_frame_id.find("standard_dock") != std::string::npos) { - auto odom_msg = utils::tf_message_to_odom(msg, i); - // Save dock pose - tf2::convert(odom_msg->pose.pose, last_dock_pose_); - dock_publisher_->publish(std::move(odom_msg)); - } else if (msg->transforms[i].child_frame_id.find("halo_link") != std::string::npos) { + if (msg->transforms[i].child_frame_id.find("halo_link") != std::string::npos) { // Send IR Opcode Emitter transform auto emitter_msg = utils::tf_message_to_odom(msg, i); tf2::Transform emitter_pose; @@ -134,6 +129,12 @@ void PoseRepublisher::dock_subscriber_callback(const tf2_msgs::msg::TFMessage::S utils::tf2_transform_to_pose(emitter_world_pose, emitter_msg->pose.pose); // Publish ir_opcode_emitter_publisher_->publish(std::move(emitter_msg)); + } else if (msg->transforms[i].child_frame_id.find("standard_dock/") == std::string::npos && + msg->transforms[i].child_frame_id.find("standard_dock") != std::string::npos) { + auto odom_msg = utils::tf_message_to_odom(msg, i); + // Save dock pose + tf2::convert(odom_msg->pose.pose, last_dock_pose_); + dock_publisher_->publish(std::move(odom_msg)); } } } From 86b15f90419b7b44a88c6cda55e2096593dc3dc8 Mon Sep 17 00:00:00 2001 From: techlabs Date: Mon, 10 Oct 2022 18:03:12 +0200 Subject: [PATCH 30/44] remove problematic light from empty world --- .../irobot_create_ignition_bringup/worlds/empty.sdf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/irobot_create_ignition/irobot_create_ignition_bringup/worlds/empty.sdf b/irobot_create_ignition/irobot_create_ignition_bringup/worlds/empty.sdf index a84bb2c1..fc0d1c07 100644 --- a/irobot_create_ignition/irobot_create_ignition_bringup/worlds/empty.sdf +++ b/irobot_create_ignition/irobot_create_ignition_bringup/worlds/empty.sdf @@ -11,6 +11,7 @@ + 0 0 -9.8 6e-06 2.3e-05 -4.2e-05 From c4c038d09a21162c90429d481594c2a361c22d99 Mon Sep 17 00:00:00 2001 From: techlabs Date: Mon, 10 Oct 2022 18:49:19 +0200 Subject: [PATCH 31/44] textinput for create3 buttons --- .../Create3Hmi/Create3Hmi.qml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/irobot_create_ignition/irobot_create_ignition_plugins/Create3Hmi/Create3Hmi.qml b/irobot_create_ignition/irobot_create_ignition_plugins/Create3Hmi/Create3Hmi.qml index cf03c0bd..5d6035c8 100644 --- a/irobot_create_ignition/irobot_create_ignition_plugins/Create3Hmi/Create3Hmi.qml +++ b/irobot_create_ignition/irobot_create_ignition_plugins/Create3Hmi/Create3Hmi.qml @@ -41,6 +41,15 @@ Rectangle anchors.leftMargin: 10 } + TextInput { + id: create3NamespaceInput + text: "/create3/buttons" + anchors.verticalCenter: create3ButtonPower.verticalCenter + anchors.right: create3ButtonPower.left + anchors.rightMargin: 15 + onEditingFinished: { Create3Hmi.OnNamespaceChange(text); } + } + ToolButton { id: create3Button1 anchors.verticalCenter: create3ButtonPower.verticalCenter From 1b3fba2c97562dd7591693f117fa10e315baf3d1 Mon Sep 17 00:00:00 2001 From: "badr.moutalib" Date: Tue, 11 Oct 2022 17:17:42 +0200 Subject: [PATCH 32/44] create3 ign gui topic selection --- .../Create3Hmi/Create3Hmi.cc | 44 +++++++++++++++++-- .../Create3Hmi/Create3Hmi.hh | 24 ++++++++++ .../Create3Hmi/Create3Hmi.qml | 42 +++++++++++------- 3 files changed, 89 insertions(+), 21 deletions(-) diff --git a/irobot_create_ignition/irobot_create_ignition_plugins/Create3Hmi/Create3Hmi.cc b/irobot_create_ignition/irobot_create_ignition_plugins/Create3Hmi/Create3Hmi.cc index ca518f79..ff4058c2 100644 --- a/irobot_create_ignition/irobot_create_ignition_plugins/Create3Hmi/Create3Hmi.cc +++ b/irobot_create_ignition/irobot_create_ignition_plugins/Create3Hmi/Create3Hmi.cc @@ -32,14 +32,17 @@ Create3Hmi::~Create3Hmi() void Create3Hmi::LoadConfig(const tinyxml2::XMLElement * _pluginElem) { - if (!_pluginElem) { - return; - } - if (this->title.empty()) { this->title = "Create3 HMI"; } + if (_pluginElem) + { + auto topicElem = _pluginElem->FirstChildElement("topic"); + if (nullptr != topicElem && nullptr != topicElem->GetText()) + this->SetTopic(topicElem->GetText()); + } + this->connect( this, SIGNAL(AddMsg(QString)), this, SLOT(OnAddMsg(QString)), Qt::QueuedConnection); @@ -57,6 +60,39 @@ void Create3Hmi::OnCreate3Button(const int button) } } +QString Create3Hmi::Topic() const +{ + return QString::fromStdString(this->create3_button_topic_); +} + +void Create3Hmi::SetTopic(const QString &_topic) +{ + this->create3_button_topic_ = _topic.toStdString(); + ignmsg << "A new topic has been entered: '" << + this->create3_button_topic_ << " ' " <create3_button_pub_ = gz::transport::Node::Publisher(); + this->create3_button_pub_ = + this->node_.Advertise< ignition::msgs::Int32 > + (this->create3_button_topic_); + if (!this->create3_button_pub_) + { + App()->findChild()->notifyWithDuration( + QString::fromStdString("Error when advertising topic: " + + this->create3_button_topic_), 4000); + ignerr << "Error when advertising topic: " << + this->create3_button_topic_ << std::endl; + } + else + { + App()->findChild()->notifyWithDuration( + QString::fromStdString("Advertising topic: '" + + this->create3_button_topic_ + "'"), 4000); + } + this->TopicChanged(); +} + } // namespace gui } // namespace ignition diff --git a/irobot_create_ignition/irobot_create_ignition_plugins/Create3Hmi/Create3Hmi.hh b/irobot_create_ignition/irobot_create_ignition_plugins/Create3Hmi/Create3Hmi.hh index 11ad1504..e19c3216 100644 --- a/irobot_create_ignition/irobot_create_ignition_plugins/Create3Hmi/Create3Hmi.hh +++ b/irobot_create_ignition/irobot_create_ignition_plugins/Create3Hmi/Create3Hmi.hh @@ -23,6 +23,14 @@ class Create3Hmi : public Plugin { Q_OBJECT + // \brief Topic + Q_PROPERTY( + QString topic + READ Topic + WRITE SetTopic + NOTIFY TopicChanged + ) + public: /// \brief Constructor Create3Hmi(); @@ -31,10 +39,26 @@ public: /// \brief Called by Ignition GUI when plugin is instantiated. /// \param[in] _pluginElem XML configuration for this plugin. void LoadConfig(const tinyxml2::XMLElement *_pluginElem) override; + // \brief Get the topic as a string, for example + /// '/echo' + /// \return Topic + Q_INVOKABLE QString Topic() const; + +public slots: + /// \brief Callback in Qt thread when the topic changes. + /// \param[in] _topic variable to indicate the topic to + /// publish the Button commands. + void SetTopic(const QString &_topic); + +signals: + /// \brief Notify that topic has changed + void TopicChanged(); protected slots: /// \brief Callback trigged when the button is pressed. void OnCreate3Button(const int button); + void OnNamespaceChange(const char* text); + private: ignition::transport::Node node_; ignition::transport::Node::Publisher create3_button_pub_; diff --git a/irobot_create_ignition/irobot_create_ignition_plugins/Create3Hmi/Create3Hmi.qml b/irobot_create_ignition/irobot_create_ignition_plugins/Create3Hmi/Create3Hmi.qml index 5d6035c8..3675f369 100644 --- a/irobot_create_ignition/irobot_create_ignition_plugins/Create3Hmi/Create3Hmi.qml +++ b/irobot_create_ignition/irobot_create_ignition_plugins/Create3Hmi/Create3Hmi.qml @@ -17,39 +17,47 @@ Rectangle anchors.fill: parent focus: true Layout.minimumWidth: 400 - Layout.minimumHeight: 175 + Layout.minimumHeight: 225 Rectangle { id: create3ButtonsRectangle - border.color: "black" border.width: 2 anchors.top: widgetRectangle.top anchors.left: widgetRectangle.left focus: true - height: 125 + height: 175 width: 400 - // Buttons + // Topic input Label { - id: create3ButtonsLabel - text: "Create3" - font.pixelSize: 22 + id: topicLabel + text: "Topic:" + Layout.fillWidth: true + Layout.margins: 10 anchors.top: create3ButtonsRectangle.top anchors.topMargin: 10 - anchors.left: parent.left + anchors.left: create3ButtonsRectangle.left anchors.leftMargin: 10 } - TextInput { - id: create3NamespaceInput - text: "/create3/buttons" - anchors.verticalCenter: create3ButtonPower.verticalCenter - anchors.right: create3ButtonPower.left - anchors.rightMargin: 15 - onEditingFinished: { Create3Hmi.OnNamespaceChange(text); } + TextField { + id: topicField + width: 175 + Layout.fillWidth: true + Layout.margins: 10 + text: Create3Hmi.topic + placeholderText: qsTr("Topic to publish...") + anchors.top: topicLabel.bottom + anchors.topMargin: 5 + anchors.left: create3ButtonsRectangle.left + anchors.leftMargin: 10 + onEditingFinished: { + Create3Hmi.SetTopic(text) + } } + // Button inputs ToolButton { id: create3Button1 anchors.verticalCenter: create3ButtonPower.verticalCenter @@ -71,8 +79,8 @@ Rectangle ToolButton { id: create3ButtonPower - anchors.top: create3ButtonsLabel.bottom - anchors.topMargin: 0 + anchors.bottom: create3ButtonsRectangle.bottom + anchors.bottomMargin: 15 anchors.horizontalCenter: create3ButtonsRectangle.horizontalCenter checkable: true checked: true From b04e18253647ea2f3e49007916c7c256fad2d6ac Mon Sep 17 00:00:00 2001 From: "badr.moutalib" Date: Tue, 11 Oct 2022 18:01:36 +0200 Subject: [PATCH 33/44] default HMi topic to /buttons and fix ignition bridge accordingly --- .../launch/create3_ros_ignition_bridge.launch.py | 6 ++---- .../irobot_create_ignition_plugins/Create3Hmi/Create3Hmi.hh | 2 +- .../src/interface_buttons/interface_buttons_node.cpp | 1 + 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ros_ignition_bridge.launch.py b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ros_ignition_bridge.launch.py index 5711f3da..0716960d 100644 --- a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ros_ignition_bridge.launch.py +++ b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ros_ignition_bridge.launch.py @@ -264,7 +264,6 @@ def generate_launch_description(): '/_internal/' + ir + '/scan') for ir in ir_intensity_sensors ]) - ir_intensity_bridge_namespaced = Node(condition=LaunchConfigurationNotEquals('namespace', ''), package='ros_ign_bridge', executable='parameter_bridge', namespace=namespace, @@ -297,13 +296,12 @@ def generate_launch_description(): 'use_sim_time': use_sim_time }], arguments=[ - ['/', LaunchConfiguration('robot_name'), '/buttons' + + ['/buttons' + '@std_msgs/msg/Int32' + '[ignition.msgs.Int32'] ]) - # TODO(sophia) check if this is working properly, usefull? buttons_msg_bridge_namespaced = Node(condition=LaunchConfigurationNotEquals('namespace', ''), package='ros_ign_bridge', executable='parameter_bridge', namespace=namespace, @@ -313,7 +311,7 @@ def generate_launch_description(): 'use_sim_time': use_sim_time }], arguments=[ - ['/', LaunchConfiguration('robot_name'), '/buttons' + + ['/', namespace, '/buttons' + '@std_msgs/msg/Int32' + '[ignition.msgs.Int32'] ]) diff --git a/irobot_create_ignition/irobot_create_ignition_plugins/Create3Hmi/Create3Hmi.hh b/irobot_create_ignition/irobot_create_ignition_plugins/Create3Hmi/Create3Hmi.hh index e19c3216..4d36bb93 100644 --- a/irobot_create_ignition/irobot_create_ignition_plugins/Create3Hmi/Create3Hmi.hh +++ b/irobot_create_ignition/irobot_create_ignition_plugins/Create3Hmi/Create3Hmi.hh @@ -62,7 +62,7 @@ protected slots: private: ignition::transport::Node node_; ignition::transport::Node::Publisher create3_button_pub_; - std::string create3_button_topic_ = "/create3/buttons"; + std::string create3_button_topic_ = "/buttons"; }; } // namespace gui diff --git a/irobot_create_ignition/irobot_create_ignition_toolbox/src/interface_buttons/interface_buttons_node.cpp b/irobot_create_ignition/irobot_create_ignition_toolbox/src/interface_buttons/interface_buttons_node.cpp index c37f64a4..433020d5 100644 --- a/irobot_create_ignition/irobot_create_ignition_toolbox/src/interface_buttons/interface_buttons_node.cpp +++ b/irobot_create_ignition/irobot_create_ignition_toolbox/src/interface_buttons/interface_buttons_node.cpp @@ -12,6 +12,7 @@ using irobot_create_ignition_toolbox::InterfaceButtons; InterfaceButtons::InterfaceButtons() : rclcpp::Node("sensors_node") { + // TODO(sophia) get robot_name instead of unsing namespace by default interface_buttons_sub_ = this->create_subscription( "buttons", rclcpp::SensorDataQoS(), From 113593dbcba51fdb9e445d216516a503b37b3834 Mon Sep 17 00:00:00 2001 From: "badr.moutalib" Date: Wed, 12 Oct 2022 19:26:19 +0200 Subject: [PATCH 34/44] cleanup unsused imports --- .../launch/create3_ignition.launch.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition.launch.py b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition.launch.py index 9785844a..a2c55be0 100644 --- a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition.launch.py +++ b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition.launch.py @@ -10,10 +10,8 @@ from launch import LaunchDescription from launch.actions import DeclareLaunchArgument from launch.actions import IncludeLaunchDescription, SetEnvironmentVariable -from launch.conditions import IfCondition from launch.launch_description_sources import PythonLaunchDescriptionSource from launch.substitutions import LaunchConfiguration, PathJoinSubstitution -from launch_ros.actions import Node ARGUMENTS = [ DeclareLaunchArgument('bridge', default_value='true', From e0d225c034abc62ec18bfbc4c92575c5a6ac53b0 Mon Sep 17 00:00:00 2001 From: techlabs Date: Fri, 14 Oct 2022 18:46:13 +0200 Subject: [PATCH 35/44] change namespace to robot name in button topic naming --- .../create3_ros_ignition_bridge.launch.py | 82 +++++++++++-------- .../Create3Hmi/Create3Hmi.cc | 19 +++-- .../Create3Hmi/Create3Hmi.hh | 30 +++---- .../Create3Hmi/Create3Hmi.qml | 16 ++-- 4 files changed, 79 insertions(+), 68 deletions(-) diff --git a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ros_ignition_bridge.launch.py b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ros_ignition_bridge.launch.py index 0716960d..de4f2bd8 100644 --- a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ros_ignition_bridge.launch.py +++ b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ros_ignition_bridge.launch.py @@ -25,6 +25,8 @@ def generate_launch_description(): namespace = LaunchConfiguration('namespace') use_sim_time = LaunchConfiguration('use_sim_time') + robot_name = LaunchConfiguration('robot_name') + world = LaunchConfiguration('world') cliff_sensors = [ 'cliff_front_left', @@ -64,11 +66,11 @@ def generate_launch_description(): arguments=[['/cmd_vel' + '@geometry_msgs/msg/Twist' + '[ignition.msgs.Twist'], - ['/model/', LaunchConfiguration('robot_name'), '/cmd_vel' + + ['/model/', robot_name, '/cmd_vel' + '@geometry_msgs/msg/Twist' + ']ignition.msgs.Twist']], remappings=[(['/model/', - LaunchConfiguration('robot_name'), '/cmd_vel'], + robot_name, '/cmd_vel'], ['/diffdrive_controller/cmd_vel_unstamped'])] ) @@ -84,11 +86,11 @@ def generate_launch_description(): '@geometry_msgs/msg/Twist' + '[ignition.msgs.Twist'], ['/model/', - LaunchConfiguration('robot_name'), '/cmd_vel' + + robot_name, '/cmd_vel' + '@geometry_msgs/msg/Twist' + ']ignition.msgs.Twist']], remappings=[(['/model/', - LaunchConfiguration('robot_name'), '/cmd_vel'], + robot_name, '/cmd_vel'], ['/', namespace,'/diffdrive_controller/cmd_vel_unstamped'])]) # Pose bridge @@ -101,17 +103,17 @@ def generate_launch_description(): 'use_sim_time': use_sim_time }], arguments=[ - ['/model/', LaunchConfiguration('robot_name'), '/pose' + + ['/model/', robot_name, '/pose' + '@tf2_msgs/msg/TFMessage' + '[ignition.msgs.Pose_V'], - ['/model/', LaunchConfiguration('robot_name'), '_standard_dock', '/pose' + + ['/model/', robot_name, '_standard_dock', '/pose' + '@tf2_msgs/msg/TFMessage' + '[ignition.msgs.Pose_V'] ], remappings=[ - (['/model/', LaunchConfiguration('robot_name'), '/pose'], + (['/model/', robot_name, '/pose'], '/_internal/sim_ground_truth_pose'), - (['/model/', LaunchConfiguration('robot_name'), '_standard_dock', '/pose'], + (['/model/', robot_name, '_standard_dock', '/pose'], '/_internal/sim_ground_truth_dock_pose') ]) @@ -124,17 +126,17 @@ def generate_launch_description(): 'use_sim_time': use_sim_time }], arguments=[ - ['/model/', LaunchConfiguration('robot_name'), '/pose' + + ['/model/', robot_name, '/pose' + '@tf2_msgs/msg/TFMessage' + '[ignition.msgs.Pose_V'], - ['/model/', LaunchConfiguration('robot_name'), '_standard_dock', '/pose' + + ['/model/', robot_name, '_standard_dock', '/pose' + '@tf2_msgs/msg/TFMessage' + '[ignition.msgs.Pose_V'] ], remappings=[ - (['/model/', LaunchConfiguration('robot_name'), '/pose'], + (['/model/', robot_name, '/pose'], ['/', namespace, '/_internal/sim_ground_truth_pose']), - (['/model/', LaunchConfiguration('robot_name'), '_standard_dock', '/pose'], + (['/model/', robot_name, '_standard_dock', '/pose'], ['/', namespace, '/_internal/sim_ground_truth_dock_pose']) ]) @@ -147,12 +149,12 @@ def generate_launch_description(): 'use_sim_time': use_sim_time }], arguments=[ - ['/model/', LaunchConfiguration('robot_name'), '/tf' + + ['/model/', robot_name, '/tf' + '@tf2_msgs/msg/TFMessage' + '[ignition.msgs.Pose_V'] ], remappings=[ - (['/model/', LaunchConfiguration('robot_name'), '/tf'], '/tf') + (['/model/', robot_name, '/tf'], '/tf') ]) # Bumper contact sensor bridge @@ -164,13 +166,13 @@ def generate_launch_description(): 'use_sim_time': use_sim_time }], arguments=[ - ['/model/', LaunchConfiguration('robot_name'), + ['/model/', robot_name, '/bumper_contact' + '@ros_ign_interfaces/msg/Contacts' + '[ignition.msgs.Contacts'] ], remappings=[ - (['/model/', LaunchConfiguration('robot_name'), + (['/model/', robot_name, '/bumper_contact'], '/bumper_contact') ]) @@ -183,13 +185,13 @@ def generate_launch_description(): 'use_sim_time': use_sim_time }], arguments=[ - ['/model/', LaunchConfiguration('robot_name'), + ['/model/', robot_name, '/bumper_contact' + '@ros_ign_interfaces/msg/Contacts' + '[ignition.msgs.Contacts'] ], remappings=[ - (['/model/', LaunchConfiguration('robot_name'), + (['/model/', robot_name, '/bumper_contact'], ['/', namespace, '/bumper_contact']) ]) @@ -204,15 +206,15 @@ def generate_launch_description(): 'use_sim_time': use_sim_time }], arguments=[ - ['/world/', LaunchConfiguration('world'), - '/model/', LaunchConfiguration('robot_name'), + ['/world/', world, + '/model/', robot_name, '/link/base_link/sensor/' + cliff + '/scan' + '@sensor_msgs/msg/LaserScan[ignition.msgs.LaserScan'] for cliff in cliff_sensors ], remappings=[ - (['/world/', LaunchConfiguration('world'), - '/model/', LaunchConfiguration('robot_name'), + (['/world/', world, + '/model/', robot_name, '/link/base_link/sensor/' + cliff + '/scan'], '/_internal/' + cliff + '/scan') for cliff in cliff_sensors @@ -227,15 +229,15 @@ def generate_launch_description(): 'use_sim_time': use_sim_time }], arguments=[ - ['/world/', LaunchConfiguration('world'), - '/model/', LaunchConfiguration('robot_name'), + ['/world/', world, + '/model/', robot_name, '/link/base_link/sensor/' + cliff + '/scan' + '@sensor_msgs/msg/LaserScan[ignition.msgs.LaserScan'] for cliff in cliff_sensors ], remappings=[ - (['/world/', LaunchConfiguration('world'), - '/model/', LaunchConfiguration('robot_name'), + (['/world/', world, + '/model/', robot_name, '/link/base_link/sensor/' + cliff + '/scan'], ['/', namespace,'/_internal/', cliff, '/scan']) for cliff in cliff_sensors @@ -251,15 +253,15 @@ def generate_launch_description(): 'use_sim_time': use_sim_time }], arguments=[ - ['/world/', LaunchConfiguration('world'), - '/model/', LaunchConfiguration('robot_name'), + ['/world/', world, + '/model/', robot_name, '/link/' + ir + '/sensor/' + ir + '/scan' + '@sensor_msgs/msg/LaserScan[ignition.msgs.LaserScan'] for ir in ir_intensity_sensors ], remappings=[ - (['/world/', LaunchConfiguration('world'), - '/model/', LaunchConfiguration('robot_name'), + (['/world/', world, + '/model/', robot_name, '/link/' + ir + '/sensor/' + ir + '/scan'], '/_internal/' + ir + '/scan') for ir in ir_intensity_sensors ]) @@ -273,15 +275,15 @@ def generate_launch_description(): 'use_sim_time': use_sim_time }], arguments=[ - ['/world/', LaunchConfiguration('world'), - '/model/', LaunchConfiguration('robot_name'), + ['/world/', world, + '/model/', robot_name, '/link/' + ir + '/sensor/' + ir + '/scan' + '@sensor_msgs/msg/LaserScan[ignition.msgs.LaserScan'] for ir in ir_intensity_sensors ], remappings=[ - (['/world/', LaunchConfiguration('world'), - '/model/', LaunchConfiguration('robot_name'), + (['/world/', world, + '/model/', robot_name, '/link/' + ir + '/sensor/' + ir + '/scan'], ['/', namespace, '/_internal/', ir, '/scan']) for ir in ir_intensity_sensors ]) @@ -296,9 +298,13 @@ def generate_launch_description(): 'use_sim_time': use_sim_time }], arguments=[ - ['/buttons' + + ['/model/', robot_name, '/buttons' + '@std_msgs/msg/Int32' + '[ignition.msgs.Int32'] + ], + remappings=[ + (['/model/', robot_name, '/buttons'], + '/buttons') ]) @@ -311,9 +317,13 @@ def generate_launch_description(): 'use_sim_time': use_sim_time }], arguments=[ - ['/', namespace, '/buttons' + + ['/model/', robot_name, '/buttons' + '@std_msgs/msg/Int32' + '[ignition.msgs.Int32'] + ], + remappings=[ + (['/model/', robot_name, '/buttons'], + ['/', namespace, '/buttons']) ]) # Create launch description and add actions diff --git a/irobot_create_ignition/irobot_create_ignition_plugins/Create3Hmi/Create3Hmi.cc b/irobot_create_ignition/irobot_create_ignition_plugins/Create3Hmi/Create3Hmi.cc index ff4058c2..157e3831 100644 --- a/irobot_create_ignition/irobot_create_ignition_plugins/Create3Hmi/Create3Hmi.cc +++ b/irobot_create_ignition/irobot_create_ignition_plugins/Create3Hmi/Create3Hmi.cc @@ -38,9 +38,9 @@ void Create3Hmi::LoadConfig(const tinyxml2::XMLElement * _pluginElem) if (_pluginElem) { - auto topicElem = _pluginElem->FirstChildElement("topic"); - if (nullptr != topicElem && nullptr != topicElem->GetText()) - this->SetTopic(topicElem->GetText()); + auto nameElem = _pluginElem->FirstChildElement("name"); + if (nullptr != nameElem && nullptr != nameElem->GetText()) + this->SetName(nameElem->GetText()); } this->connect( @@ -60,15 +60,16 @@ void Create3Hmi::OnCreate3Button(const int button) } } -QString Create3Hmi::Topic() const +QString Create3Hmi::Name() const { - return QString::fromStdString(this->create3_button_topic_); + return QString::fromStdString(this->robot_name_); } -void Create3Hmi::SetTopic(const QString &_topic) +void Create3Hmi::SetName(const QString &_name) { - this->create3_button_topic_ = _topic.toStdString(); - ignmsg << "A new topic has been entered: '" << + this->robot_name_ = _name.toStdString(); + this->create3_button_topic_ = "/model/" + this->robot_name_ + "/buttons"; + ignmsg << "A new robot name has been entered, publishing on topic: '" << this->create3_button_topic_ << " ' " <" + this->create3_button_topic_ + "'"), 4000); } - this->TopicChanged(); + this->NameChanged(); } } // namespace gui diff --git a/irobot_create_ignition/irobot_create_ignition_plugins/Create3Hmi/Create3Hmi.hh b/irobot_create_ignition/irobot_create_ignition_plugins/Create3Hmi/Create3Hmi.hh index 4d36bb93..935d2295 100644 --- a/irobot_create_ignition/irobot_create_ignition_plugins/Create3Hmi/Create3Hmi.hh +++ b/irobot_create_ignition/irobot_create_ignition_plugins/Create3Hmi/Create3Hmi.hh @@ -23,12 +23,12 @@ class Create3Hmi : public Plugin { Q_OBJECT - // \brief Topic + // \brief Name Q_PROPERTY( - QString topic - READ Topic - WRITE SetTopic - NOTIFY TopicChanged + QString name + READ Name + WRITE SetName + NOTIFY NameChanged ) public: @@ -39,30 +39,30 @@ public: /// \brief Called by Ignition GUI when plugin is instantiated. /// \param[in] _pluginElem XML configuration for this plugin. void LoadConfig(const tinyxml2::XMLElement *_pluginElem) override; - // \brief Get the topic as a string, for example + // \brief Get the robot name as a string, for example /// '/echo' - /// \return Topic - Q_INVOKABLE QString Topic() const; + /// \return Name + Q_INVOKABLE QString Name() const; public slots: - /// \brief Callback in Qt thread when the topic changes. - /// \param[in] _topic variable to indicate the topic to + /// \brief Callback in Qt thread when the robot name changes. + /// \param[in] _name variable to indicate the robot name to /// publish the Button commands. - void SetTopic(const QString &_topic); + void SetName(const QString &_name); signals: - /// \brief Notify that topic has changed - void TopicChanged(); + /// \brief Notify that robot name has changed + void NameChanged(); protected slots: /// \brief Callback trigged when the button is pressed. void OnCreate3Button(const int button); - void OnNamespaceChange(const char* text); private: ignition::transport::Node node_; ignition::transport::Node::Publisher create3_button_pub_; - std::string create3_button_topic_ = "/buttons"; + std::string robot_name_ = "create3"; + std::string create3_button_topic_ = "/model/create3/buttons"; }; } // namespace gui diff --git a/irobot_create_ignition/irobot_create_ignition_plugins/Create3Hmi/Create3Hmi.qml b/irobot_create_ignition/irobot_create_ignition_plugins/Create3Hmi/Create3Hmi.qml index 3675f369..58838f54 100644 --- a/irobot_create_ignition/irobot_create_ignition_plugins/Create3Hmi/Create3Hmi.qml +++ b/irobot_create_ignition/irobot_create_ignition_plugins/Create3Hmi/Create3Hmi.qml @@ -29,10 +29,10 @@ Rectangle height: 175 width: 400 - // Topic input + // Robot Name input Label { - id: topicLabel - text: "Topic:" + id: nameLabel + text: "Robot Name:" Layout.fillWidth: true Layout.margins: 10 anchors.top: create3ButtonsRectangle.top @@ -42,18 +42,18 @@ Rectangle } TextField { - id: topicField + id: nameField width: 175 Layout.fillWidth: true Layout.margins: 10 - text: Create3Hmi.topic - placeholderText: qsTr("Topic to publish...") - anchors.top: topicLabel.bottom + text: Create3Hmi.name + placeholderText: qsTr("input robot name") + anchors.top: nameLabel.bottom anchors.topMargin: 5 anchors.left: create3ButtonsRectangle.left anchors.leftMargin: 10 onEditingFinished: { - Create3Hmi.SetTopic(text) + Create3Hmi.SetName(text) } } From f0ffe71ad30d2d1371ace445148facc149f031e8 Mon Sep 17 00:00:00 2001 From: techlabs Date: Mon, 17 Oct 2022 19:14:40 +0200 Subject: [PATCH 36/44] small cleanup & added yaw argument to spawn_robot --- .../launch/dock_description.launch.py | 3 +-- .../launch/robot_description.launch.py | 2 +- .../launch/create3_ignition.launch.py | 4 ++-- .../launch/create3_spawn.launch.py | 21 ++++++++++++++++--- 4 files changed, 22 insertions(+), 8 deletions(-) diff --git a/irobot_create_common/irobot_create_common_bringup/launch/dock_description.launch.py b/irobot_create_common/irobot_create_common_bringup/launch/dock_description.launch.py index f6d7779e..46c1e8c4 100644 --- a/irobot_create_common/irobot_create_common_bringup/launch/dock_description.launch.py +++ b/irobot_create_common/irobot_create_common_bringup/launch/dock_description.launch.py @@ -36,8 +36,7 @@ def generate_launch_description(): [pkg_create3_description, 'urdf', 'dock', 'standard_dock.urdf.xacro']) # Launch Configurations - x, y, z = LaunchConfiguration('x'), LaunchConfiguration( - 'y'), LaunchConfiguration('z') + x, y, z = LaunchConfiguration('x'), LaunchConfiguration('y'), LaunchConfiguration('z') yaw = LaunchConfiguration('yaw') visualize_rays = LaunchConfiguration('visualize_rays') namespace = LaunchConfiguration('namespace') diff --git a/irobot_create_common/irobot_create_common_bringup/launch/robot_description.launch.py b/irobot_create_common/irobot_create_common_bringup/launch/robot_description.launch.py index 3fb3de5f..64f24971 100644 --- a/irobot_create_common/irobot_create_common_bringup/launch/robot_description.launch.py +++ b/irobot_create_common/irobot_create_common_bringup/launch/robot_description.launch.py @@ -28,7 +28,7 @@ def generate_launch_description(): gazebo_simulator = LaunchConfiguration('gazebo') visualize_rays = LaunchConfiguration('visualize_rays') namespace = LaunchConfiguration('namespace') - frame_prefix = [namespace,'/'] + frame_prefix = [namespace, '/'] robot_state_publisher = Node( package='robot_state_publisher', diff --git a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition.launch.py b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition.launch.py index a2c55be0..f610c461 100644 --- a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition.launch.py +++ b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition.launch.py @@ -67,8 +67,7 @@ def generate_launch_description(): [pkg_ros_ign_gazebo, 'launch', 'ign_gazebo.launch.py']) # Launch configurations - x, y, z = LaunchConfiguration('x'), LaunchConfiguration( - 'y'), LaunchConfiguration('z') + x, y, z = LaunchConfiguration('x'), LaunchConfiguration('y'), LaunchConfiguration('z') yaw = LaunchConfiguration('yaw') robot_name = LaunchConfiguration('robot_name') world = LaunchConfiguration('world') @@ -94,6 +93,7 @@ def generate_launch_description(): launch_arguments={'x': x, 'y': y, 'z': z, + 'yaw': yaw, 'robot_name': robot_name, 'robot_description': '/robot_description', 'world' : world, diff --git a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_spawn.launch.py b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_spawn.launch.py index 6f1c99cc..63f62c45 100644 --- a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_spawn.launch.py +++ b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_spawn.launch.py @@ -1,7 +1,6 @@ from ament_index_python.packages import get_package_share_directory -from irobot_create_common_bringup.offset_parser import OffsetParser -from launch import LaunchDescription +from launch import LaunchContext, LaunchDescription, SomeSubstitutionsType, Substitution from launch.actions import DeclareLaunchArgument, IncludeLaunchDescription from launch.conditions import IfCondition from launch.launch_description_sources import PythonLaunchDescriptionSource @@ -9,6 +8,22 @@ from launch_ros.actions import Node +class OffsetParser(Substitution): + def __init__( + self, + number: SomeSubstitutionsType, + offset: float, + ) -> None: + self.__number = number + self.__offset = offset + + def perform( + self, + context: LaunchContext = None, + ) -> str: + number = float(self.__number.perform(context)) + return f'{number + self.__offset}' + ARGUMENTS = [ DeclareLaunchArgument('gazebo', default_value='ignition', choices=['classic', 'ignition'], @@ -110,7 +125,7 @@ def generate_launch_description(): '-x', x_dock, '-y', y, '-z', z, - '-Y', '3.141592', + '-Y', yaw_dock, '-topic', namespaced_dock_description], ) From c1983295e9b9456b03b464b6ec57d5f143fbef7c Mon Sep 17 00:00:00 2001 From: "badr.moutalib" Date: Fri, 21 Oct 2022 17:30:34 +0200 Subject: [PATCH 37/44] fix bumper contact bridge namespacing --- .../create3_ros_ignition_bridge.launch.py | 308 +++++++++--------- .../launch/create3_spawn.launch.py | 1 - 2 files changed, 155 insertions(+), 154 deletions(-) diff --git a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ros_ignition_bridge.launch.py b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ros_ignition_bridge.launch.py index de4f2bd8..26bbe8bb 100644 --- a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ros_ignition_bridge.launch.py +++ b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ros_ignition_bridge.launch.py @@ -57,41 +57,41 @@ def generate_launch_description(): # cmd_vel bridge cmd_vel_bridge = Node(condition=LaunchConfigurationEquals('namespace', ''), - package='ros_ign_bridge', - executable='parameter_bridge', - name='cmd_vel_bridge', - output='screen', - parameters=[{ - 'use_sim_time': use_sim_time}], - arguments=[['/cmd_vel' + - '@geometry_msgs/msg/Twist' + - '[ignition.msgs.Twist'], - ['/model/', robot_name, '/cmd_vel' + - '@geometry_msgs/msg/Twist' + - ']ignition.msgs.Twist']], - remappings=[(['/model/', - robot_name, '/cmd_vel'], - ['/diffdrive_controller/cmd_vel_unstamped'])] - ) + package='ros_ign_bridge', + executable='parameter_bridge', + name='cmd_vel_bridge', + output='screen', + parameters=[{ + 'use_sim_time': use_sim_time}], + arguments=[['/cmd_vel' + + '@geometry_msgs/msg/Twist' + + '[ignition.msgs.Twist'], + ['/model/', robot_name, '/cmd_vel' + + '@geometry_msgs/msg/Twist' + + ']ignition.msgs.Twist']], + remappings=[(['/model/', + robot_name, '/cmd_vel'], + ['/diffdrive_controller/cmd_vel_unstamped']) + ]) cmd_vel_bridge_namespaced = Node(condition=LaunchConfigurationNotEquals('namespace', ''), - package='ros_ign_bridge', - executable='parameter_bridge', - name='cmd_vel_bridge', - namespace=namespace, - output='screen', - parameters=[{ - 'use_sim_time': use_sim_time}], - arguments=[['/', namespace, '/cmd_vel' + - '@geometry_msgs/msg/Twist' + - '[ignition.msgs.Twist'], - ['/model/', - robot_name, '/cmd_vel' + - '@geometry_msgs/msg/Twist' + - ']ignition.msgs.Twist']], - remappings=[(['/model/', - robot_name, '/cmd_vel'], - ['/', namespace,'/diffdrive_controller/cmd_vel_unstamped'])]) + package='ros_ign_bridge', + executable='parameter_bridge', + name='cmd_vel_bridge', + namespace=namespace, + output='screen', + parameters=[{ + 'use_sim_time': use_sim_time}], + arguments=[['/', namespace, '/cmd_vel' + + '@geometry_msgs/msg/Twist' + + '[ignition.msgs.Twist'], + ['/model/', + robot_name, '/cmd_vel' + + '@geometry_msgs/msg/Twist' + + ']ignition.msgs.Twist']], + remappings=[(['/model/', + robot_name, '/cmd_vel'], + ['/', namespace,'/diffdrive_controller/cmd_vel_unstamped'])]) # Pose bridge pose_bridge = Node(condition=LaunchConfigurationEquals('namespace', ''), @@ -142,59 +142,61 @@ def generate_launch_description(): # odom to base_link transform bridge odom_base_tf_bridge = Node(package='ros_ign_bridge', executable='parameter_bridge', - namespace=namespace, - name='odom_base_tf_bridge', - output='screen', - parameters=[{ - 'use_sim_time': use_sim_time - }], - arguments=[ - ['/model/', robot_name, '/tf' + - '@tf2_msgs/msg/TFMessage' + - '[ignition.msgs.Pose_V'] - ], - remappings=[ - (['/model/', robot_name, '/tf'], '/tf') - ]) + namespace=namespace, + name='odom_base_tf_bridge', + output='screen', + parameters=[{ + 'use_sim_time': use_sim_time + }], + arguments=[ + ['/model/', robot_name, '/tf' + + '@tf2_msgs/msg/TFMessage' + + '[ignition.msgs.Pose_V'] + ], + remappings=[ + (['/model/', robot_name, '/tf'], '/tf') + ]) # Bumper contact sensor bridge bumper_contact_bridge = Node(condition=LaunchConfigurationEquals('namespace', ''), - package='ros_ign_bridge', executable='parameter_bridge', - name='bumper_contact_bridge', - output='screen', - parameters=[{ - 'use_sim_time': use_sim_time - }], - arguments=[ - ['/model/', robot_name, - '/bumper_contact' + - '@ros_ign_interfaces/msg/Contacts' + - '[ignition.msgs.Contacts'] - ], - remappings=[ - (['/model/', robot_name, - '/bumper_contact'], - '/bumper_contact') - ]) + package='ros_ign_bridge', executable='parameter_bridge', + namespace=namespace, + name='bumper_contact_bridge', + output='screen', + parameters=[{ + 'use_sim_time': use_sim_time + }], + arguments=[ + ['/model/', robot_name, + '/bumper_contact' + + '@ros_ign_interfaces/msg/Contacts' + + '[ignition.msgs.Contacts'] + ], + remappings=[ + (['/model/', robot_name, + '/bumper_contact'], + '/bumper_contact') + ]) bumper_contact_bridge_namespaced = Node(condition=LaunchConfigurationNotEquals('namespace', ''), - package='ros_ign_bridge', executable='parameter_bridge', - name='bumper_contact_bridge', - output='screen', - parameters=[{ - 'use_sim_time': use_sim_time - }], - arguments=[ - ['/model/', robot_name, - '/bumper_contact' + - '@ros_ign_interfaces/msg/Contacts' + - '[ignition.msgs.Contacts'] - ], - remappings=[ - (['/model/', robot_name, - '/bumper_contact'], - ['/', namespace, '/bumper_contact']) - ]) + namespace=namespace, + package='ros_ign_bridge', executable='parameter_bridge', + name='bumper_contact_bridge', + output='screen', + parameters=[{ + 'use_sim_time': use_sim_time + }], + arguments=[ + ['/model/', robot_name, + '/bumper_contact' + + '@ros_ign_interfaces/msg/Contacts' + + '[ignition.msgs.Contacts'] + ], + remappings=[ + (['/model/', robot_name, + '/bumper_contact'], + ['/', namespace, '/bumper_contact']) + ]) # Cliff bridge cliff_bridge = Node(condition=LaunchConfigurationEquals('namespace', ''), @@ -245,86 +247,86 @@ def generate_launch_description(): # IR intensity bridge ir_intensity_bridge = Node(condition=LaunchConfigurationEquals('namespace', ''), - package='ros_ign_bridge', executable='parameter_bridge', - namespace=namespace, - name='ir_intensity_bridge', - output='screen', - parameters=[{ - 'use_sim_time': use_sim_time - }], - arguments=[ - ['/world/', world, - '/model/', robot_name, - '/link/' + ir + '/sensor/' + ir + '/scan' + - '@sensor_msgs/msg/LaserScan[ignition.msgs.LaserScan'] - for ir in ir_intensity_sensors - ], - remappings=[ - (['/world/', world, - '/model/', robot_name, - '/link/' + ir + '/sensor/' + ir + '/scan'], - '/_internal/' + ir + '/scan') for ir in ir_intensity_sensors - ]) + package='ros_ign_bridge', executable='parameter_bridge', + namespace=namespace, + name='ir_intensity_bridge', + output='screen', + parameters=[{ + 'use_sim_time': use_sim_time + }], + arguments=[ + ['/world/', world, + '/model/', robot_name, + '/link/' + ir + '/sensor/' + ir + '/scan' + + '@sensor_msgs/msg/LaserScan[ignition.msgs.LaserScan'] + for ir in ir_intensity_sensors + ], + remappings=[ + (['/world/', world, + '/model/', robot_name, + '/link/' + ir + '/sensor/' + ir + '/scan'], + '/_internal/' + ir + '/scan') for ir in ir_intensity_sensors + ]) ir_intensity_bridge_namespaced = Node(condition=LaunchConfigurationNotEquals('namespace', ''), - package='ros_ign_bridge', executable='parameter_bridge', - namespace=namespace, - name='ir_intensity_bridge', - output='screen', - parameters=[{ - 'use_sim_time': use_sim_time - }], - arguments=[ - ['/world/', world, - '/model/', robot_name, - '/link/' + ir + '/sensor/' + ir + '/scan' + - '@sensor_msgs/msg/LaserScan[ignition.msgs.LaserScan'] - for ir in ir_intensity_sensors - ], - remappings=[ - (['/world/', world, - '/model/', robot_name, - '/link/' + ir + '/sensor/' + ir + '/scan'], - ['/', namespace, '/_internal/', ir, '/scan']) for ir in ir_intensity_sensors - ]) + package='ros_ign_bridge', executable='parameter_bridge', + namespace=namespace, + name='ir_intensity_bridge', + output='screen', + parameters=[{ + 'use_sim_time': use_sim_time + }], + arguments=[ + ['/world/', world, + '/model/', robot_name, + '/link/' + ir + '/sensor/' + ir + '/scan' + + '@sensor_msgs/msg/LaserScan[ignition.msgs.LaserScan'] + for ir in ir_intensity_sensors + ], + remappings=[ + (['/world/', world, + '/model/', robot_name, + '/link/' + ir + '/sensor/' + ir + '/scan'], + ['/', namespace, '/_internal/', ir, '/scan']) for ir in ir_intensity_sensors + ]) # Buttons message bridge buttons_msg_bridge = Node(condition=LaunchConfigurationEquals('namespace', ''), - package='ros_ign_bridge', executable='parameter_bridge', - namespace=namespace, - name='buttons_msg_bridge', - output='screen', - parameters=[{ - 'use_sim_time': use_sim_time - }], - arguments=[ - ['/model/', robot_name, '/buttons' + - '@std_msgs/msg/Int32' + - '[ignition.msgs.Int32'] - ], - remappings=[ - (['/model/', robot_name, '/buttons'], - '/buttons') - ]) + package='ros_ign_bridge', executable='parameter_bridge', + namespace=namespace, + name='buttons_msg_bridge', + output='screen', + parameters=[{ + 'use_sim_time': use_sim_time + }], + arguments=[ + ['/model/', robot_name, '/buttons' + + '@std_msgs/msg/Int32' + + '[ignition.msgs.Int32'] + ], + remappings=[ + (['/model/', robot_name, '/buttons'], + '/buttons') + ]) buttons_msg_bridge_namespaced = Node(condition=LaunchConfigurationNotEquals('namespace', ''), - package='ros_ign_bridge', executable='parameter_bridge', - namespace=namespace, - name='buttons_msg_bridge', - output='screen', - parameters=[{ - 'use_sim_time': use_sim_time - }], - arguments=[ - ['/model/', robot_name, '/buttons' + - '@std_msgs/msg/Int32' + - '[ignition.msgs.Int32'] - ], - remappings=[ - (['/model/', robot_name, '/buttons'], - ['/', namespace, '/buttons']) - ]) + package='ros_ign_bridge', executable='parameter_bridge', + namespace=namespace, + name='buttons_msg_bridge', + output='screen', + parameters=[{ + 'use_sim_time': use_sim_time + }], + arguments=[ + ['/model/', robot_name, '/buttons' + + '@std_msgs/msg/Int32' + + '[ignition.msgs.Int32'] + ], + remappings=[ + (['/model/', robot_name, '/buttons'], + ['/', namespace, '/buttons']) + ]) # Create launch description and add actions ld = LaunchDescription(ARGUMENTS) diff --git a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_spawn.launch.py b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_spawn.launch.py index 63f62c45..6ab5ce3d 100644 --- a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_spawn.launch.py +++ b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_spawn.launch.py @@ -80,7 +80,6 @@ def generate_launch_description(): namespaced_robot_description = [namespace, '/robot_description'] namespaced_dock_description = [namespace, '/standard_dock_description'] - # Robot description robot_description_launch = IncludeLaunchDescription( PythonLaunchDescriptionSource([robot_description_launch]), From 916ada694baeb8d82949fa97259547a02fbb1c47 Mon Sep 17 00:00:00 2001 From: techlabs Date: Thu, 3 Nov 2022 19:17:55 +0100 Subject: [PATCH 38/44] rebase on galactic and lint test passing --- .../launch/create3_nodes.launch.py | 5 +- .../launch/dock_description.launch.py | 15 +- .../launch/robot_description.launch.py | 2 +- .../launch/include/control.py | 61 +-- .../launch/create3_ignition.launch.py | 7 +- .../launch/create3_ignition_nodes.launch.py | 6 +- .../create3_ros_ignition_bridge.launch.py | 446 +++++++++--------- .../launch/create3_spawn.launch.py | 9 +- .../Create3Hmi/Create3Hmi.cc | 4 +- .../Create3Hmi/Create3Hmi.hh | 2 +- .../pose_republisher_node.cpp | 8 +- .../src/sensors/ir_opcode.cpp | 2 +- 12 files changed, 288 insertions(+), 279 deletions(-) diff --git a/irobot_create_common/irobot_create_common_bringup/launch/create3_nodes.launch.py b/irobot_create_common/irobot_create_common_bringup/launch/create3_nodes.launch.py index 5bfedb81..87636d4e 100644 --- a/irobot_create_common/irobot_create_common_bringup/launch/create3_nodes.launch.py +++ b/irobot_create_common/irobot_create_common_bringup/launch/create3_nodes.launch.py @@ -5,10 +5,9 @@ # Launch Create(R) 3 nodes from ament_index_python.packages import get_package_share_directory -from irobot_create_common_bringup.replace_string import ReplaceString from launch import LaunchDescription from launch.actions import DeclareLaunchArgument, IncludeLaunchDescription -from launch.conditions import LaunchConfigurationEquals, LaunchConfigurationNotEquals +from launch.conditions import LaunchConfigurationEquals from launch.launch_description_sources import PythonLaunchDescriptionSource from launch.substitutions import LaunchConfiguration, PathJoinSubstitution from launch_ros.actions import Node @@ -21,6 +20,7 @@ description='Robot namespace') ] + def generate_launch_description(): # Directories @@ -156,4 +156,3 @@ def generate_launch_description(): ld.add_action(ui_mgr_node) return ld - \ No newline at end of file diff --git a/irobot_create_common/irobot_create_common_bringup/launch/dock_description.launch.py b/irobot_create_common/irobot_create_common_bringup/launch/dock_description.launch.py index 46c1e8c4..cc9a4b4e 100644 --- a/irobot_create_common/irobot_create_common_bringup/launch/dock_description.launch.py +++ b/irobot_create_common/irobot_create_common_bringup/launch/dock_description.launch.py @@ -20,11 +20,12 @@ ] for pose_element in ['x', 'y', 'z', 'yaw']: ARGUMENTS.append(DeclareLaunchArgument(f'{pose_element}', default_value='0.0', - description=f'{pose_element} component of the dock pose.')) + description=f'{pose_element} ' + + 'component of the dock pose.')) ARGUMENTS.append(DeclareLaunchArgument('visualize_rays', default_value='true', - choices=['true', 'false'], - description='Enable/disable ray visualization')) + choices=['true', 'false'], + description='Enable/disable ray visualization')) def generate_launch_description(): @@ -41,7 +42,7 @@ def generate_launch_description(): visualize_rays = LaunchConfiguration('visualize_rays') namespace = LaunchConfiguration('namespace') gazebo_simulator = LaunchConfiguration('gazebo') - frame_prefix = [namespace,'/'] + frame_prefix = [namespace, '/'] state_publisher = Node( condition=LaunchConfigurationEquals('namespace', ''), @@ -70,7 +71,7 @@ def generate_launch_description(): executable='robot_state_publisher', name='dock_state_publisher', output='screen', - namespace = namespace, + namespace=namespace, parameters=[ {'use_sim_time': True}, {'robot_description': @@ -104,12 +105,12 @@ def generate_launch_description(): package='tf2_ros', executable='static_transform_publisher', name='tf_odom_std_dock_link_publisher', - namespace = namespace, + namespace=namespace, arguments=[x, y, z, # According to documentation (http://wiki.ros.org/tf2_ros): # the order is yaw, pitch, roll yaw, '0', '0', - [namespace,'/odom'], [namespace,'/std_dock_link']], + [namespace, '/odom'], [namespace, '/std_dock_link']], output='screen', ) diff --git a/irobot_create_common/irobot_create_common_bringup/launch/robot_description.launch.py b/irobot_create_common/irobot_create_common_bringup/launch/robot_description.launch.py index 64f24971..ee658385 100644 --- a/irobot_create_common/irobot_create_common_bringup/launch/robot_description.launch.py +++ b/irobot_create_common/irobot_create_common_bringup/launch/robot_description.launch.py @@ -29,7 +29,7 @@ def generate_launch_description(): visualize_rays = LaunchConfiguration('visualize_rays') namespace = LaunchConfiguration('namespace') frame_prefix = [namespace, '/'] - + robot_state_publisher = Node( package='robot_state_publisher', executable='robot_state_publisher', diff --git a/irobot_create_common/irobot_create_control/launch/include/control.py b/irobot_create_common/irobot_create_control/launch/include/control.py index 12f6a9c6..2fae73f0 100644 --- a/irobot_create_common/irobot_create_control/launch/include/control.py +++ b/irobot_create_common/irobot_create_control/launch/include/control.py @@ -16,6 +16,7 @@ description='Robot namespace') ] + def generate_launch_description(): namespace = LaunchConfiguration('namespace') namespaced_node_name = [namespace, '/controller_manager'] @@ -25,55 +26,55 @@ def generate_launch_description(): [pkg_create3_control, 'config', 'control.yaml']) diffdrive_controller_node = Node( - condition = LaunchConfigurationEquals('namespace', ''), - package = 'controller_manager', - executable = 'spawner', - parameters = [control_params_file], - arguments = ['diffdrive_controller', '-c', namespaced_node_name], - output = 'screen', + condition=LaunchConfigurationEquals('namespace', ''), + package='controller_manager', + executable='spawner', + parameters=[control_params_file], + arguments=['diffdrive_controller', '-c', namespaced_node_name], + output='screen', ) joint_state_broadcaster_spawner = Node( - condition = LaunchConfigurationEquals('namespace', ''), - package = 'controller_manager', - executable = 'spawner', - arguments = ['joint_state_broadcaster', '-c', namespaced_node_name], - output = 'screen', + condition=LaunchConfigurationEquals('namespace', ''), + package='controller_manager', + executable='spawner', + arguments=['joint_state_broadcaster', '-c', namespaced_node_name], + output='screen', ) # Ensure diffdrive_controller_node starts after joint_state_broadcaster_spawner diffdrive_controller_callback = RegisterEventHandler( - event_handler = OnProcessExit( - target_action = joint_state_broadcaster_spawner, - on_exit = [diffdrive_controller_node], + event_handler=OnProcessExit( + target_action=joint_state_broadcaster_spawner, + on_exit=[diffdrive_controller_node], ) ) # Launch with namespace diffdrive_controller_node_namespaced = Node( - condition = LaunchConfigurationNotEquals('namespace', ''), - package = 'controller_manager', - executable = 'spawner', - namespace = namespace, - parameters = [control_params_file], - arguments = ['diffdrive_controller', '-c', namespaced_node_name, '-n', namespace], - output = 'screen', + condition=LaunchConfigurationNotEquals('namespace', ''), + package='controller_manager', + executable='spawner', + namespace=namespace, + parameters=[control_params_file], + arguments=['diffdrive_controller', '-c', namespaced_node_name, '-n', namespace], + output='screen', ) joint_state_broadcaster_spawner_namespaced = Node( - condition = LaunchConfigurationNotEquals('namespace', ''), - package = 'controller_manager', - executable = 'spawner', - namespace = namespace, - arguments = ['joint_state_broadcaster', '-c', namespaced_node_name, '-n', namespace], - output = 'screen', + condition=LaunchConfigurationNotEquals('namespace', ''), + package='controller_manager', + executable='spawner', + namespace=namespace, + arguments=['joint_state_broadcaster', '-c', namespaced_node_name, '-n', namespace], + output='screen', ) # Ensure diffdrive_controller_node starts after joint_state_broadcaster_spawner diffdrive_controller_callback_namespaced = RegisterEventHandler( - event_handler = OnProcessExit( - target_action = joint_state_broadcaster_spawner_namespaced, - on_exit = [diffdrive_controller_node_namespaced], + event_handler=OnProcessExit( + target_action=joint_state_broadcaster_spawner_namespaced, + on_exit=[diffdrive_controller_node_namespaced], ) ) diff --git a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition.launch.py b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition.launch.py index f610c461..35c85ce3 100644 --- a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition.launch.py +++ b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition.launch.py @@ -30,12 +30,13 @@ choices=['true', 'false'], description='Spawn the standard dock model.'), DeclareLaunchArgument('namespace', default_value='', - description='robot namespace'), + description='robot namespace'), ] for pose_element in ['x', 'y', 'z', 'yaw']: ARGUMENTS.append(DeclareLaunchArgument(pose_element, default_value='0.0', description=f'{pose_element} component of the robot pose.')) + def generate_launch_description(): # Directories @@ -96,8 +97,8 @@ def generate_launch_description(): 'yaw': yaw, 'robot_name': robot_name, 'robot_description': '/robot_description', - 'world' : world, - 'use_rviz' : LaunchConfiguration('use_rviz'), + 'world': world, + 'use_rviz': LaunchConfiguration('use_rviz'), 'namespace': namespace, 'spawn_dock': LaunchConfiguration('spawn_dock'), }.items() diff --git a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition_nodes.launch.py b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition_nodes.launch.py index fceba070..6114cfc9 100644 --- a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition_nodes.launch.py +++ b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition_nodes.launch.py @@ -2,10 +2,8 @@ # @author Roni Kreinin (rkreinin@clearpathrobotics.com) from ament_index_python.packages import get_package_share_directory -from irobot_create_common_bringup.replace_string import ReplaceString from launch import LaunchDescription from launch.actions import DeclareLaunchArgument -#from launch.conditions import LaunchConfigurationEquals, LaunchConfigurationNotEquals from launch.substitutions import LaunchConfiguration, PathJoinSubstitution from launch_ros.actions import Node @@ -19,7 +17,7 @@ def generate_launch_description(): - + # Directories pkg_create3_ignition_bringup = get_package_share_directory('irobot_create_ignition_bringup') @@ -34,7 +32,7 @@ def generate_launch_description(): pose_republisher_node = Node( package='irobot_create_ignition_toolbox', name='pose_republisher_node', - namespace = namespace, + namespace=namespace, executable='pose_republisher_node', parameters=[pose_republisher_params_yaml_file, {'robot_name': LaunchConfiguration('robot_name')}, diff --git a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ros_ignition_bridge.launch.py b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ros_ignition_bridge.launch.py index 26bbe8bb..451d4412 100644 --- a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ros_ignition_bridge.launch.py +++ b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ros_ignition_bridge.launch.py @@ -1,7 +1,6 @@ # Copyright 2021 Clearpath Robotics, Inc. # @author Roni Kreinin (rkreinin@clearpathrobotics.com) -from argparse import Namespace from launch import LaunchDescription from launch.actions import DeclareLaunchArgument from launch.conditions import IfCondition, LaunchConfigurationEquals, LaunchConfigurationNotEquals @@ -46,7 +45,9 @@ def generate_launch_description(): ] # clock bridge - clock_bridge = Node(package='ros_ign_bridge', executable='parameter_bridge', + clock_bridge = Node( + package='ros_ign_bridge', + executable='parameter_bridge', namespace=namespace, name='clock_bridge', output='screen', @@ -56,45 +57,48 @@ def generate_launch_description(): condition=IfCondition(use_sim_time)) # cmd_vel bridge - cmd_vel_bridge = Node(condition=LaunchConfigurationEquals('namespace', ''), - package='ros_ign_bridge', - executable='parameter_bridge', - name='cmd_vel_bridge', - output='screen', - parameters=[{ - 'use_sim_time': use_sim_time}], - arguments=[['/cmd_vel' + - '@geometry_msgs/msg/Twist' + - '[ignition.msgs.Twist'], - ['/model/', robot_name, '/cmd_vel' + - '@geometry_msgs/msg/Twist' + - ']ignition.msgs.Twist']], - remappings=[(['/model/', - robot_name, '/cmd_vel'], - ['/diffdrive_controller/cmd_vel_unstamped']) - ]) + cmd_vel_bridge = Node( + condition=LaunchConfigurationEquals('namespace', ''), + package='ros_ign_bridge', + executable='parameter_bridge', + name='cmd_vel_bridge', + output='screen', + parameters=[{ + 'use_sim_time': use_sim_time}], + arguments=[['/cmd_vel' + + '@geometry_msgs/msg/Twist' + + '[ignition.msgs.Twist'], + ['/model/', robot_name, '/cmd_vel' + + '@geometry_msgs/msg/Twist' + + ']ignition.msgs.Twist']], + remappings=[(['/model/', + robot_name, '/cmd_vel'], + ['/diffdrive_controller/cmd_vel_unstamped'])]) - cmd_vel_bridge_namespaced = Node(condition=LaunchConfigurationNotEquals('namespace', ''), - package='ros_ign_bridge', - executable='parameter_bridge', - name='cmd_vel_bridge', - namespace=namespace, - output='screen', - parameters=[{ - 'use_sim_time': use_sim_time}], - arguments=[['/', namespace, '/cmd_vel' + - '@geometry_msgs/msg/Twist' + - '[ignition.msgs.Twist'], - ['/model/', - robot_name, '/cmd_vel' + - '@geometry_msgs/msg/Twist' + - ']ignition.msgs.Twist']], - remappings=[(['/model/', - robot_name, '/cmd_vel'], - ['/', namespace,'/diffdrive_controller/cmd_vel_unstamped'])]) + cmd_vel_bridge_namespaced = Node( + condition=LaunchConfigurationNotEquals('namespace', ''), + package='ros_ign_bridge', + executable='parameter_bridge', + name='cmd_vel_bridge', + namespace=namespace, + output='screen', + parameters=[{ + 'use_sim_time': use_sim_time}], + arguments=[['/', namespace, '/cmd_vel' + + '@geometry_msgs/msg/Twist' + + '[ignition.msgs.Twist'], + ['/model/', + robot_name, '/cmd_vel' + + '@geometry_msgs/msg/Twist' + + ']ignition.msgs.Twist']], + remappings=[(['/model/', + robot_name, '/cmd_vel'], + ['/', namespace, + '/diffdrive_controller/cmd_vel_unstamped'])]) # Pose bridge - pose_bridge = Node(condition=LaunchConfigurationEquals('namespace', ''), + pose_bridge = Node( + condition=LaunchConfigurationEquals('namespace', ''), package='ros_ign_bridge', executable='parameter_bridge', namespace=namespace, name='pose_bridge', @@ -107,99 +111,102 @@ def generate_launch_description(): '@tf2_msgs/msg/TFMessage' + '[ignition.msgs.Pose_V'], ['/model/', robot_name, '_standard_dock', '/pose' + - '@tf2_msgs/msg/TFMessage' + - '[ignition.msgs.Pose_V'] + '@tf2_msgs/msg/TFMessage' + + '[ignition.msgs.Pose_V'] ], remappings=[ (['/model/', robot_name, '/pose'], '/_internal/sim_ground_truth_pose'), (['/model/', robot_name, '_standard_dock', '/pose'], - '/_internal/sim_ground_truth_dock_pose') - ]) + '/_internal/sim_ground_truth_dock_pose')]) - pose_bridge_namespaced = Node(condition=LaunchConfigurationNotEquals('namespace', ''), - package='ros_ign_bridge', executable='parameter_bridge', - namespace=namespace, - name='pose_bridge', - output='screen', - parameters=[{ - 'use_sim_time': use_sim_time - }], - arguments=[ - ['/model/', robot_name, '/pose' + - '@tf2_msgs/msg/TFMessage' + - '[ignition.msgs.Pose_V'], - ['/model/', robot_name, '_standard_dock', '/pose' + - '@tf2_msgs/msg/TFMessage' + - '[ignition.msgs.Pose_V'] - ], - remappings=[ - (['/model/', robot_name, '/pose'], - ['/', namespace, '/_internal/sim_ground_truth_pose']), - (['/model/', robot_name, '_standard_dock', '/pose'], - ['/', namespace, '/_internal/sim_ground_truth_dock_pose']) - ]) + pose_bridge_namespaced = Node( + condition=LaunchConfigurationNotEquals('namespace', ''), + package='ros_ign_bridge', executable='parameter_bridge', + namespace=namespace, + name='pose_bridge', + output='screen', + parameters=[{ + 'use_sim_time': use_sim_time + }], + arguments=[ + ['/model/', robot_name, '/pose' + + '@tf2_msgs/msg/TFMessage' + + '[ignition.msgs.Pose_V'], + ['/model/', robot_name, '_standard_dock', '/pose' + + '@tf2_msgs/msg/TFMessage' + + '[ignition.msgs.Pose_V'] + ], + remappings=[ + (['/model/', robot_name, '/pose'], + ['/', namespace, '/_internal/sim_ground_truth_pose']), + (['/model/', robot_name, '_standard_dock', '/pose'], + ['/', namespace, '/_internal/sim_ground_truth_dock_pose'])]) # odom to base_link transform bridge - odom_base_tf_bridge = Node(package='ros_ign_bridge', executable='parameter_bridge', - namespace=namespace, - name='odom_base_tf_bridge', - output='screen', - parameters=[{ - 'use_sim_time': use_sim_time - }], - arguments=[ - ['/model/', robot_name, '/tf' + - '@tf2_msgs/msg/TFMessage' + - '[ignition.msgs.Pose_V'] - ], - remappings=[ - (['/model/', robot_name, '/tf'], '/tf') - ]) + odom_base_tf_bridge = Node( + package='ros_ign_bridge', + executable='parameter_bridge', + namespace=namespace, + name='odom_base_tf_bridge', + output='screen', + parameters=[{ + 'use_sim_time': use_sim_time + }], + arguments=[ + ['/model/', robot_name, '/tf' + + '@tf2_msgs/msg/TFMessage' + + '[ignition.msgs.Pose_V'] + ], + remappings=[ + (['/model/', robot_name, '/tf'], '/tf')]) # Bumper contact sensor bridge - bumper_contact_bridge = Node(condition=LaunchConfigurationEquals('namespace', ''), - package='ros_ign_bridge', executable='parameter_bridge', - namespace=namespace, - name='bumper_contact_bridge', - output='screen', - parameters=[{ - 'use_sim_time': use_sim_time - }], - arguments=[ - ['/model/', robot_name, - '/bumper_contact' + - '@ros_ign_interfaces/msg/Contacts' + - '[ignition.msgs.Contacts'] - ], - remappings=[ - (['/model/', robot_name, - '/bumper_contact'], - '/bumper_contact') - ]) + bumper_contact_bridge = Node( + condition=LaunchConfigurationEquals('namespace', ''), + package='ros_ign_bridge', executable='parameter_bridge', + namespace=namespace, + name='bumper_contact_bridge', + output='screen', + parameters=[{ + 'use_sim_time': use_sim_time + }], + arguments=[ + ['/model/', robot_name, + '/bumper_contact' + + '@ros_ign_interfaces/msg/Contacts' + + '[ignition.msgs.Contacts'] + ], + remappings=[ + (['/model/', robot_name, + '/bumper_contact'], + '/bumper_contact')]) - bumper_contact_bridge_namespaced = Node(condition=LaunchConfigurationNotEquals('namespace', ''), - namespace=namespace, - package='ros_ign_bridge', executable='parameter_bridge', - name='bumper_contact_bridge', - output='screen', - parameters=[{ - 'use_sim_time': use_sim_time - }], - arguments=[ - ['/model/', robot_name, - '/bumper_contact' + - '@ros_ign_interfaces/msg/Contacts' + - '[ignition.msgs.Contacts'] - ], - remappings=[ - (['/model/', robot_name, - '/bumper_contact'], - ['/', namespace, '/bumper_contact']) - ]) + bumper_contact_bridge_namespaced = Node( + condition=LaunchConfigurationNotEquals('namespace', + ''), + namespace=namespace, + package='ros_ign_bridge', + executable='parameter_bridge', + name='bumper_contact_bridge', + output='screen', + parameters=[{ + 'use_sim_time': use_sim_time + }], + arguments=[ + ['/model/', robot_name, + '/bumper_contact' + + '@ros_ign_interfaces/msg/Contacts' + + '[ignition.msgs.Contacts'] + ], + remappings=[ + (['/model/', robot_name, + '/bumper_contact'], + ['/', namespace, '/bumper_contact'])]) # Cliff bridge - cliff_bridge = Node(condition=LaunchConfigurationEquals('namespace', ''), + cliff_bridge = Node( + condition=LaunchConfigurationEquals('namespace', ''), package='ros_ign_bridge', executable='parameter_bridge', namespace=namespace, name='cliff_bridge', @@ -218,115 +225,114 @@ def generate_launch_description(): (['/world/', world, '/model/', robot_name, '/link/base_link/sensor/' + cliff + '/scan'], - '/_internal/' + cliff + '/scan') - for cliff in cliff_sensors - ]) + '/_internal/' + cliff + '/scan') + for cliff in cliff_sensors]) - cliff_bridge_namespaced = Node(condition=LaunchConfigurationNotEquals('namespace', ''), - package='ros_ign_bridge', executable='parameter_bridge', - namespace=namespace, - name='cliff_bridge', - output='screen', - parameters=[{ - 'use_sim_time': use_sim_time - }], - arguments=[ - ['/world/', world, - '/model/', robot_name, - '/link/base_link/sensor/' + cliff + '/scan' + - '@sensor_msgs/msg/LaserScan[ignition.msgs.LaserScan'] - for cliff in cliff_sensors - ], - remappings=[ - (['/world/', world, - '/model/', robot_name, - '/link/base_link/sensor/' + cliff + '/scan'], - ['/', namespace,'/_internal/', cliff, '/scan']) - for cliff in cliff_sensors - ]) + cliff_bridge_namespaced = Node( + condition=LaunchConfigurationNotEquals('namespace', ''), + package='ros_ign_bridge', executable='parameter_bridge', + namespace=namespace, + name='cliff_bridge', + output='screen', + parameters=[{ + 'use_sim_time': use_sim_time + }], + arguments=[ + ['/world/', world, + '/model/', robot_name, + '/link/base_link/sensor/' + cliff + '/scan' + + '@sensor_msgs/msg/LaserScan[ignition.msgs.LaserScan'] + for cliff in cliff_sensors + ], + remappings=[ + (['/world/', world, + '/model/', robot_name, + '/link/base_link/sensor/' + cliff + '/scan'], + ['/', namespace, '/_internal/', cliff, '/scan']) + for cliff in cliff_sensors]) # IR intensity bridge - ir_intensity_bridge = Node(condition=LaunchConfigurationEquals('namespace', ''), - package='ros_ign_bridge', executable='parameter_bridge', - namespace=namespace, - name='ir_intensity_bridge', - output='screen', - parameters=[{ - 'use_sim_time': use_sim_time - }], - arguments=[ - ['/world/', world, - '/model/', robot_name, - '/link/' + ir + '/sensor/' + ir + '/scan' + - '@sensor_msgs/msg/LaserScan[ignition.msgs.LaserScan'] - for ir in ir_intensity_sensors - ], - remappings=[ - (['/world/', world, - '/model/', robot_name, - '/link/' + ir + '/sensor/' + ir + '/scan'], - '/_internal/' + ir + '/scan') for ir in ir_intensity_sensors - ]) + ir_intensity_bridge = Node( + condition=LaunchConfigurationEquals('namespace', ''), + package='ros_ign_bridge', executable='parameter_bridge', + namespace=namespace, + name='ir_intensity_bridge', + output='screen', + parameters=[{ + 'use_sim_time': use_sim_time + }], + arguments=[ + ['/world/', world, + '/model/', robot_name, + '/link/' + ir + '/sensor/' + ir + '/scan' + + '@sensor_msgs/msg/LaserScan[ignition.msgs.LaserScan'] + for ir in ir_intensity_sensors + ], + remappings=[ + (['/world/', world, + '/model/', robot_name, + '/link/' + ir + '/sensor/' + ir + '/scan'], + '/_internal/' + ir + '/scan') for ir in ir_intensity_sensors]) - ir_intensity_bridge_namespaced = Node(condition=LaunchConfigurationNotEquals('namespace', ''), - package='ros_ign_bridge', executable='parameter_bridge', - namespace=namespace, - name='ir_intensity_bridge', - output='screen', - parameters=[{ - 'use_sim_time': use_sim_time - }], - arguments=[ - ['/world/', world, - '/model/', robot_name, - '/link/' + ir + '/sensor/' + ir + '/scan' + - '@sensor_msgs/msg/LaserScan[ignition.msgs.LaserScan'] - for ir in ir_intensity_sensors - ], - remappings=[ - (['/world/', world, - '/model/', robot_name, - '/link/' + ir + '/sensor/' + ir + '/scan'], - ['/', namespace, '/_internal/', ir, '/scan']) for ir in ir_intensity_sensors - ]) + ir_intensity_bridge_namespaced = Node( + condition=LaunchConfigurationNotEquals('namespace', ''), + package='ros_ign_bridge', executable='parameter_bridge', + namespace=namespace, + name='ir_intensity_bridge', + output='screen', + parameters=[{ + 'use_sim_time': use_sim_time + }], + arguments=[ + ['/world/', world, + '/model/', robot_name, + '/link/' + ir + '/sensor/' + ir + '/scan' + + '@sensor_msgs/msg/LaserScan[ignition.msgs.LaserScan' + ] + for ir in ir_intensity_sensors + ], + remappings=[ + (['/world/', world, + '/model/', robot_name, + '/link/' + ir + '/sensor/' + ir + '/scan'], + ['/', namespace, '/_internal/', ir, '/scan']) + for ir in ir_intensity_sensors]) # Buttons message bridge - buttons_msg_bridge = Node(condition=LaunchConfigurationEquals('namespace', ''), - package='ros_ign_bridge', executable='parameter_bridge', - namespace=namespace, - name='buttons_msg_bridge', - output='screen', - parameters=[{ - 'use_sim_time': use_sim_time - }], - arguments=[ - ['/model/', robot_name, '/buttons' + - '@std_msgs/msg/Int32' + - '[ignition.msgs.Int32'] - ], - remappings=[ - (['/model/', robot_name, '/buttons'], - '/buttons') - ]) + buttons_msg_bridge = Node( + condition=LaunchConfigurationEquals('namespace', ''), + package='ros_ign_bridge', executable='parameter_bridge', + namespace=namespace, + name='buttons_msg_bridge', + output='screen', + parameters=[{ + 'use_sim_time': use_sim_time + }], + arguments=[ + ['/model/', robot_name, '/buttons' + + '@std_msgs/msg/Int32' + + '[ignition.msgs.Int32'] + ], + remappings=[ + (['/model/', robot_name, '/buttons'], + '/buttons')]) - - buttons_msg_bridge_namespaced = Node(condition=LaunchConfigurationNotEquals('namespace', ''), - package='ros_ign_bridge', executable='parameter_bridge', - namespace=namespace, - name='buttons_msg_bridge', - output='screen', - parameters=[{ - 'use_sim_time': use_sim_time - }], - arguments=[ - ['/model/', robot_name, '/buttons' + - '@std_msgs/msg/Int32' + - '[ignition.msgs.Int32'] - ], - remappings=[ - (['/model/', robot_name, '/buttons'], - ['/', namespace, '/buttons']) - ]) + buttons_msg_bridge_namespaced = Node( + condition=LaunchConfigurationNotEquals('namespace', ''), + package='ros_ign_bridge', executable='parameter_bridge', + namespace=namespace, + name='buttons_msg_bridge', + output='screen', + parameters=[{ + 'use_sim_time': use_sim_time}], + arguments=[ + ['/model/', robot_name, '/buttons' + + '@std_msgs/msg/Int32' + + '[ignition.msgs.Int32'] + ], + remappings=[ + (['/model/', robot_name, '/buttons'], + ['/', namespace, '/buttons'])]) # Create launch description and add actions ld = LaunchDescription(ARGUMENTS) diff --git a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_spawn.launch.py b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_spawn.launch.py index 6ab5ce3d..36594427 100644 --- a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_spawn.launch.py +++ b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_spawn.launch.py @@ -8,6 +8,7 @@ from launch_ros.actions import Node + class OffsetParser(Substitution): def __init__( self, @@ -24,6 +25,7 @@ def perform( number = float(self.__number.perform(context)) return f'{number + self.__offset}' + ARGUMENTS = [ DeclareLaunchArgument('gazebo', default_value='ignition', choices=['classic', 'ignition'], @@ -50,6 +52,7 @@ def perform( ARGUMENTS.append(DeclareLaunchArgument(pose_element, default_value='0.0', description=f'{pose_element} component of the robot pose.')) + def generate_launch_description(): pkg_create3_common_bringup = get_package_share_directory( @@ -85,7 +88,7 @@ def generate_launch_description(): PythonLaunchDescriptionSource([robot_description_launch]), launch_arguments={'gazebo': 'ignition', 'namespace': namespace}.items()) - # Dock description + # Dock description x_dock = OffsetParser(x, 0.157) yaw_dock = OffsetParser(yaw, 3.1416) dock_description = IncludeLaunchDescription( @@ -101,7 +104,7 @@ def generate_launch_description(): PythonLaunchDescriptionSource([rviz2_launch]), condition=IfCondition(LaunchConfiguration('use_rviz')), launch_arguments={'namespace': namespace}.items() - ) + ) # Spawn robot spawn_robot = Node( @@ -120,7 +123,7 @@ def generate_launch_description(): spawn_dock = Node(package='ros_ign_gazebo', executable='create', output='screen', - arguments=['-name', (robot_name,'_standard_dock'), + arguments=['-name', (robot_name, '_standard_dock'), '-x', x_dock, '-y', y, '-z', z, diff --git a/irobot_create_ignition/irobot_create_ignition_plugins/Create3Hmi/Create3Hmi.cc b/irobot_create_ignition/irobot_create_ignition_plugins/Create3Hmi/Create3Hmi.cc index 157e3831..34e1b526 100644 --- a/irobot_create_ignition/irobot_create_ignition_plugins/Create3Hmi/Create3Hmi.cc +++ b/irobot_create_ignition/irobot_create_ignition_plugins/Create3Hmi/Create3Hmi.cc @@ -84,9 +84,7 @@ void Create3Hmi::SetName(const QString &_name) this->create3_button_topic_), 4000); ignerr << "Error when advertising topic: " << this->create3_button_topic_ << std::endl; - } - else - { + }else { App()->findChild()->notifyWithDuration( QString::fromStdString("Advertising topic: '" + this->create3_button_topic_ + "'"), 4000); diff --git a/irobot_create_ignition/irobot_create_ignition_plugins/Create3Hmi/Create3Hmi.hh b/irobot_create_ignition/irobot_create_ignition_plugins/Create3Hmi/Create3Hmi.hh index 935d2295..d4481e8a 100644 --- a/irobot_create_ignition/irobot_create_ignition_plugins/Create3Hmi/Create3Hmi.hh +++ b/irobot_create_ignition/irobot_create_ignition_plugins/Create3Hmi/Create3Hmi.hh @@ -44,7 +44,7 @@ public: /// \return Name Q_INVOKABLE QString Name() const; -public slots: +public slots: /// \brief Callback in Qt thread when the robot name changes. /// \param[in] _name variable to indicate the robot name to /// publish the Button commands. diff --git a/irobot_create_ignition/irobot_create_ignition_toolbox/src/pose_republisher/pose_republisher_node.cpp b/irobot_create_ignition/irobot_create_ignition_toolbox/src/pose_republisher/pose_republisher_node.cpp index 83c05f7e..7f73a3ed 100644 --- a/irobot_create_ignition/irobot_create_ignition_toolbox/src/pose_republisher/pose_republisher_node.cpp +++ b/irobot_create_ignition/irobot_create_ignition_toolbox/src/pose_republisher/pose_republisher_node.cpp @@ -116,7 +116,10 @@ void PoseRepublisher::dock_subscriber_callback(const tf2_msgs::msg::TFMessage::S { for (uint16_t i = 0; i < msg->transforms.size(); i++) { // Child frame is model name - if (msg->transforms[i].child_frame_id.find("halo_link") != std::string::npos) { + std::string frame_id = msg->transforms[i].child_frame_id; + bool has_trailling_slash = frame_id.find("standard_dock/") == std::string::npos; + bool is_standard_dock = frame_id.find("standard_dock") != std::string::npos; + if (frame_id.find("halo_link") != std::string::npos) { // Send IR Opcode Emitter transform auto emitter_msg = utils::tf_message_to_odom(msg, i); tf2::Transform emitter_pose; @@ -129,8 +132,7 @@ void PoseRepublisher::dock_subscriber_callback(const tf2_msgs::msg::TFMessage::S utils::tf2_transform_to_pose(emitter_world_pose, emitter_msg->pose.pose); // Publish ir_opcode_emitter_publisher_->publish(std::move(emitter_msg)); - } else if (msg->transforms[i].child_frame_id.find("standard_dock/") == std::string::npos && - msg->transforms[i].child_frame_id.find("standard_dock") != std::string::npos) { + } else if (has_trailling_slash && is_standard_dock) { auto odom_msg = utils::tf_message_to_odom(msg, i); // Save dock pose tf2::convert(odom_msg->pose.pose, last_dock_pose_); diff --git a/irobot_create_ignition/irobot_create_ignition_toolbox/src/sensors/ir_opcode.cpp b/irobot_create_ignition/irobot_create_ignition_toolbox/src/sensors/ir_opcode.cpp index 881b41ab..38a1a88d 100644 --- a/irobot_create_ignition/irobot_create_ignition_toolbox/src/sensors/ir_opcode.cpp +++ b/irobot_create_ignition/irobot_create_ignition_toolbox/src/sensors/ir_opcode.cpp @@ -257,7 +257,7 @@ void IrOpcode::PublishSensors(const std::array detected_opcodes) // First for sensor 0 then sensor 1 for (size_t k = 0; k < detected_opcodes.size(); k++) { const int detected_opcode = detected_opcodes[k]; - + if (detected_opcode > 0) { // Fill msg for this iteration auto msg_ = irobot_create_msgs::msg::IrOpcode(); From 229a2d56d717748b314c5d8b5b87535fc5f271bb Mon Sep 17 00:00:00 2001 From: techlabs Date: Fri, 4 Nov 2022 15:11:26 +0100 Subject: [PATCH 39/44] reverting some rebase changes on non-code files --- README.md | 1 + .../irobot_create_common_bringup/CHANGELOG.rst | 8 -------- .../irobot_create_control/CHANGELOG.rst | 10 ---------- .../irobot_create_description/CHANGELOG.rst | 9 --------- .../irobot_create_nodes/CHANGELOG.rst | 8 -------- .../irobot_create_toolbox/CHANGELOG.rst | 8 -------- .../irobot_create_gazebo_bringup/CHANGELOG.rst | 13 ------------- .../irobot_create_gazebo_plugins/CHANGELOG.rst | 8 -------- .../irobot_create_gazebo_sim/CHANGELOG.rst | 10 ---------- .../irobot_create_ignition_bringup/CHANGELOG.rst | 11 ----------- .../irobot_create_ignition_plugins/CHANGELOG.rst | 11 ----------- .../irobot_create_ignition_sim/CHANGELOG.rst | 9 --------- .../irobot_create_ignition_toolbox/CHANGELOG.rst | 11 ----------- 13 files changed, 1 insertion(+), 116 deletions(-) diff --git a/README.md b/README.md index ae0f478e..f9de595d 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,7 @@ Required dependencies: 2. ROS 2 dev tools: - [colcon-common-extensions](https://pypi.org/project/colcon-common-extensions/) - [rosdep](https://pypi.org/project/rosdep/): Used to install dependencies when building from sources + - [vcs](https://pypi.org/project/vcstool/): Automates cloning of git repositories declared on a YAML file Besides the aforementioned dependencies you will also need at least one among Ignition Gazebo and Classic Gazebo diff --git a/irobot_create_common/irobot_create_common_bringup/CHANGELOG.rst b/irobot_create_common/irobot_create_common_bringup/CHANGELOG.rst index ddb8d49f..83baa9ec 100644 --- a/irobot_create_common/irobot_create_common_bringup/CHANGELOG.rst +++ b/irobot_create_common/irobot_create_common_bringup/CHANGELOG.rst @@ -2,14 +2,6 @@ Changelog for package irobot_create_common_bringup ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -1.0.3 (2022-05-05) ------------------- - -1.0.2 (2022-05-05) ------------------- -* update changelog -* Contributors: Alberto Soragna - 1.0.1 (2022-04-12) ------------------ * add boost as explicit dependency and remove unnneded boost usage (`#175 `_) diff --git a/irobot_create_common/irobot_create_control/CHANGELOG.rst b/irobot_create_common/irobot_create_control/CHANGELOG.rst index 7609a8e5..2c1c5a2e 100644 --- a/irobot_create_common/irobot_create_control/CHANGELOG.rst +++ b/irobot_create_common/irobot_create_control/CHANGELOG.rst @@ -2,16 +2,6 @@ Changelog for package irobot_create_control ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -1.0.3 (2022-05-05) ------------------- - -1.0.2 (2022-05-05) ------------------- -* fix dependency tree of create3_sim packages (`#177 `_) -* update changelog -* remove minimum version requirement -* Contributors: Alberto Soragna - 1.0.1 (2022-04-12) ------------------ * add boost as explicit dependency and remove unnneded boost usage (`#175 `_) diff --git a/irobot_create_common/irobot_create_description/CHANGELOG.rst b/irobot_create_common/irobot_create_description/CHANGELOG.rst index 7cf4149e..9844073e 100644 --- a/irobot_create_common/irobot_create_description/CHANGELOG.rst +++ b/irobot_create_common/irobot_create_description/CHANGELOG.rst @@ -2,15 +2,6 @@ Changelog for package irobot_create_description ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -1.0.3 (2022-05-05) ------------------- - -1.0.2 (2022-05-05) ------------------- -* fix dependency tree of create3_sim packages (`#177 `_) -* update changelog -* Contributors: Alberto Soragna - 1.0.1 (2022-04-12) ------------------ * add boost as explicit dependency and remove unnneded boost usage (`#175 `_) diff --git a/irobot_create_common/irobot_create_nodes/CHANGELOG.rst b/irobot_create_common/irobot_create_nodes/CHANGELOG.rst index cc443254..05343e32 100644 --- a/irobot_create_common/irobot_create_nodes/CHANGELOG.rst +++ b/irobot_create_common/irobot_create_nodes/CHANGELOG.rst @@ -2,14 +2,6 @@ Changelog for package irobot_create_nodes ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -1.0.3 (2022-05-05) ------------------- - -1.0.2 (2022-05-05) ------------------- -* update changelog -* Contributors: Alberto Soragna - 1.0.1 (2022-04-12) ------------------ * add boost as explicit dependency and remove unnneded boost usage (`#175 `_) diff --git a/irobot_create_common/irobot_create_toolbox/CHANGELOG.rst b/irobot_create_common/irobot_create_toolbox/CHANGELOG.rst index c4f06867..265b8c76 100644 --- a/irobot_create_common/irobot_create_toolbox/CHANGELOG.rst +++ b/irobot_create_common/irobot_create_toolbox/CHANGELOG.rst @@ -2,14 +2,6 @@ Changelog for package irobot_create_toolbox ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -1.0.3 (2022-05-05) ------------------- - -1.0.2 (2022-05-05) ------------------- -* update changelog -* Contributors: Alberto Soragna - 1.0.1 (2022-04-12) ------------------ * add boost as explicit dependency and remove unnneded boost usage (`#175 `_) diff --git a/irobot_create_gazebo/irobot_create_gazebo_bringup/CHANGELOG.rst b/irobot_create_gazebo/irobot_create_gazebo_bringup/CHANGELOG.rst index 980aaac7..c158c096 100644 --- a/irobot_create_gazebo/irobot_create_gazebo_bringup/CHANGELOG.rst +++ b/irobot_create_gazebo/irobot_create_gazebo_bringup/CHANGELOG.rst @@ -2,19 +2,6 @@ Changelog for package irobot_create_gazebo_bringup ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -1.0.3 (2022-05-05) ------------------- -* make gazebo classic and ignition build time dependency if they are needed by CMakeLists.txt (`#179 `_) -* Contributors: Alberto Soragna - -1.0.2 (2022-05-05) ------------------- -* fix dependency tree of create3_sim packages (`#177 `_) -* fix setting environment variable GAZEBO_MODEL_PATH for aws models (`#174 `_) -* 1.0.1 -* update changelog -* Contributors: Alberto Soragna, crthilakraj - 1.0.1 (2022-04-12) ------------------ * add boost as explicit dependency and remove unnneded boost usage (`#175 `_) diff --git a/irobot_create_gazebo/irobot_create_gazebo_plugins/CHANGELOG.rst b/irobot_create_gazebo/irobot_create_gazebo_plugins/CHANGELOG.rst index 8fdf9f92..a5ca97a9 100644 --- a/irobot_create_gazebo/irobot_create_gazebo_plugins/CHANGELOG.rst +++ b/irobot_create_gazebo/irobot_create_gazebo_plugins/CHANGELOG.rst @@ -2,14 +2,6 @@ Changelog for package irobot_create_gazebo_plugins ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -1.0.3 (2022-05-05) ------------------- - -1.0.2 (2022-05-05) ------------------- -* update changelog -* Contributors: Alberto Soragna - 1.0.1 (2022-04-12) ------------------ * add boost as explicit dependency and remove unnneded boost usage (`#175 `_) diff --git a/irobot_create_gazebo/irobot_create_gazebo_sim/CHANGELOG.rst b/irobot_create_gazebo/irobot_create_gazebo_sim/CHANGELOG.rst index 132b118f..3deb3056 100644 --- a/irobot_create_gazebo/irobot_create_gazebo_sim/CHANGELOG.rst +++ b/irobot_create_gazebo/irobot_create_gazebo_sim/CHANGELOG.rst @@ -2,16 +2,6 @@ Changelog for package irobot_create_gazebo_sim ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -1.0.3 (2022-05-05) ------------------- - -1.0.2 (2022-05-05) ------------------- -* fix dependency tree of create3_sim packages (`#177 `_) -* 1.0.1 -* update changelog -* Contributors: Alberto Soragna - 1.0.1 (2022-04-12) ------------------ * add boost as explicit dependency and remove unnneded boost usage (`#175 `_) diff --git a/irobot_create_ignition/irobot_create_ignition_bringup/CHANGELOG.rst b/irobot_create_ignition/irobot_create_ignition_bringup/CHANGELOG.rst index f10853d0..c91a1383 100644 --- a/irobot_create_ignition/irobot_create_ignition_bringup/CHANGELOG.rst +++ b/irobot_create_ignition/irobot_create_ignition_bringup/CHANGELOG.rst @@ -2,17 +2,6 @@ Changelog for package irobot_create_ignition_bringup ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -1.0.3 (2022-05-05) ------------------- -* make gazebo classic and ignition build time dependency if they are needed by CMakeLists.txt (`#179 `_) -* Contributors: Alberto Soragna - -1.0.2 (2022-05-05) ------------------- -* fix dependency tree of create3_sim packages (`#177 `_) -* update changelog -* Contributors: Alberto Soragna - 1.0.1 (2022-04-12) ------------------ * add boost as explicit dependency and remove unnneded boost usage (`#175 `_) diff --git a/irobot_create_ignition/irobot_create_ignition_plugins/CHANGELOG.rst b/irobot_create_ignition/irobot_create_ignition_plugins/CHANGELOG.rst index 5a17ef7b..ab60f106 100644 --- a/irobot_create_ignition/irobot_create_ignition_plugins/CHANGELOG.rst +++ b/irobot_create_ignition/irobot_create_ignition_plugins/CHANGELOG.rst @@ -2,17 +2,6 @@ Changelog for package irobot_create_ignition_plugins ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -1.0.3 (2022-05-05) ------------------- -* make gazebo classic and ignition build time dependency if they are needed by CMakeLists.txt (`#179 `_) -* Contributors: Alberto Soragna - -1.0.2 (2022-05-05) ------------------- -* 1.0.1 -* update changelog -* Contributors: Alberto Soragna - 1.0.1 (2022-04-12) ------------------ * add boost as explicit dependency and remove unnneded boost usage (`#175 `_) diff --git a/irobot_create_ignition/irobot_create_ignition_sim/CHANGELOG.rst b/irobot_create_ignition/irobot_create_ignition_sim/CHANGELOG.rst index f17ad722..96b107e8 100644 --- a/irobot_create_ignition/irobot_create_ignition_sim/CHANGELOG.rst +++ b/irobot_create_ignition/irobot_create_ignition_sim/CHANGELOG.rst @@ -2,15 +2,6 @@ Changelog for package irobot_create_ignition_sim ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -1.0.3 (2022-05-05) ------------------- - -1.0.2 (2022-05-05) ------------------- -* fix dependency tree of create3_sim packages (`#177 `_) -* update changelog -* Contributors: Alberto Soragna - 1.0.1 (2022-04-12) ------------------ * add boost as explicit dependency and remove unnneded boost usage (`#175 `_) diff --git a/irobot_create_ignition/irobot_create_ignition_toolbox/CHANGELOG.rst b/irobot_create_ignition/irobot_create_ignition_toolbox/CHANGELOG.rst index 916277ff..24a19ea6 100644 --- a/irobot_create_ignition/irobot_create_ignition_toolbox/CHANGELOG.rst +++ b/irobot_create_ignition/irobot_create_ignition_toolbox/CHANGELOG.rst @@ -2,17 +2,6 @@ Changelog for package irobot_create_ignition_toolbox ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -1.0.3 (2022-05-05) ------------------- - -1.0.2 (2022-05-05) ------------------- -* Renamed Ignition Toolbox libraries (`#178 `_) - * Renamed Ignition Toolbox libraries - * Pre-pend library names with irobot_create_ignition -* update changelog -* Contributors: Alberto Soragna, roni-kreinin - 1.0.1 (2022-04-12) ------------------ * add boost as explicit dependency and remove unnneded boost usage (`#175 `_) From 308840e2babd8c9db511644ef9114a9e6e07bd1b Mon Sep 17 00:00:00 2001 From: techlabs Date: Fri, 4 Nov 2022 15:35:54 +0100 Subject: [PATCH 40/44] removing useless changes to cleanup PR --- .../launch/create3_nodes.launch.py | 2 -- .../launch/dock_description.launch.py | 7 ++++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/irobot_create_common/irobot_create_common_bringup/launch/create3_nodes.launch.py b/irobot_create_common/irobot_create_common_bringup/launch/create3_nodes.launch.py index 87636d4e..f72c85b5 100644 --- a/irobot_create_common/irobot_create_common_bringup/launch/create3_nodes.launch.py +++ b/irobot_create_common/irobot_create_common_bringup/launch/create3_nodes.launch.py @@ -7,7 +7,6 @@ from ament_index_python.packages import get_package_share_directory from launch import LaunchDescription from launch.actions import DeclareLaunchArgument, IncludeLaunchDescription -from launch.conditions import LaunchConfigurationEquals from launch.launch_description_sources import PythonLaunchDescriptionSource from launch.substitutions import LaunchConfiguration, PathJoinSubstitution from launch_ros.actions import Node @@ -130,7 +129,6 @@ def generate_launch_description(): # UI topics / actions ui_mgr_node = Node( - condition=LaunchConfigurationEquals('namespace', ''), package='irobot_create_nodes', name='ui_mgr', namespace=namespace, diff --git a/irobot_create_common/irobot_create_common_bringup/launch/dock_description.launch.py b/irobot_create_common/irobot_create_common_bringup/launch/dock_description.launch.py index cc9a4b4e..aed29a99 100644 --- a/irobot_create_common/irobot_create_common_bringup/launch/dock_description.launch.py +++ b/irobot_create_common/irobot_create_common_bringup/launch/dock_description.launch.py @@ -18,14 +18,15 @@ DeclareLaunchArgument('namespace', default_value='', description='Create3 namespace') ] + for pose_element in ['x', 'y', 'z', 'yaw']: ARGUMENTS.append(DeclareLaunchArgument(f'{pose_element}', default_value='0.0', description=f'{pose_element} ' + 'component of the dock pose.')) - ARGUMENTS.append(DeclareLaunchArgument('visualize_rays', default_value='true', - choices=['true', 'false'], - description='Enable/disable ray visualization')) +ARGUMENTS.append(DeclareLaunchArgument('visualize_rays', default_value='true', + choices=['true', 'false'], + description='Enable/disable ray visualization')) def generate_launch_description(): From ca0236d92b55a30dc56235aa4600e0074d3436a2 Mon Sep 17 00:00:00 2001 From: techlabs Date: Fri, 4 Nov 2022 16:11:33 +0100 Subject: [PATCH 41/44] fixing import order for flake8 testing --- .../launch/dock_description.launch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/irobot_create_common/irobot_create_common_bringup/launch/dock_description.launch.py b/irobot_create_common/irobot_create_common_bringup/launch/dock_description.launch.py index aed29a99..7224163d 100644 --- a/irobot_create_common/irobot_create_common_bringup/launch/dock_description.launch.py +++ b/irobot_create_common/irobot_create_common_bringup/launch/dock_description.launch.py @@ -6,8 +6,8 @@ from ament_index_python.packages import get_package_share_directory from launch import LaunchDescription from launch.actions import DeclareLaunchArgument -from launch.substitutions import Command, LaunchConfiguration, PathJoinSubstitution from launch.conditions import LaunchConfigurationEquals, LaunchConfigurationNotEquals +from launch.substitutions import Command, LaunchConfiguration, PathJoinSubstitution from launch_ros.actions import Node From f3aa5e947e4b687b43dc11d814db211fd6097b55 Mon Sep 17 00:00:00 2001 From: "badr.moutalib" Date: Mon, 5 Dec 2022 16:11:31 +0100 Subject: [PATCH 42/44] remapping /tf to tf --- .../launch/create3_nodes.launch.py | 10 ++++++++++ .../launch/dock_description.launch.py | 12 +++++------ .../launch/robot_description.launch.py | 6 +++++- .../urdf/create3.urdf.xacro | 2 ++ .../create3_ros_ignition_bridge.launch.py | 20 +++++++++++++++++++ 5 files changed, 43 insertions(+), 7 deletions(-) diff --git a/irobot_create_common/irobot_create_common_bringup/launch/create3_nodes.launch.py b/irobot_create_common/irobot_create_common_bringup/launch/create3_nodes.launch.py index f72c85b5..d0547711 100644 --- a/irobot_create_common/irobot_create_common_bringup/launch/create3_nodes.launch.py +++ b/irobot_create_common/irobot_create_common_bringup/launch/create3_nodes.launch.py @@ -26,6 +26,8 @@ def generate_launch_description(): pkg_create3_common_bringup = get_package_share_directory('irobot_create_common_bringup') pkg_create3_control = get_package_share_directory('irobot_create_control') namespace = LaunchConfiguration('namespace') + remappings = [('/tf', 'tf'), + ('/tf_static', 'tf_static')] # Paths control_launch_file = PathJoinSubstitution( @@ -60,6 +62,7 @@ def generate_launch_description(): parameters=[hazards_params_yaml_file, {'use_sim_time': True}], output='screen', + remappings=remappings, ) # Publish IR intensity vector @@ -71,6 +74,7 @@ def generate_launch_description(): parameters=[ir_intensity_params_yaml_file, {'use_sim_time': True}], output='screen', + remappings=remappings, ) # Motion Control @@ -81,6 +85,7 @@ def generate_launch_description(): executable='motion_control', parameters=[{'use_sim_time': True}], output='screen', + remappings=remappings, ) # Publish wheel status @@ -92,6 +97,7 @@ def generate_launch_description(): parameters=[wheel_status_params_yaml_file, {'use_sim_time': True}], output='screen', + remappings=remappings, ) # Publish mock topics @@ -103,6 +109,7 @@ def generate_launch_description(): parameters=[mock_params_yaml_file, {'use_sim_time': True}], output='screen', + remappings=remappings, ) # Publish robot state @@ -114,6 +121,7 @@ def generate_launch_description(): parameters=[robot_state_yaml_file, {'use_sim_time': True}], output='screen', + remappings=remappings, ) # Publish kidnap estimator @@ -125,6 +133,7 @@ def generate_launch_description(): parameters=[kidnap_estimator_yaml_file, {'use_sim_time': True}], output='screen', + remappings=remappings, ) # UI topics / actions @@ -137,6 +146,7 @@ def generate_launch_description(): {'use_sim_time': True}, {'gazebo': LaunchConfiguration('gazebo')}], output='screen', + remappings=remappings, ) # Define LaunchDescription variable diff --git a/irobot_create_common/irobot_create_common_bringup/launch/dock_description.launch.py b/irobot_create_common/irobot_create_common_bringup/launch/dock_description.launch.py index 7224163d..05991ad2 100644 --- a/irobot_create_common/irobot_create_common_bringup/launch/dock_description.launch.py +++ b/irobot_create_common/irobot_create_common_bringup/launch/dock_description.launch.py @@ -44,6 +44,9 @@ def generate_launch_description(): namespace = LaunchConfiguration('namespace') gazebo_simulator = LaunchConfiguration('gazebo') frame_prefix = [namespace, '/'] + remappings = [('/tf', 'tf'), + ('/tf_static', 'tf_static'), + ('robot_description', 'standard_dock_description')] state_publisher = Node( condition=LaunchConfigurationEquals('namespace', ''), @@ -61,9 +64,7 @@ def generate_launch_description(): 'namespace:=', namespace, ' '])}, {'frame_prefix': frame_prefix}, ], - remappings=[ - ('robot_description', ('/standard_dock_description')), - ], + remappings=remappings, ) state_publisher_namespaced = Node( @@ -83,9 +84,7 @@ def generate_launch_description(): 'namespace:=', namespace, ' '])}, {'frame_prefix': frame_prefix}, ], - remappings=[ - ('robot_description', 'standard_dock_description'), - ], + remappings=remappings, ) tf_odom_std_dock_link_publisher = Node( @@ -113,6 +112,7 @@ def generate_launch_description(): yaw, '0', '0', [namespace, '/odom'], [namespace, '/std_dock_link']], output='screen', + remappings=remappings, ) # Define LaunchDescription variable diff --git a/irobot_create_common/irobot_create_common_bringup/launch/robot_description.launch.py b/irobot_create_common/irobot_create_common_bringup/launch/robot_description.launch.py index ee658385..8ce4f2de 100644 --- a/irobot_create_common/irobot_create_common_bringup/launch/robot_description.launch.py +++ b/irobot_create_common/irobot_create_common_bringup/launch/robot_description.launch.py @@ -29,13 +29,16 @@ def generate_launch_description(): visualize_rays = LaunchConfiguration('visualize_rays') namespace = LaunchConfiguration('namespace') frame_prefix = [namespace, '/'] + remappings = [('/tf', 'tf'), + ('/tf_static', 'tf_static')] robot_state_publisher = Node( package='robot_state_publisher', executable='robot_state_publisher', name='robot_state_publisher', - namespace=LaunchConfiguration('namespace'), + namespace=namespace, output='screen', + remappings=remappings, parameters=[ {'use_sim_time': True}, {'robot_description': @@ -55,6 +58,7 @@ def generate_launch_description(): name='joint_state_publisher', namespace=LaunchConfiguration('namespace'), output='screen', + remappings=remappings, ) # Define LaunchDescription variable diff --git a/irobot_create_common/irobot_create_description/urdf/create3.urdf.xacro b/irobot_create_common/irobot_create_description/urdf/create3.urdf.xacro index f8484f12..1cd7caed 100644 --- a/irobot_create_common/irobot_create_description/urdf/create3.urdf.xacro +++ b/irobot_create_common/irobot_create_description/urdf/create3.urdf.xacro @@ -131,6 +131,8 @@ $(find irobot_create_control)/config/control.yaml $(arg namespace) + diff --git a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ros_ignition_bridge.launch.py b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ros_ignition_bridge.launch.py index 451d4412..20cdac28 100644 --- a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ros_ignition_bridge.launch.py +++ b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ros_ignition_bridge.launch.py @@ -145,6 +145,7 @@ def generate_launch_description(): # odom to base_link transform bridge odom_base_tf_bridge = Node( + condition=LaunchConfigurationEquals('namespace', ''), package='ros_ign_bridge', executable='parameter_bridge', namespace=namespace, @@ -160,6 +161,24 @@ def generate_launch_description(): ], remappings=[ (['/model/', robot_name, '/tf'], '/tf')]) + + odom_base_tf_bridge_namespaced = Node( + condition=LaunchConfigurationNotEquals('namespace', ''), + package='ros_ign_bridge', + executable='parameter_bridge', + namespace=namespace, + name='odom_base_tf_bridge', + output='screen', + parameters=[{ + 'use_sim_time': use_sim_time + }], + arguments=[ + ['/model/', robot_name, '/tf' + + '@tf2_msgs/msg/TFMessage' + + '[ignition.msgs.Pose_V'] + ], + remappings=[ + (['/model/', robot_name, '/tf'], ['/', namespace, '/tf'])]) # Bumper contact sensor bridge bumper_contact_bridge = Node( @@ -342,6 +361,7 @@ def generate_launch_description(): ld.add_action(pose_bridge) ld.add_action(pose_bridge_namespaced) ld.add_action(odom_base_tf_bridge) + ld.add_action(odom_base_tf_bridge_namespaced) ld.add_action(bumper_contact_bridge) ld.add_action(bumper_contact_bridge_namespaced) ld.add_action(cliff_bridge) From 9a039541db4dc711d0fe902dd075db0c9ed1ec63 Mon Sep 17 00:00:00 2001 From: "badr.moutalib" Date: Mon, 5 Dec 2022 18:43:49 +0100 Subject: [PATCH 43/44] removing useless changes --- .../irobot_create_common_bringup/package.xml | 2 +- .../urdf/create3.urdf.xacro | 2 +- .../launch/create3_ignition.launch.py | 2 +- .../launch/create3_spawn.launch.py | 2 +- .../worlds/empty.sdf | 80 ------------------- 5 files changed, 4 insertions(+), 84 deletions(-) delete mode 100644 irobot_create_ignition/irobot_create_ignition_bringup/worlds/empty.sdf diff --git a/irobot_create_common/irobot_create_common_bringup/package.xml b/irobot_create_common/irobot_create_common_bringup/package.xml index d30bed41..588dc051 100644 --- a/irobot_create_common/irobot_create_common_bringup/package.xml +++ b/irobot_create_common/irobot_create_common_bringup/package.xml @@ -2,7 +2,7 @@ irobot_create_common_bringup - 1.0.3 + 1.0.1 Provides common launch and configuration scripts for a simulated iRobot(R) Create(R) 3 Educational Robot. Ekumen BSD diff --git a/irobot_create_common/irobot_create_description/urdf/create3.urdf.xacro b/irobot_create_common/irobot_create_description/urdf/create3.urdf.xacro index 1cd7caed..5f8b95b0 100644 --- a/irobot_create_common/irobot_create_description/urdf/create3.urdf.xacro +++ b/irobot_create_common/irobot_create_description/urdf/create3.urdf.xacro @@ -288,7 +288,7 @@ - ogre2 + ogre diff --git a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition.launch.py b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition.launch.py index 35c85ce3..491e3bba 100644 --- a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition.launch.py +++ b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition.launch.py @@ -24,7 +24,7 @@ description='Ignition World'), DeclareLaunchArgument('robot_name', default_value='create3', description='Robot name'), - DeclareLaunchArgument('use_rviz', default_value='false', + DeclareLaunchArgument('use_rviz', default_value='true', choices=['true', 'false'], description='Start rviz.'), DeclareLaunchArgument('spawn_dock', default_value='true', choices=['true', 'false'], diff --git a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_spawn.launch.py b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_spawn.launch.py index 36594427..319d1365 100644 --- a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_spawn.launch.py +++ b/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_spawn.launch.py @@ -41,7 +41,7 @@ def perform( description='robot description topic name'), DeclareLaunchArgument('namespace', default_value='', description='Robot namespace'), - DeclareLaunchArgument('use_rviz', default_value='false', + DeclareLaunchArgument('use_rviz', default_value='true', choices=['true', 'false'], description='Start rviz.'), DeclareLaunchArgument('spawn_dock', default_value='true', choices=['true', 'false'], diff --git a/irobot_create_ignition/irobot_create_ignition_bringup/worlds/empty.sdf b/irobot_create_ignition/irobot_create_ignition_bringup/worlds/empty.sdf deleted file mode 100644 index fc0d1c07..00000000 --- a/irobot_create_ignition/irobot_create_ignition_bringup/worlds/empty.sdf +++ /dev/null @@ -1,80 +0,0 @@ - - - - - false - - - 0.002 - 1.0 - - - - - - 0 0 -9.8 - 6e-06 2.3e-05 -4.2e-05 - - - 0.4 0.4 0.4 1 - 0.7 0.7 0.7 1 - 1 - - - 1 - - - - - 0 0 1 - 100 100 - - - - - - - - - - - - - - 0 0 1 - 100 100 - - - - 0.8 0.8 0.8 1 - 0.8 0.8 0.8 1 - 0.8 0.8 0.8 1 - - - - - - 0 0 0 0 -0 0 - - - - \ No newline at end of file From fa3e8d94f4d6dad9077733f41c83fc21fc48acaf Mon Sep 17 00:00:00 2001 From: techlabs Date: Wed, 7 Dec 2022 19:12:15 +0100 Subject: [PATCH 44/44] re-add tf remapping in create3 xacro files for proper namespacing --- .../irobot_create_description/urdf/create3.urdf.xacro | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/irobot_create_common/irobot_create_description/urdf/create3.urdf.xacro b/irobot_create_common/irobot_create_description/urdf/create3.urdf.xacro index 5f8b95b0..4abca4f2 100644 --- a/irobot_create_common/irobot_create_description/urdf/create3.urdf.xacro +++ b/irobot_create_common/irobot_create_description/urdf/create3.urdf.xacro @@ -131,8 +131,8 @@ $(find irobot_create_control)/config/control.yaml $(arg namespace) - + /tf:=tf + /tf_static:=tf_static