From 3bb35cd05181ded2f49b87132118d5488c7d9a8b Mon Sep 17 00:00:00 2001 From: Chris Iverach-Brereton Date: Tue, 16 Jul 2024 12:27:52 -0400 Subject: [PATCH 01/34] Remove the COLCON_IGNORE, fix some namespace issues with the Create3 plugin --- .../irobot_create_ignition_plugins/COLCON_IGNORE | 0 .../irobot_create_ignition_plugins/Create3Hmi/Create3Hmi.hh | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) delete mode 100644 irobot_create_ignition/irobot_create_ignition_plugins/COLCON_IGNORE diff --git a/irobot_create_ignition/irobot_create_ignition_plugins/COLCON_IGNORE b/irobot_create_ignition/irobot_create_ignition_plugins/COLCON_IGNORE deleted file mode 100644 index e69de29b..00000000 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 a20456b3..86b8d368 100644 --- a/irobot_create_ignition/irobot_create_ignition_plugins/Create3Hmi/Create3Hmi.hh +++ b/irobot_create_ignition/irobot_create_ignition_plugins/Create3Hmi/Create3Hmi.hh @@ -60,8 +60,8 @@ protected slots: void OnCreate3Button(const int button); private: - ignition::transport::Node node_; - ignition::transport::Node::Publisher create3_button_pub_; + gz::transport::Node node_; + gz::transport::Node::Publisher create3_button_pub_; std::string namespace_ = ""; std::string create3_button_topic_ = "/create3_buttons"; }; From 39fb2d4d0253ebba41436b9e2bd820eced231711 Mon Sep 17 00:00:00 2001 From: Chris Iverach-Brereton Date: Wed, 17 Jul 2024 10:47:15 -0400 Subject: [PATCH 02/34] Initial bulk renaming ignition -> gz, ign -> gz --- README.md | 38 +++++++-------- .../irobot_create_gz_bringup}/CHANGELOG.rst | 18 +++---- .../irobot_create_gz_bringup}/CMakeLists.txt | 2 +- .../irobot_create_gz_bringup/README.md | 1 + .../config/pose_republisher_params.yaml | 0 .../config/sensors_params.yaml | 0 .../gui/create3/gui.config | 0 .../launch/create3_ignition.launch.py | 8 +-- .../launch/create3_ignition_nodes.launch.py | 12 ++--- .../create3_ros_ignition_bridge.launch.py | 0 .../launch/create3_spawn.launch.py | 12 ++--- .../launch/ignition.launch.py | 20 ++++---- .../irobot_create_gz_bringup}/package.xml | 4 +- .../worlds/depot.sdf | 0 .../irobot_create_gz_bringup}/worlds/maze.sdf | 0 .../irobot_create_gz_plugins}/CHANGELOG.rst | 12 ++--- .../irobot_create_gz_plugins}/CMakeLists.txt | 2 +- .../Create3Hmi/CMakeLists.txt | 0 .../Create3Hmi/Create3Hmi.cc | 0 .../Create3Hmi/Create3Hmi.config | 0 .../Create3Hmi/Create3Hmi.hh | 6 +-- .../Create3Hmi/Create3Hmi.qml | 0 .../Create3Hmi/Create3Hmi.qrc | 0 .../Create3Hmi/images/One Dot.png | Bin .../Create3Hmi/images/Power.png | Bin .../Create3Hmi/images/Two Dots.png | Bin .../irobot_create_gz_plugins/README.md | 1 + .../irobot_create_gz_plugins}/package.xml | 2 +- .../irobot_create_gz_sim}/CHANGELOG.rst | 10 ++-- .../irobot_create_gz_sim}/CMakeLists.txt | 2 +- .../irobot_create_gz_sim}/package.xml | 8 +-- .../irobot_create_gz_toolbox}/CHANGELOG.rst | 14 +++--- .../irobot_create_gz_toolbox}/CMakeLists.txt | 38 +++++++-------- .../interface_buttons_node.hpp | 10 ++-- .../pose_republisher/pose_republisher.hpp | 12 ++--- .../sensors/bumper.hpp | 10 ++-- .../sensors/cliff.hpp | 10 ++-- .../sensors/ir_intensity.hpp | 10 ++-- .../sensors/ir_opcode.hpp | 12 ++--- .../sensors/mouse.hpp | 10 ++-- .../sensors/sensors_node.hpp | 46 ++++++++++++++++++ .../sensors/wheel_drop.hpp | 10 ++-- .../irobot_create_ignition_toolbox/utils.hpp | 10 ++-- .../irobot_create_gz_toolbox}/package.xml | 2 +- .../interface_buttons_main.cpp | 4 +- .../interface_buttons_node.cpp | 4 +- .../pose_republisher_main.cpp | 4 +- .../pose_republisher_node.cpp | 4 +- .../src/sensors/bumper.cpp | 6 +-- .../src/sensors/cliff.cpp | 4 +- .../src/sensors/ir_intensity.cpp | 4 +- .../src/sensors/ir_opcode.cpp | 8 +-- .../src/sensors/mouse.cpp | 4 +- .../src/sensors/sensors_main.cpp | 4 +- .../src/sensors/sensors_node.cpp | 4 +- .../src/sensors/wheel_drop.cpp | 4 +- .../irobot_create_ignition_bringup/README.md | 1 - .../irobot_create_ignition_plugins/README.md | 1 - .../sensors/sensors_node.hpp | 46 ------------------ 59 files changed, 225 insertions(+), 229 deletions(-) rename {irobot_create_ignition/irobot_create_ignition_bringup => irobot_create_gz/irobot_create_gz_bringup}/CHANGELOG.rst (86%) rename {irobot_create_ignition/irobot_create_ignition_bringup => irobot_create_gz/irobot_create_gz_bringup}/CMakeLists.txt (93%) create mode 100644 irobot_create_gz/irobot_create_gz_bringup/README.md rename {irobot_create_ignition/irobot_create_ignition_bringup => irobot_create_gz/irobot_create_gz_bringup}/config/pose_republisher_params.yaml (100%) rename {irobot_create_ignition/irobot_create_ignition_bringup => irobot_create_gz/irobot_create_gz_bringup}/config/sensors_params.yaml (100%) rename {irobot_create_ignition/irobot_create_ignition_bringup => irobot_create_gz/irobot_create_gz_bringup}/gui/create3/gui.config (100%) rename {irobot_create_ignition/irobot_create_ignition_bringup => irobot_create_gz/irobot_create_gz_bringup}/launch/create3_ignition.launch.py (88%) rename {irobot_create_ignition/irobot_create_ignition_bringup => irobot_create_gz/irobot_create_gz_bringup}/launch/create3_ignition_nodes.launch.py (82%) rename {irobot_create_ignition/irobot_create_ignition_bringup => irobot_create_gz/irobot_create_gz_bringup}/launch/create3_ros_ignition_bridge.launch.py (100%) rename {irobot_create_ignition/irobot_create_ignition_bringup => irobot_create_gz/irobot_create_gz_bringup}/launch/create3_spawn.launch.py (93%) rename {irobot_create_ignition/irobot_create_ignition_bringup => irobot_create_gz/irobot_create_gz_bringup}/launch/ignition.launch.py (86%) rename {irobot_create_ignition/irobot_create_ignition_bringup => irobot_create_gz/irobot_create_gz_bringup}/package.xml (93%) rename {irobot_create_ignition/irobot_create_ignition_bringup => irobot_create_gz/irobot_create_gz_bringup}/worlds/depot.sdf (100%) rename {irobot_create_ignition/irobot_create_ignition_bringup => irobot_create_gz/irobot_create_gz_bringup}/worlds/maze.sdf (100%) rename {irobot_create_ignition/irobot_create_ignition_plugins => irobot_create_gz/irobot_create_gz_plugins}/CHANGELOG.rst (89%) rename {irobot_create_ignition/irobot_create_ignition_plugins => irobot_create_gz/irobot_create_gz_plugins}/CMakeLists.txt (92%) rename {irobot_create_ignition/irobot_create_ignition_plugins => irobot_create_gz/irobot_create_gz_plugins}/Create3Hmi/CMakeLists.txt (100%) rename {irobot_create_ignition/irobot_create_ignition_plugins => irobot_create_gz/irobot_create_gz_plugins}/Create3Hmi/Create3Hmi.cc (100%) rename {irobot_create_ignition/irobot_create_ignition_plugins => irobot_create_gz/irobot_create_gz_plugins}/Create3Hmi/Create3Hmi.config (100%) rename {irobot_create_ignition/irobot_create_ignition_plugins => irobot_create_gz/irobot_create_gz_plugins}/Create3Hmi/Create3Hmi.hh (84%) rename {irobot_create_ignition/irobot_create_ignition_plugins => irobot_create_gz/irobot_create_gz_plugins}/Create3Hmi/Create3Hmi.qml (100%) rename {irobot_create_ignition/irobot_create_ignition_plugins => irobot_create_gz/irobot_create_gz_plugins}/Create3Hmi/Create3Hmi.qrc (100%) rename {irobot_create_ignition/irobot_create_ignition_plugins => irobot_create_gz/irobot_create_gz_plugins}/Create3Hmi/images/One Dot.png (100%) rename {irobot_create_ignition/irobot_create_ignition_plugins => irobot_create_gz/irobot_create_gz_plugins}/Create3Hmi/images/Power.png (100%) rename {irobot_create_ignition/irobot_create_ignition_plugins => irobot_create_gz/irobot_create_gz_plugins}/Create3Hmi/images/Two Dots.png (100%) create mode 100644 irobot_create_gz/irobot_create_gz_plugins/README.md rename {irobot_create_ignition/irobot_create_ignition_plugins => irobot_create_gz/irobot_create_gz_plugins}/package.xml (95%) rename {irobot_create_ignition/irobot_create_ignition_sim => irobot_create_gz/irobot_create_gz_sim}/CHANGELOG.rst (91%) rename {irobot_create_ignition/irobot_create_ignition_sim => irobot_create_gz/irobot_create_gz_sim}/CMakeLists.txt (70%) rename {irobot_create_ignition/irobot_create_ignition_sim => irobot_create_gz/irobot_create_gz_sim}/package.xml (71%) rename {irobot_create_ignition/irobot_create_ignition_toolbox => irobot_create_gz/irobot_create_gz_toolbox}/CHANGELOG.rst (90%) rename {irobot_create_ignition/irobot_create_ignition_toolbox => irobot_create_gz/irobot_create_gz_toolbox}/CMakeLists.txt (70%) rename {irobot_create_ignition/irobot_create_ignition_toolbox => irobot_create_gz/irobot_create_gz_toolbox}/include/irobot_create_ignition_toolbox/interface_buttons/interface_buttons_node.hpp (70%) rename {irobot_create_ignition/irobot_create_ignition_toolbox => irobot_create_gz/irobot_create_gz_toolbox}/include/irobot_create_ignition_toolbox/pose_republisher/pose_republisher.hpp (81%) rename {irobot_create_ignition/irobot_create_ignition_toolbox => irobot_create_gz/irobot_create_gz_toolbox}/include/irobot_create_ignition_toolbox/sensors/bumper.hpp (79%) rename {irobot_create_ignition/irobot_create_ignition_toolbox => irobot_create_gz/irobot_create_gz_toolbox}/include/irobot_create_ignition_toolbox/sensors/cliff.hpp (76%) rename {irobot_create_ignition/irobot_create_ignition_toolbox => irobot_create_gz/irobot_create_gz_toolbox}/include/irobot_create_ignition_toolbox/sensors/ir_intensity.hpp (73%) rename {irobot_create_ignition/irobot_create_ignition_toolbox => irobot_create_gz/irobot_create_gz_toolbox}/include/irobot_create_ignition_toolbox/sensors/ir_opcode.hpp (89%) rename {irobot_create_ignition/irobot_create_ignition_toolbox => irobot_create_gz/irobot_create_gz_toolbox}/include/irobot_create_ignition_toolbox/sensors/mouse.hpp (76%) create mode 100644 irobot_create_gz/irobot_create_gz_toolbox/include/irobot_create_ignition_toolbox/sensors/sensors_node.hpp rename {irobot_create_ignition/irobot_create_ignition_toolbox => irobot_create_gz/irobot_create_gz_toolbox}/include/irobot_create_ignition_toolbox/sensors/wheel_drop.hpp (76%) rename {irobot_create_ignition/irobot_create_ignition_toolbox => irobot_create_gz/irobot_create_gz_toolbox}/include/irobot_create_ignition_toolbox/utils.hpp (92%) rename {irobot_create_ignition/irobot_create_ignition_toolbox => irobot_create_gz/irobot_create_gz_toolbox}/package.xml (96%) rename {irobot_create_ignition/irobot_create_ignition_toolbox => irobot_create_gz/irobot_create_gz_toolbox}/src/interface_buttons/interface_buttons_main.cpp (56%) rename {irobot_create_ignition/irobot_create_ignition_toolbox => irobot_create_gz/irobot_create_gz_toolbox}/src/interface_buttons/interface_buttons_node.cpp (95%) rename {irobot_create_ignition/irobot_create_ignition_toolbox => irobot_create_gz/irobot_create_gz_toolbox}/src/pose_republisher/pose_republisher_main.cpp (57%) rename {irobot_create_ignition/irobot_create_ignition_toolbox => irobot_create_gz/irobot_create_gz_toolbox}/src/pose_republisher/pose_republisher_node.cpp (98%) rename {irobot_create_ignition/irobot_create_ignition_toolbox => irobot_create_gz/irobot_create_gz_toolbox}/src/sensors/bumper.cpp (95%) rename {irobot_create_ignition/irobot_create_ignition_toolbox => irobot_create_gz/irobot_create_gz_toolbox}/src/sensors/cliff.cpp (94%) rename {irobot_create_ignition/irobot_create_ignition_toolbox => irobot_create_gz/irobot_create_gz_toolbox}/src/sensors/ir_intensity.cpp (95%) rename {irobot_create_ignition/irobot_create_ignition_toolbox => irobot_create_gz/irobot_create_gz_toolbox}/src/sensors/ir_opcode.cpp (96%) rename {irobot_create_ignition/irobot_create_ignition_toolbox => irobot_create_gz/irobot_create_gz_toolbox}/src/sensors/mouse.cpp (93%) rename {irobot_create_ignition/irobot_create_ignition_toolbox => irobot_create_gz/irobot_create_gz_toolbox}/src/sensors/sensors_main.cpp (60%) rename {irobot_create_ignition/irobot_create_ignition_toolbox => irobot_create_gz/irobot_create_gz_toolbox}/src/sensors/sensors_node.cpp (83%) rename {irobot_create_ignition/irobot_create_ignition_toolbox => irobot_create_gz/irobot_create_gz_toolbox}/src/sensors/wheel_drop.cpp (94%) delete mode 100644 irobot_create_ignition/irobot_create_ignition_bringup/README.md delete mode 100644 irobot_create_ignition/irobot_create_ignition_plugins/README.md delete mode 100644 irobot_create_ignition/irobot_create_ignition_toolbox/include/irobot_create_ignition_toolbox/sensors/sensors_node.hpp diff --git a/README.md b/README.md index 56bb2019..0a02369b 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![Testing](https://github.com/iRobotSTEM/create3_sim/actions/workflows/ci.yml/badge.svg)](https://github.com/iRobotSTEM/create3_sim/actions/workflows/ci.yml) [![License](https://img.shields.io/github/license/iRobotEducation/create3_sim)](https://github.com/iRobotEducation/create3_sim/blob/main/LICENSE) This is a ROS 2 simulation stack for the [iRobot® Create® 3](https://edu.irobot.com/create3) robot. -Both Ignition Gazebo and Classic Gazebo are supported. +Only Gazebo Harmonic is supported. Have a look at the [Create® 3 documentation](https://iroboteducation.github.io/create3_docs/) for more details on the ROS 2 interfaces exposed by the robot. @@ -17,19 +17,15 @@ Required dependencies: - [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 +Besides the aforementioned dependencies you will also need Gazebo Harmonic. -#### Classic Gazebo - -Install [Gazebo 11](http://gazebosim.org/tutorials?tut=install_ubuntu) - -#### Ignition Fortress +#### Gazebo Harmonic ```bash sudo apt-get update && sudo apt-get install wget sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list' wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add - -sudo apt-get update && sudo apt-get install ignition-fortress +sudo apt-get update && sudo apt-get install ros-gz ``` ## Build @@ -60,18 +56,18 @@ source install/local_setup.bash ## Run -#### Ignition Gazebo +#### Gazebo Harmonic -Create® 3 can be spawned in a demo world in Ignition and monitored through RViz with +Create® 3 can be spawned in a demo world in Gazebo and monitored through RViz with ```bash -ros2 launch irobot_create_ignition_bringup create3_ignition.launch.py +ros2 launch irobot_create_gz_bringup create3_gz.launch.py ``` The spawn point can be changed with the `x`, `y`, `z` and `yaw` launch arguments: ```bash -ros2 launch irobot_create_ignition_bringup create3_ignition.launch.py x:=1.0 y:=0.5 yaw:=1.5707 +ros2 launch irobot_create_gz_bringup create3_gz.launch.py x:=1.0 y:=0.5 yaw:=1.5707 ``` ##### Namespacing @@ -79,17 +75,17 @@ ros2 launch irobot_create_ignition_bringup create3_ignition.launch.py x:=1.0 y:= A namespace can be applied to the robot using the `namespace` launch argument: ```bash -ros2 launch irobot_create_ignition_bringup create3_ignition.launch.py namespace:=my_robot +ros2 launch irobot_create_gz_bringup create3_gz.launch.py namespace:=my_robot ``` Multiple robots can be spawned with unique namespaces: ```bash -ros2 launch irobot_create_ignition_bringup create3_ignition.launch.py namespace:=robot1 -ros2 launch irobot_create_ignition_bringup create3_spawn.launch.py namespace:=robot2 x:=1.0 +ros2 launch irobot_create_gz_bringup create3_gz.launch.py namespace:=robot1 +ros2 launch irobot_create_gz_bringup create3_spawn.launch.py namespace:=robot2 x:=1.0 ``` -> :warning: `create3_ignition.launch.py` should only be used once as it launches the Ignition simulator itself. Additional robots should be spawned with `create3_spawn.launch.py`. Namespaces and spawn points should be unique for each robot. +> :warning: `create3_gz.launch.py` should only be used once as it launches the Ignition simulator itself. Additional robots should be spawned with `create3_spawn.launch.py`. Namespaces and spawn points should be unique for each robot. ## Package layout @@ -102,8 +98,8 @@ This repository contains packages for both the Classic and Ignition Gazebo simul - `irobot_create_nodes` Nodes for simulating robot topics and motion control - `irobot_create_toolbox` Tools and helpers for creating nodes and plugins -- `irobot_create_ignition` Packages used for the Ignition Gazebo Simulator - - `irobot_create_ignition_bringup` Launch files and configurations - - `irobot_create_ignition_plugins` GUI plugins - - `irobot_create_ignition_sim` Metapackage - - `irobot_create_ignition_toolbox` Sensor and interface nodes +- `irobot_create_gz` Packages used for the Gazebo Harmonic Simulator + - `irobot_create_gz_bringup` Launch files and configurations + - `irobot_create_gz_plugins` GUI plugins + - `irobot_create_gz_sim` Metapackage + - `irobot_create_gz_toolbox` Sensor and interface nodes diff --git a/irobot_create_ignition/irobot_create_ignition_bringup/CHANGELOG.rst b/irobot_create_gz/irobot_create_gz_bringup/CHANGELOG.rst similarity index 86% rename from irobot_create_ignition/irobot_create_ignition_bringup/CHANGELOG.rst rename to irobot_create_gz/irobot_create_gz_bringup/CHANGELOG.rst index 4a90d5a7..de7d2d82 100644 --- a/irobot_create_ignition/irobot_create_ignition_bringup/CHANGELOG.rst +++ b/irobot_create_gz/irobot_create_gz_bringup/CHANGELOG.rst @@ -1,11 +1,11 @@ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Changelog for package irobot_create_ignition_bringup +Changelog for package irobot_create_gz_bringup ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2.1.0 (2023-05-15) ------------------ * Multi robot support (`#207 `_) -* Added ign_ros2_control dependency as it is released now. (`#204 `_) +* Added gz_ros2_control dependency as it is released now. (`#204 `_) * Contributors: Roni Kreinin, roni-kreinin 2.0.0 (2023-01-19) @@ -13,7 +13,7 @@ Changelog for package irobot_create_ignition_bringup * Update to ROS 2 Humble (`#197 `_) * Update message names to https://github.com/iRobotEducation/irobot_create_msgs/pull/10 * rename dock topic into dock_status - * comment ign_ros2_control dependency as it must be built from sources + * comment gz_ros2_control dependency as it must be built from sources Co-authored-by: Francisco Martín Rico * add missing dependency to irobot-create-common-bringup (`#186 `_) * Contributors: Alberto Soragna, Francisco Martín Rico @@ -39,8 +39,8 @@ Changelog for package irobot_create_ignition_bringup * use new node names in parameter files * remove declare parameter utility and fix linter tests * Added pose publisher (`#154 `_) -* Use ign_ros2_control (`#148 `_) - * Use ign_ros2_control +* Use gz_ros2_control (`#148 `_) + * Use gz_ros2_control * Removed remapping * Documentation * fix gazebo ignition world name (`#150 `_) @@ -56,14 +56,14 @@ Changelog for package irobot_create_ignition_bringup Cleaned up gazebo launch arg Adjusted front caster position * Simulation -> simulator - * Added irobot_create_ignition packages + * Added irobot_create_gz packages * Fixed some linter warnings - * Removed joint state publisher from ros_ign_bridge + * Removed joint state publisher from ros_gz_bridge * - Reorganized packages - Shifted center of gravity of create3 forwards by 22.8 mm - Added min/max velocity and acceleration to diff drive plugin * Moved README.md to irobot_create_gazebo - Created new README.md for irobot_create_ignition + Created new README.md for irobot_create_gz * Update README.md * Added ignition edifice repos for source installation * Create README.md @@ -74,7 +74,7 @@ Changelog for package irobot_create_ignition_bringup * Updated README to have installation and example instructions for both Ignition and Classic Moved .repos files to the root of the repository * Ignition and Gazebo packages are now optional and only built if the required dependencies are installed - * Made ros_ign_interfaces optional in irobot_create_ignition_bringup + * Made ros_gz_interfaces optional in irobot_create_gz_bringup * fix license and minor changes to CMake and README * Interface buttons mock publisher not used in Ignition sim * Fixed linter errors diff --git a/irobot_create_ignition/irobot_create_ignition_bringup/CMakeLists.txt b/irobot_create_gz/irobot_create_gz_bringup/CMakeLists.txt similarity index 93% rename from irobot_create_ignition/irobot_create_ignition_bringup/CMakeLists.txt rename to irobot_create_gz/irobot_create_gz_bringup/CMakeLists.txt index 88633218..0c01a074 100644 --- a/irobot_create_ignition/irobot_create_ignition_bringup/CMakeLists.txt +++ b/irobot_create_gz/irobot_create_gz_bringup/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.8) -project(irobot_create_ignition_bringup) +project(irobot_create_gz_bringup) if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") add_compile_options(-Wall -Wextra -Wpedantic) diff --git a/irobot_create_gz/irobot_create_gz_bringup/README.md b/irobot_create_gz/irobot_create_gz_bringup/README.md new file mode 100644 index 00000000..b6c9738f --- /dev/null +++ b/irobot_create_gz/irobot_create_gz_bringup/README.md @@ -0,0 +1 @@ +# turtlebot4_gz diff --git a/irobot_create_ignition/irobot_create_ignition_bringup/config/pose_republisher_params.yaml b/irobot_create_gz/irobot_create_gz_bringup/config/pose_republisher_params.yaml similarity index 100% rename from irobot_create_ignition/irobot_create_ignition_bringup/config/pose_republisher_params.yaml rename to irobot_create_gz/irobot_create_gz_bringup/config/pose_republisher_params.yaml diff --git a/irobot_create_ignition/irobot_create_ignition_bringup/config/sensors_params.yaml b/irobot_create_gz/irobot_create_gz_bringup/config/sensors_params.yaml similarity index 100% rename from irobot_create_ignition/irobot_create_ignition_bringup/config/sensors_params.yaml rename to irobot_create_gz/irobot_create_gz_bringup/config/sensors_params.yaml diff --git a/irobot_create_ignition/irobot_create_ignition_bringup/gui/create3/gui.config b/irobot_create_gz/irobot_create_gz_bringup/gui/create3/gui.config similarity index 100% rename from irobot_create_ignition/irobot_create_ignition_bringup/gui/create3/gui.config rename to irobot_create_gz/irobot_create_gz_bringup/gui/create3/gui.config diff --git a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition.launch.py b/irobot_create_gz/irobot_create_gz_bringup/launch/create3_ignition.launch.py similarity index 88% rename from irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition.launch.py rename to irobot_create_gz/irobot_create_gz_bringup/launch/create3_ignition.launch.py index b7baa641..cd6a965f 100644 --- a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition.launch.py +++ b/irobot_create_gz/irobot_create_gz_bringup/launch/create3_ignition.launch.py @@ -27,14 +27,14 @@ def generate_launch_description(): # Directories - pkg_irobot_create_ignition_bringup = get_package_share_directory( - 'irobot_create_ignition_bringup') + pkg_irobot_create_gz_bringup = get_package_share_directory( + 'irobot_create_gz_bringup') # Paths ignition_launch = PathJoinSubstitution( - [pkg_irobot_create_ignition_bringup, 'launch', 'ignition.launch.py']) + [pkg_irobot_create_gz_bringup, 'launch', 'ignition.launch.py']) robot_spawn_launch = PathJoinSubstitution( - [pkg_irobot_create_ignition_bringup, 'launch', 'create3_spawn.launch.py']) + [pkg_irobot_create_gz_bringup, 'launch', 'create3_spawn.launch.py']) ignition = IncludeLaunchDescription( PythonLaunchDescriptionSource([ignition_launch]), diff --git a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition_nodes.launch.py b/irobot_create_gz/irobot_create_gz_bringup/launch/create3_ignition_nodes.launch.py similarity index 82% rename from irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition_nodes.launch.py rename to irobot_create_gz/irobot_create_gz_bringup/launch/create3_ignition_nodes.launch.py index a2662d46..e0d72710 100644 --- a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ignition_nodes.launch.py +++ b/irobot_create_gz/irobot_create_gz_bringup/launch/create3_ignition_nodes.launch.py @@ -19,16 +19,16 @@ def generate_launch_description(): # Directories - pkg_create3_ignition_bringup = get_package_share_directory('irobot_create_ignition_bringup') + pkg_create3_gz_bringup = get_package_share_directory('irobot_create_gz_bringup') pose_republisher_params_yaml_file = PathJoinSubstitution( - [pkg_create3_ignition_bringup, 'config', 'pose_republisher_params.yaml']) + [pkg_create3_gz_bringup, 'config', 'pose_republisher_params.yaml']) sensors_params_yaml_file = PathJoinSubstitution( - [pkg_create3_ignition_bringup, 'config', 'sensors_params.yaml']) + [pkg_create3_gz_bringup, 'config', 'sensors_params.yaml']) # Pose republisher pose_republisher_node = Node( - package='irobot_create_ignition_toolbox', + package='irobot_create_gz_toolbox', name='pose_republisher_node', executable='pose_republisher_node', parameters=[pose_republisher_params_yaml_file, @@ -40,7 +40,7 @@ def generate_launch_description(): # Sensors sensors_node = Node( - package='irobot_create_ignition_toolbox', + package='irobot_create_gz_toolbox', name='sensors_node', executable='sensors_node', parameters=[sensors_params_yaml_file, @@ -50,7 +50,7 @@ def generate_launch_description(): # Interface buttons interface_buttons_node = Node( - package='irobot_create_ignition_toolbox', + package='irobot_create_gz_toolbox', name='interface_buttons_node', executable='interface_buttons_node', parameters=[{'use_sim_time': True}], diff --git a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ros_ignition_bridge.launch.py b/irobot_create_gz/irobot_create_gz_bringup/launch/create3_ros_ignition_bridge.launch.py similarity index 100% rename from irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_ros_ignition_bridge.launch.py rename to irobot_create_gz/irobot_create_gz_bringup/launch/create3_ros_ignition_bridge.launch.py diff --git a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_spawn.launch.py b/irobot_create_gz/irobot_create_gz_bringup/launch/create3_spawn.launch.py similarity index 93% rename from irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_spawn.launch.py rename to irobot_create_gz/irobot_create_gz_bringup/launch/create3_spawn.launch.py index 73cf5372..92bce524 100644 --- a/irobot_create_ignition/irobot_create_ignition_bringup/launch/create3_spawn.launch.py +++ b/irobot_create_gz/irobot_create_gz_bringup/launch/create3_spawn.launch.py @@ -43,16 +43,16 @@ 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_gz_bringup = get_package_share_directory( + 'irobot_create_gz_bringup') # Paths ros_gz_bridge_launch = PathJoinSubstitution( - [pkg_irobot_create_ignition_bringup, 'launch', 'create3_ros_ignition_bridge.launch.py']) + [pkg_irobot_create_gz_bringup, 'launch', 'create3_ros_gz_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']) + create3_gz_nodes_launch = PathJoinSubstitution( + [pkg_irobot_create_gz_bringup, 'launch', 'create3_gz_nodes.launch.py']) robot_description_launch = PathJoinSubstitution( [pkg_irobot_create_common_bringup, 'launch', 'robot_description.launch.py']) dock_description_launch = PathJoinSubstitution( @@ -141,7 +141,7 @@ def generate_launch_description(): # Create 3 Ignition nodes IncludeLaunchDescription( - PythonLaunchDescriptionSource([create3_ignition_nodes_launch]), + PythonLaunchDescriptionSource([create3_gz_nodes_launch]), launch_arguments=[ ('robot_name', robot_name), ('dock_name', dock_name), diff --git a/irobot_create_ignition/irobot_create_ignition_bringup/launch/ignition.launch.py b/irobot_create_gz/irobot_create_gz_bringup/launch/ignition.launch.py similarity index 86% rename from irobot_create_ignition/irobot_create_ignition_bringup/launch/ignition.launch.py rename to irobot_create_gz/irobot_create_gz_bringup/launch/ignition.launch.py index db4eac4d..d04771a6 100644 --- a/irobot_create_ignition/irobot_create_ignition_bringup/launch/ignition.launch.py +++ b/irobot_create_gz/irobot_create_gz_bringup/launch/ignition.launch.py @@ -27,19 +27,19 @@ def generate_launch_description(): # Directories - pkg_irobot_create_ignition_bringup = get_package_share_directory( - 'irobot_create_ignition_bringup') - #pkg_irobot_create_ignition_plugins = get_package_share_directory( - # 'irobot_create_ignition_plugins') + pkg_irobot_create_gz_bringup = get_package_share_directory( + 'irobot_create_gz_bringup') + #pkg_irobot_create_gz_plugins = get_package_share_directory( + # 'irobot_create_gz_plugins') pkg_irobot_create_description = get_package_share_directory( 'irobot_create_description') pkg_ros_gz_sim = get_package_share_directory( 'ros_gz_sim') # Set Ignition resource path - ign_resource_path = SetEnvironmentVariable(name='GZ_SIM_RESOURCE_PATH', + gz_resource_path = SetEnvironmentVariable(name='GZ_SIM_RESOURCE_PATH', value=[os.path.join( - pkg_irobot_create_ignition_bringup, + pkg_irobot_create_gz_bringup, 'worlds'), ':' + str(Path( pkg_irobot_create_description). @@ -47,7 +47,7 @@ def generate_launch_description(): #gz_gui_plugin_path = SetEnvironmentVariable(name='GZ_GUI_PLUGIN_PATH', # value=[os.path.join( - # pkg_irobot_create_ignition_plugins, + # pkg_irobot_create_gz_plugins, # 'lib')]) # Paths @@ -58,11 +58,11 @@ def generate_launch_description(): ignition_gazebo = IncludeLaunchDescription( PythonLaunchDescriptionSource([gz_sim_launch]), launch_arguments=[ - ('ign_args', [LaunchConfiguration('world'), + ('gz_args', [LaunchConfiguration('world'), '.sdf', ' -v 4', ' --gui-config ', - PathJoinSubstitution([pkg_irobot_create_ignition_bringup, + PathJoinSubstitution([pkg_irobot_create_gz_bringup, 'gui', 'create3', 'gui.config'])]) ] ) @@ -77,7 +77,7 @@ def generate_launch_description(): # Create launch description and add actions ld = LaunchDescription(ARGUMENTS) - ld.add_action(ign_resource_path) + ld.add_action(gz_resource_path) #ld.add_action(gz_gui_plugin_path) ld.add_action(ignition_gazebo) ld.add_action(clock_bridge) diff --git a/irobot_create_ignition/irobot_create_ignition_bringup/package.xml b/irobot_create_gz/irobot_create_gz_bringup/package.xml similarity index 93% rename from irobot_create_ignition/irobot_create_ignition_bringup/package.xml rename to irobot_create_gz/irobot_create_gz_bringup/package.xml index a54a7455..c035a30a 100644 --- a/irobot_create_ignition/irobot_create_ignition_bringup/package.xml +++ b/irobot_create_gz/irobot_create_gz_bringup/package.xml @@ -1,7 +1,7 @@ - irobot_create_ignition_bringup + irobot_create_gz_bringup 2.1.0 Provides launch and configuration scripts for a Ignition simulated iRobot(R) Create(R) 3 Educational Robot. rkreinin @@ -14,7 +14,7 @@ irobot_create_description irobot_create_common_bringup - irobot_create_ignition_toolbox + irobot_create_gz_toolbox gz_ros2_control diff --git a/irobot_create_ignition/irobot_create_ignition_bringup/worlds/depot.sdf b/irobot_create_gz/irobot_create_gz_bringup/worlds/depot.sdf similarity index 100% rename from irobot_create_ignition/irobot_create_ignition_bringup/worlds/depot.sdf rename to irobot_create_gz/irobot_create_gz_bringup/worlds/depot.sdf diff --git a/irobot_create_ignition/irobot_create_ignition_bringup/worlds/maze.sdf b/irobot_create_gz/irobot_create_gz_bringup/worlds/maze.sdf similarity index 100% rename from irobot_create_ignition/irobot_create_ignition_bringup/worlds/maze.sdf rename to irobot_create_gz/irobot_create_gz_bringup/worlds/maze.sdf diff --git a/irobot_create_ignition/irobot_create_ignition_plugins/CHANGELOG.rst b/irobot_create_gz/irobot_create_gz_plugins/CHANGELOG.rst similarity index 89% rename from irobot_create_ignition/irobot_create_ignition_plugins/CHANGELOG.rst rename to irobot_create_gz/irobot_create_gz_plugins/CHANGELOG.rst index 13049f08..39226262 100644 --- a/irobot_create_ignition/irobot_create_ignition_plugins/CHANGELOG.rst +++ b/irobot_create_gz/irobot_create_gz_plugins/CHANGELOG.rst @@ -1,5 +1,5 @@ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Changelog for package irobot_create_ignition_plugins +Changelog for package irobot_create_gz_plugins ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2.1.0 (2023-05-15) @@ -12,7 +12,7 @@ Changelog for package irobot_create_ignition_plugins * Update to ROS 2 Humble (`#197 `_) * Update message names to https://github.com/iRobotEducation/irobot_create_msgs/pull/10 * rename dock topic into dock_status - * comment ign_ros2_control dependency as it must be built from sources + * comment gz_ros2_control dependency as it must be built from sources Co-authored-by: Francisco Martín Rico * add missing dependency to irobot-create-common-bringup (`#186 `_) * Contributors: Alberto Soragna, Francisco Martín Rico @@ -37,14 +37,14 @@ Changelog for package irobot_create_ignition_plugins Cleaned up gazebo launch arg Adjusted front caster position * Simulation -> simulator - * Added irobot_create_ignition packages + * Added irobot_create_gz packages * Fixed some linter warnings - * Removed joint state publisher from ros_ign_bridge + * Removed joint state publisher from ros_gz_bridge * - Reorganized packages - Shifted center of gravity of create3 forwards by 22.8 mm - Added min/max velocity and acceleration to diff drive plugin * Moved README.md to irobot_create_gazebo - Created new README.md for irobot_create_ignition + Created new README.md for irobot_create_gz * Update README.md * Added ignition edifice repos for source installation * Create README.md @@ -55,7 +55,7 @@ Changelog for package irobot_create_ignition_plugins * Updated README to have installation and example instructions for both Ignition and Classic Moved .repos files to the root of the repository * Ignition and Gazebo packages are now optional and only built if the required dependencies are installed - * Made ros_ign_interfaces optional in irobot_create_ignition_bringup + * Made ros_gz_interfaces optional in irobot_create_gz_bringup * fix license and minor changes to CMake and README * Interface buttons mock publisher not used in Ignition sim * Fixed linter errors diff --git a/irobot_create_ignition/irobot_create_ignition_plugins/CMakeLists.txt b/irobot_create_gz/irobot_create_gz_plugins/CMakeLists.txt similarity index 92% rename from irobot_create_ignition/irobot_create_ignition_plugins/CMakeLists.txt rename to irobot_create_gz/irobot_create_gz_plugins/CMakeLists.txt index ffe03a8e..ea49328d 100644 --- a/irobot_create_ignition/irobot_create_ignition_plugins/CMakeLists.txt +++ b/irobot_create_gz/irobot_create_gz_plugins/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.8) -project(irobot_create_ignition_plugins) +project(irobot_create_gz_plugins) if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang") add_compile_options(-Wall -Wextra -Wpedantic) diff --git a/irobot_create_ignition/irobot_create_ignition_plugins/Create3Hmi/CMakeLists.txt b/irobot_create_gz/irobot_create_gz_plugins/Create3Hmi/CMakeLists.txt similarity index 100% rename from irobot_create_ignition/irobot_create_ignition_plugins/Create3Hmi/CMakeLists.txt rename to irobot_create_gz/irobot_create_gz_plugins/Create3Hmi/CMakeLists.txt diff --git a/irobot_create_ignition/irobot_create_ignition_plugins/Create3Hmi/Create3Hmi.cc b/irobot_create_gz/irobot_create_gz_plugins/Create3Hmi/Create3Hmi.cc similarity index 100% rename from irobot_create_ignition/irobot_create_ignition_plugins/Create3Hmi/Create3Hmi.cc rename to irobot_create_gz/irobot_create_gz_plugins/Create3Hmi/Create3Hmi.cc diff --git a/irobot_create_ignition/irobot_create_ignition_plugins/Create3Hmi/Create3Hmi.config b/irobot_create_gz/irobot_create_gz_plugins/Create3Hmi/Create3Hmi.config similarity index 100% rename from irobot_create_ignition/irobot_create_ignition_plugins/Create3Hmi/Create3Hmi.config rename to irobot_create_gz/irobot_create_gz_plugins/Create3Hmi/Create3Hmi.config diff --git a/irobot_create_ignition/irobot_create_ignition_plugins/Create3Hmi/Create3Hmi.hh b/irobot_create_gz/irobot_create_gz_plugins/Create3Hmi/Create3Hmi.hh similarity index 84% rename from irobot_create_ignition/irobot_create_ignition_plugins/Create3Hmi/Create3Hmi.hh rename to irobot_create_gz/irobot_create_gz_plugins/Create3Hmi/Create3Hmi.hh index 86b8d368..c9a4578b 100644 --- a/irobot_create_ignition/irobot_create_ignition_plugins/Create3Hmi/Create3Hmi.hh +++ b/irobot_create_gz/irobot_create_gz_plugins/Create3Hmi/Create3Hmi.hh @@ -3,8 +3,8 @@ * @author Roni Kreinin (rkreinin@clearpathrobotics.com) */ -#ifndef IROBOT_CREATE_IGNITION__IROBOT_CREATE_IGNITION_PLUGINS__CREATE3HMI__CREATE3HMI_HH_ -#define IROBOT_CREATE_IGNITION__IROBOT_CREATE_IGNITION_PLUGINS__CREATE3HMI__CREATE3HMI_HH_ +#ifndef IROBOT_CREATE_GZ__IROBOT_CREATE_GZ_PLUGINS__CREATE3HMI__CREATE3HMI_HH_ +#define IROBOT_CREATE_GZ__IROBOT_CREATE_GZ_PLUGINS__CREATE3HMI__CREATE3HMI_HH_ #include @@ -70,4 +70,4 @@ private: } // namespace ignition -#endif // IROBOT_CREATE_IGNITION__IROBOT_CREATE_IGNITION_PLUGINS__CREATE3HMI__CREATE3HMI_HH_ +#endif // IROBOT_CREATE_GZ__IROBOT_CREATE_GZ_PLUGINS__CREATE3HMI__CREATE3HMI_HH_ diff --git a/irobot_create_ignition/irobot_create_ignition_plugins/Create3Hmi/Create3Hmi.qml b/irobot_create_gz/irobot_create_gz_plugins/Create3Hmi/Create3Hmi.qml similarity index 100% rename from irobot_create_ignition/irobot_create_ignition_plugins/Create3Hmi/Create3Hmi.qml rename to irobot_create_gz/irobot_create_gz_plugins/Create3Hmi/Create3Hmi.qml diff --git a/irobot_create_ignition/irobot_create_ignition_plugins/Create3Hmi/Create3Hmi.qrc b/irobot_create_gz/irobot_create_gz_plugins/Create3Hmi/Create3Hmi.qrc similarity index 100% rename from irobot_create_ignition/irobot_create_ignition_plugins/Create3Hmi/Create3Hmi.qrc rename to irobot_create_gz/irobot_create_gz_plugins/Create3Hmi/Create3Hmi.qrc diff --git a/irobot_create_ignition/irobot_create_ignition_plugins/Create3Hmi/images/One Dot.png b/irobot_create_gz/irobot_create_gz_plugins/Create3Hmi/images/One Dot.png similarity index 100% rename from irobot_create_ignition/irobot_create_ignition_plugins/Create3Hmi/images/One Dot.png rename to irobot_create_gz/irobot_create_gz_plugins/Create3Hmi/images/One Dot.png diff --git a/irobot_create_ignition/irobot_create_ignition_plugins/Create3Hmi/images/Power.png b/irobot_create_gz/irobot_create_gz_plugins/Create3Hmi/images/Power.png similarity index 100% rename from irobot_create_ignition/irobot_create_ignition_plugins/Create3Hmi/images/Power.png rename to irobot_create_gz/irobot_create_gz_plugins/Create3Hmi/images/Power.png diff --git a/irobot_create_ignition/irobot_create_ignition_plugins/Create3Hmi/images/Two Dots.png b/irobot_create_gz/irobot_create_gz_plugins/Create3Hmi/images/Two Dots.png similarity index 100% rename from irobot_create_ignition/irobot_create_ignition_plugins/Create3Hmi/images/Two Dots.png rename to irobot_create_gz/irobot_create_gz_plugins/Create3Hmi/images/Two Dots.png diff --git a/irobot_create_gz/irobot_create_gz_plugins/README.md b/irobot_create_gz/irobot_create_gz_plugins/README.md new file mode 100644 index 00000000..4a997f30 --- /dev/null +++ b/irobot_create_gz/irobot_create_gz_plugins/README.md @@ -0,0 +1 @@ +# turtlebot4_gz_gui_plugins diff --git a/irobot_create_ignition/irobot_create_ignition_plugins/package.xml b/irobot_create_gz/irobot_create_gz_plugins/package.xml similarity index 95% rename from irobot_create_ignition/irobot_create_ignition_plugins/package.xml rename to irobot_create_gz/irobot_create_gz_plugins/package.xml index d96a6ebb..bd3c3d2a 100644 --- a/irobot_create_ignition/irobot_create_ignition_plugins/package.xml +++ b/irobot_create_gz/irobot_create_gz_plugins/package.xml @@ -1,7 +1,7 @@ - irobot_create_ignition_plugins + irobot_create_gz_plugins 2.1.0 Ignition plugins for simulated iRobot(R) Create(R) 3 Educational Robot. rkreinin diff --git a/irobot_create_ignition/irobot_create_ignition_sim/CHANGELOG.rst b/irobot_create_gz/irobot_create_gz_sim/CHANGELOG.rst similarity index 91% rename from irobot_create_ignition/irobot_create_ignition_sim/CHANGELOG.rst rename to irobot_create_gz/irobot_create_gz_sim/CHANGELOG.rst index bfc2aec9..65e35dcf 100644 --- a/irobot_create_ignition/irobot_create_ignition_sim/CHANGELOG.rst +++ b/irobot_create_gz/irobot_create_gz_sim/CHANGELOG.rst @@ -1,5 +1,5 @@ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Changelog for package irobot_create_ignition_sim +Changelog for package irobot_create_gz_sim ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2.1.0 (2023-05-15) @@ -37,14 +37,14 @@ Changelog for package irobot_create_ignition_sim Cleaned up gazebo launch arg Adjusted front caster position * Simulation -> simulator - * Added irobot_create_ignition packages + * Added irobot_create_gz packages * Fixed some linter warnings - * Removed joint state publisher from ros_ign_bridge + * Removed joint state publisher from ros_gz_bridge * - Reorganized packages - Shifted center of gravity of create3 forwards by 22.8 mm - Added min/max velocity and acceleration to diff drive plugin * Moved README.md to irobot_create_gazebo - Created new README.md for irobot_create_ignition + Created new README.md for irobot_create_gz * Update README.md * Added ignition edifice repos for source installation * Create README.md @@ -55,7 +55,7 @@ Changelog for package irobot_create_ignition_sim * Updated README to have installation and example instructions for both Ignition and Classic Moved .repos files to the root of the repository * Ignition and Gazebo packages are now optional and only built if the required dependencies are installed - * Made ros_ign_interfaces optional in irobot_create_ignition_bringup + * Made ros_gz_interfaces optional in irobot_create_gz_bringup * fix license and minor changes to CMake and README * Interface buttons mock publisher not used in Ignition sim * Fixed linter errors diff --git a/irobot_create_ignition/irobot_create_ignition_sim/CMakeLists.txt b/irobot_create_gz/irobot_create_gz_sim/CMakeLists.txt similarity index 70% rename from irobot_create_ignition/irobot_create_ignition_sim/CMakeLists.txt rename to irobot_create_gz/irobot_create_gz_sim/CMakeLists.txt index c335d84d..8cb53b49 100644 --- a/irobot_create_ignition/irobot_create_ignition_sim/CMakeLists.txt +++ b/irobot_create_gz/irobot_create_gz_sim/CMakeLists.txt @@ -1,4 +1,4 @@ cmake_minimum_required(VERSION 3.5) -project(irobot_create_ignition_sim) +project(irobot_create_gz_sim) find_package(ament_cmake REQUIRED) ament_package() diff --git a/irobot_create_ignition/irobot_create_ignition_sim/package.xml b/irobot_create_gz/irobot_create_gz_sim/package.xml similarity index 71% rename from irobot_create_ignition/irobot_create_ignition_sim/package.xml rename to irobot_create_gz/irobot_create_gz_sim/package.xml index 33d71b9d..838868dc 100644 --- a/irobot_create_ignition/irobot_create_ignition_sim/package.xml +++ b/irobot_create_gz/irobot_create_gz_sim/package.xml @@ -1,7 +1,7 @@ - irobot_create_ignition_sim + irobot_create_gz_sim 2.1.0 Metapackage for the iRobot(R) Create(R) 3 robot Ignition simulator @@ -13,9 +13,9 @@ ament_cmake - irobot_create_ignition_bringup - irobot_create_ignition_plugins - irobot_create_ignition_toolbox + irobot_create_gz_bringup + irobot_create_gz_plugins + irobot_create_gz_toolbox ament_cmake diff --git a/irobot_create_ignition/irobot_create_ignition_toolbox/CHANGELOG.rst b/irobot_create_gz/irobot_create_gz_toolbox/CHANGELOG.rst similarity index 90% rename from irobot_create_ignition/irobot_create_ignition_toolbox/CHANGELOG.rst rename to irobot_create_gz/irobot_create_gz_toolbox/CHANGELOG.rst index dfa501cd..2cf5b712 100644 --- a/irobot_create_ignition/irobot_create_ignition_toolbox/CHANGELOG.rst +++ b/irobot_create_gz/irobot_create_gz_toolbox/CHANGELOG.rst @@ -1,5 +1,5 @@ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Changelog for package irobot_create_ignition_toolbox +Changelog for package irobot_create_gz_toolbox ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2.1.0 (2023-05-15) @@ -12,12 +12,12 @@ Changelog for package irobot_create_ignition_toolbox * Update to ROS 2 Humble (`#197 `_) * Update message names to https://github.com/iRobotEducation/irobot_create_msgs/pull/10 * rename dock topic into dock_status - * comment ign_ros2_control dependency as it must be built from sources + * comment gz_ros2_control dependency as it must be built from sources Co-authored-by: Francisco Martín Rico * add missing dependency to irobot-create-common-bringup (`#186 `_) * Renamed Ignition Toolbox libraries (`#178 `_) * Renamed Ignition Toolbox libraries - * Pre-pend library names with irobot_create_ignition + * Pre-pend library names with irobot_create_gz * Contributors: Alberto Soragna, Francisco Martín Rico, roni-kreinin 1.0.1 (2022-04-12) @@ -51,14 +51,14 @@ Changelog for package irobot_create_ignition_toolbox Cleaned up gazebo launch arg Adjusted front caster position * Simulation -> simulator - * Added irobot_create_ignition packages + * Added irobot_create_gz packages * Fixed some linter warnings - * Removed joint state publisher from ros_ign_bridge + * Removed joint state publisher from ros_gz_bridge * - Reorganized packages - Shifted center of gravity of create3 forwards by 22.8 mm - Added min/max velocity and acceleration to diff drive plugin * Moved README.md to irobot_create_gazebo - Created new README.md for irobot_create_ignition + Created new README.md for irobot_create_gz * Update README.md * Added ignition edifice repos for source installation * Create README.md @@ -69,7 +69,7 @@ Changelog for package irobot_create_ignition_toolbox * Updated README to have installation and example instructions for both Ignition and Classic Moved .repos files to the root of the repository * Ignition and Gazebo packages are now optional and only built if the required dependencies are installed - * Made ros_ign_interfaces optional in irobot_create_ignition_bringup + * Made ros_gz_interfaces optional in irobot_create_gz_bringup * fix license and minor changes to CMake and README * Interface buttons mock publisher not used in Ignition sim * Fixed linter errors diff --git a/irobot_create_ignition/irobot_create_ignition_toolbox/CMakeLists.txt b/irobot_create_gz/irobot_create_gz_toolbox/CMakeLists.txt similarity index 70% rename from irobot_create_ignition/irobot_create_ignition_toolbox/CMakeLists.txt rename to irobot_create_gz/irobot_create_gz_toolbox/CMakeLists.txt index 4765a1b3..a279bf7a 100644 --- a/irobot_create_ignition/irobot_create_ignition_toolbox/CMakeLists.txt +++ b/irobot_create_gz/irobot_create_gz_toolbox/CMakeLists.txt @@ -1,5 +1,5 @@ cmake_minimum_required(VERSION 3.5) -project(irobot_create_ignition_toolbox) +project(irobot_create_gz_toolbox) # Default to C99 if(NOT CMAKE_C_STANDARD) @@ -55,21 +55,21 @@ set(dependencies ) # Pose republisher -add_library(irobot_create_ignition_pose_republisher_lib SHARED) +add_library(irobot_create_gz_pose_republisher_lib SHARED) target_sources( - irobot_create_ignition_pose_republisher_lib + irobot_create_gz_pose_republisher_lib PRIVATE src/pose_republisher/pose_republisher_node.cpp ) -target_include_directories(irobot_create_ignition_pose_republisher_lib PUBLIC include) -ament_target_dependencies(irobot_create_ignition_pose_republisher_lib +target_include_directories(irobot_create_gz_pose_republisher_lib PUBLIC include) +ament_target_dependencies(irobot_create_gz_pose_republisher_lib ${dependencies} ) # Sensors -add_library(irobot_create_ignition_sensors_lib SHARED) +add_library(irobot_create_gz_sensors_lib SHARED) target_sources( - irobot_create_ignition_sensors_lib + irobot_create_gz_sensors_lib PRIVATE src/sensors/sensors_node.cpp src/sensors/bumper.cpp @@ -79,27 +79,27 @@ target_sources( src/sensors/mouse.cpp src/sensors/wheel_drop.cpp ) -target_include_directories(irobot_create_ignition_sensors_lib PUBLIC include) -ament_target_dependencies(irobot_create_ignition_sensors_lib +target_include_directories(irobot_create_gz_sensors_lib PUBLIC include) +ament_target_dependencies(irobot_create_gz_sensors_lib ${dependencies} ) # Interface buttons -add_library(irobot_create_ignition_interface_buttons_lib SHARED) +add_library(irobot_create_gz_interface_buttons_lib SHARED) target_sources( - irobot_create_ignition_interface_buttons_lib + irobot_create_gz_interface_buttons_lib PRIVATE src/interface_buttons/interface_buttons_node.cpp ) -target_include_directories(irobot_create_ignition_interface_buttons_lib PUBLIC include) -ament_target_dependencies(irobot_create_ignition_interface_buttons_lib +target_include_directories(irobot_create_gz_interface_buttons_lib PUBLIC include) +ament_target_dependencies(irobot_create_gz_interface_buttons_lib ${dependencies} ) set(libraries_names - irobot_create_ignition_pose_republisher_lib - irobot_create_ignition_sensors_lib - irobot_create_ignition_interface_buttons_lib + irobot_create_gz_pose_republisher_lib + irobot_create_gz_sensors_lib + irobot_create_gz_interface_buttons_lib ) # Executables @@ -111,7 +111,7 @@ target_sources( PRIVATE src/pose_republisher/pose_republisher_main.cpp ) -target_link_libraries(pose_republisher_node irobot_create_ignition_pose_republisher_lib) +target_link_libraries(pose_republisher_node irobot_create_gz_pose_republisher_lib) # Sensors node add_executable(sensors_node) @@ -120,7 +120,7 @@ target_sources( PRIVATE src/sensors/sensors_main.cpp ) -target_link_libraries(sensors_node irobot_create_ignition_sensors_lib) +target_link_libraries(sensors_node irobot_create_gz_sensors_lib) # Interface buttons node add_executable(interface_buttons_node) @@ -129,7 +129,7 @@ target_sources( PRIVATE src/interface_buttons/interface_buttons_main.cpp ) -target_link_libraries(interface_buttons_node irobot_create_ignition_interface_buttons_lib) +target_link_libraries(interface_buttons_node irobot_create_gz_interface_buttons_lib) set(executables_names pose_republisher_node diff --git a/irobot_create_ignition/irobot_create_ignition_toolbox/include/irobot_create_ignition_toolbox/interface_buttons/interface_buttons_node.hpp b/irobot_create_gz/irobot_create_gz_toolbox/include/irobot_create_ignition_toolbox/interface_buttons/interface_buttons_node.hpp similarity index 70% rename from irobot_create_ignition/irobot_create_ignition_toolbox/include/irobot_create_ignition_toolbox/interface_buttons/interface_buttons_node.hpp rename to irobot_create_gz/irobot_create_gz_toolbox/include/irobot_create_ignition_toolbox/interface_buttons/interface_buttons_node.hpp index a5c8eeb3..411cd565 100644 --- a/irobot_create_ignition/irobot_create_ignition_toolbox/include/irobot_create_ignition_toolbox/interface_buttons/interface_buttons_node.hpp +++ b/irobot_create_gz/irobot_create_gz_toolbox/include/irobot_create_ignition_toolbox/interface_buttons/interface_buttons_node.hpp @@ -3,8 +3,8 @@ * @author Roni Kreinin (rkreinin@clearpathrobotics.com) */ -#ifndef IROBOT_CREATE_IGNITION_TOOLBOX__INTERFACE_BUTTONS__INTERFACE_BUTTONS_NODE_HPP_ -#define IROBOT_CREATE_IGNITION_TOOLBOX__INTERFACE_BUTTONS__INTERFACE_BUTTONS_NODE_HPP_ +#ifndef IROBOT_CREATE_GZ_TOOLBOX__INTERFACE_BUTTONS__INTERFACE_BUTTONS_NODE_HPP_ +#define IROBOT_CREATE_GZ_TOOLBOX__INTERFACE_BUTTONS__INTERFACE_BUTTONS_NODE_HPP_ #include #include @@ -15,7 +15,7 @@ #include "rclcpp/rclcpp.hpp" #include "std_msgs/msg/int32.hpp" -namespace irobot_create_ignition_toolbox +namespace irobot_create_gz_toolbox { enum Create3Buttons @@ -41,6 +41,6 @@ class InterfaceButtons : public rclcpp::Node std::unique_ptr interface_buttons_; }; -} // namespace irobot_create_ignition_toolbox +} // namespace irobot_create_gz_toolbox -#endif // IROBOT_CREATE_IGNITION_TOOLBOX__INTERFACE_BUTTONS__INTERFACE_BUTTONS_NODE_HPP_ +#endif // IROBOT_CREATE_GZ_TOOLBOX__INTERFACE_BUTTONS__INTERFACE_BUTTONS_NODE_HPP_ diff --git a/irobot_create_ignition/irobot_create_ignition_toolbox/include/irobot_create_ignition_toolbox/pose_republisher/pose_republisher.hpp b/irobot_create_gz/irobot_create_gz_toolbox/include/irobot_create_ignition_toolbox/pose_republisher/pose_republisher.hpp similarity index 81% rename from irobot_create_ignition/irobot_create_ignition_toolbox/include/irobot_create_ignition_toolbox/pose_republisher/pose_republisher.hpp rename to irobot_create_gz/irobot_create_gz_toolbox/include/irobot_create_ignition_toolbox/pose_republisher/pose_republisher.hpp index e92594e6..cf1ed8c9 100644 --- a/irobot_create_ignition/irobot_create_ignition_toolbox/include/irobot_create_ignition_toolbox/pose_republisher/pose_republisher.hpp +++ b/irobot_create_gz/irobot_create_gz_toolbox/include/irobot_create_ignition_toolbox/pose_republisher/pose_republisher.hpp @@ -3,20 +3,20 @@ * @author Roni Kreinin (rkreinin@clearpathrobotics.com) */ -#ifndef IROBOT_CREATE_IGNITION_TOOLBOX__POSE_REPUBLISHER__POSE_REPUBLISHER_HPP_ -#define IROBOT_CREATE_IGNITION_TOOLBOX__POSE_REPUBLISHER__POSE_REPUBLISHER_HPP_ +#ifndef IROBOT_CREATE_GZ_TOOLBOX__POSE_REPUBLISHER__POSE_REPUBLISHER_HPP_ +#define IROBOT_CREATE_GZ_TOOLBOX__POSE_REPUBLISHER__POSE_REPUBLISHER_HPP_ #include #include "control_msgs/msg/dynamic_joint_state.hpp" -#include "irobot_create_ignition_toolbox/utils.hpp" +#include "irobot_create_gz_toolbox/utils.hpp" #include "nav_msgs/msg/odometry.hpp" #include "rclcpp/rclcpp.hpp" #include "sensor_msgs/msg/joint_state.hpp" #include "tf2_msgs/msg/tf_message.hpp" #include "tf2_geometry_msgs/tf2_geometry_msgs.hpp" -namespace irobot_create_ignition_toolbox +namespace irobot_create_gz_toolbox { class PoseRepublisher : public rclcpp::Node @@ -50,6 +50,6 @@ class PoseRepublisher : public rclcpp::Node std::string wheel_joints_[2]; }; -} // namespace irobot_create_ignition_toolbox +} // namespace irobot_create_gz_toolbox -#endif // IROBOT_CREATE_IGNITION_TOOLBOX__POSE_REPUBLISHER__POSE_REPUBLISHER_HPP_ +#endif // IROBOT_CREATE_GZ_TOOLBOX__POSE_REPUBLISHER__POSE_REPUBLISHER_HPP_ diff --git a/irobot_create_ignition/irobot_create_ignition_toolbox/include/irobot_create_ignition_toolbox/sensors/bumper.hpp b/irobot_create_gz/irobot_create_gz_toolbox/include/irobot_create_ignition_toolbox/sensors/bumper.hpp similarity index 79% rename from irobot_create_ignition/irobot_create_ignition_toolbox/include/irobot_create_ignition_toolbox/sensors/bumper.hpp rename to irobot_create_gz/irobot_create_gz_toolbox/include/irobot_create_ignition_toolbox/sensors/bumper.hpp index 08165cee..08fa57e8 100644 --- a/irobot_create_ignition/irobot_create_ignition_toolbox/include/irobot_create_ignition_toolbox/sensors/bumper.hpp +++ b/irobot_create_gz/irobot_create_gz_toolbox/include/irobot_create_ignition_toolbox/sensors/bumper.hpp @@ -3,8 +3,8 @@ * @author Roni Kreinin (rkreinin@clearpathrobotics.com) */ -#ifndef IROBOT_CREATE_IGNITION_TOOLBOX__SENSORS__BUMPER_HPP_ -#define IROBOT_CREATE_IGNITION_TOOLBOX__SENSORS__BUMPER_HPP_ +#ifndef IROBOT_CREATE_GZ_TOOLBOX__SENSORS__BUMPER_HPP_ +#define IROBOT_CREATE_GZ_TOOLBOX__SENSORS__BUMPER_HPP_ #include #include @@ -17,7 +17,7 @@ #include "ros_gz_interfaces/msg/contacts.hpp" #include "tf2_geometry_msgs/tf2_geometry_msgs.hpp" -namespace irobot_create_ignition_toolbox +namespace irobot_create_gz_toolbox { class Bumper @@ -40,6 +40,6 @@ class Bumper std::mutex robot_pose_mutex_; }; -} // namespace irobot_create_ignition_toolbox +} // namespace irobot_create_gz_toolbox -#endif // IROBOT_CREATE_IGNITION_TOOLBOX__SENSORS__BUMPER_HPP_ +#endif // IROBOT_CREATE_GZ_TOOLBOX__SENSORS__BUMPER_HPP_ diff --git a/irobot_create_ignition/irobot_create_ignition_toolbox/include/irobot_create_ignition_toolbox/sensors/cliff.hpp b/irobot_create_gz/irobot_create_gz_toolbox/include/irobot_create_ignition_toolbox/sensors/cliff.hpp similarity index 76% rename from irobot_create_ignition/irobot_create_ignition_toolbox/include/irobot_create_ignition_toolbox/sensors/cliff.hpp rename to irobot_create_gz/irobot_create_gz_toolbox/include/irobot_create_ignition_toolbox/sensors/cliff.hpp index f9efde11..eb138af8 100644 --- a/irobot_create_ignition/irobot_create_ignition_toolbox/include/irobot_create_ignition_toolbox/sensors/cliff.hpp +++ b/irobot_create_gz/irobot_create_gz_toolbox/include/irobot_create_ignition_toolbox/sensors/cliff.hpp @@ -3,8 +3,8 @@ * @author Roni Kreinin (rkreinin@clearpathrobotics.com) */ -#ifndef IROBOT_CREATE_IGNITION_TOOLBOX__SENSORS__CLIFF_HPP_ -#define IROBOT_CREATE_IGNITION_TOOLBOX__SENSORS__CLIFF_HPP_ +#ifndef IROBOT_CREATE_GZ_TOOLBOX__SENSORS__CLIFF_HPP_ +#define IROBOT_CREATE_GZ_TOOLBOX__SENSORS__CLIFF_HPP_ #include #include @@ -15,7 +15,7 @@ #include "rclcpp/rclcpp.hpp" #include "sensor_msgs/msg/laser_scan.hpp" -namespace irobot_create_ignition_toolbox +namespace irobot_create_gz_toolbox { class Cliff @@ -44,6 +44,6 @@ class Cliff std::string cliff_sensors_[4]; }; -} // namespace irobot_create_ignition_toolbox +} // namespace irobot_create_gz_toolbox -#endif // IROBOT_CREATE_IGNITION_TOOLBOX__SENSORS__CLIFF_HPP_ +#endif // IROBOT_CREATE_GZ_TOOLBOX__SENSORS__CLIFF_HPP_ diff --git a/irobot_create_ignition/irobot_create_ignition_toolbox/include/irobot_create_ignition_toolbox/sensors/ir_intensity.hpp b/irobot_create_gz/irobot_create_gz_toolbox/include/irobot_create_ignition_toolbox/sensors/ir_intensity.hpp similarity index 73% rename from irobot_create_ignition/irobot_create_ignition_toolbox/include/irobot_create_ignition_toolbox/sensors/ir_intensity.hpp rename to irobot_create_gz/irobot_create_gz_toolbox/include/irobot_create_ignition_toolbox/sensors/ir_intensity.hpp index 370cca67..056a9642 100644 --- a/irobot_create_ignition/irobot_create_ignition_toolbox/include/irobot_create_ignition_toolbox/sensors/ir_intensity.hpp +++ b/irobot_create_gz/irobot_create_gz_toolbox/include/irobot_create_ignition_toolbox/sensors/ir_intensity.hpp @@ -3,8 +3,8 @@ * @author Roni Kreinin (rkreinin@clearpathrobotics.com) */ -#ifndef IROBOT_CREATE_IGNITION_TOOLBOX__SENSORS__IR_INTENSITY_HPP_ -#define IROBOT_CREATE_IGNITION_TOOLBOX__SENSORS__IR_INTENSITY_HPP_ +#ifndef IROBOT_CREATE_GZ_TOOLBOX__SENSORS__IR_INTENSITY_HPP_ +#define IROBOT_CREATE_GZ_TOOLBOX__SENSORS__IR_INTENSITY_HPP_ #include #include @@ -15,7 +15,7 @@ #include "rclcpp/rclcpp.hpp" #include "sensor_msgs/msg/laser_scan.hpp" -namespace irobot_create_ignition_toolbox +namespace irobot_create_gz_toolbox { class IrIntensity @@ -36,6 +36,6 @@ class IrIntensity std::string ir_intensity_sensors_[7]; }; -} // namespace irobot_create_ignition_toolbox +} // namespace irobot_create_gz_toolbox -#endif // IROBOT_CREATE_IGNITION_TOOLBOX__SENSORS__IR_INTENSITY_HPP_ +#endif // IROBOT_CREATE_GZ_TOOLBOX__SENSORS__IR_INTENSITY_HPP_ diff --git a/irobot_create_ignition/irobot_create_ignition_toolbox/include/irobot_create_ignition_toolbox/sensors/ir_opcode.hpp b/irobot_create_gz/irobot_create_gz_toolbox/include/irobot_create_ignition_toolbox/sensors/ir_opcode.hpp similarity index 89% rename from irobot_create_ignition/irobot_create_ignition_toolbox/include/irobot_create_ignition_toolbox/sensors/ir_opcode.hpp rename to irobot_create_gz/irobot_create_gz_toolbox/include/irobot_create_ignition_toolbox/sensors/ir_opcode.hpp index d12293e6..f9e8c667 100644 --- a/irobot_create_ignition/irobot_create_ignition_toolbox/include/irobot_create_ignition_toolbox/sensors/ir_opcode.hpp +++ b/irobot_create_gz/irobot_create_gz_toolbox/include/irobot_create_ignition_toolbox/sensors/ir_opcode.hpp @@ -3,8 +3,8 @@ * @author Roni Kreinin (rkreinin@clearpathrobotics.com) */ -#ifndef IROBOT_CREATE_IGNITION_TOOLBOX__SENSORS__IR_OPCODE_HPP_ -#define IROBOT_CREATE_IGNITION_TOOLBOX__SENSORS__IR_OPCODE_HPP_ +#ifndef IROBOT_CREATE_GZ_TOOLBOX__SENSORS__IR_OPCODE_HPP_ +#define IROBOT_CREATE_GZ_TOOLBOX__SENSORS__IR_OPCODE_HPP_ #include #include @@ -15,10 +15,10 @@ #include "rclcpp/rclcpp.hpp" #include "tf2_geometry_msgs/tf2_geometry_msgs.hpp" -#include "irobot_create_ignition_toolbox/utils.hpp" +#include "irobot_create_gz_toolbox/utils.hpp" #include "irobot_create_toolbox/polar_coordinates.hpp" -namespace irobot_create_ignition_toolbox +namespace irobot_create_gz_toolbox { class IrOpcode @@ -93,6 +93,6 @@ class IrOpcode bool is_dock_visible_ = false; }; -} // namespace irobot_create_ignition_toolbox +} // namespace irobot_create_gz_toolbox -#endif // IROBOT_CREATE_IGNITION_TOOLBOX__SENSORS__IR_OPCODE_HPP_ +#endif // IROBOT_CREATE_GZ_TOOLBOX__SENSORS__IR_OPCODE_HPP_ diff --git a/irobot_create_ignition/irobot_create_ignition_toolbox/include/irobot_create_ignition_toolbox/sensors/mouse.hpp b/irobot_create_gz/irobot_create_gz_toolbox/include/irobot_create_ignition_toolbox/sensors/mouse.hpp similarity index 76% rename from irobot_create_ignition/irobot_create_ignition_toolbox/include/irobot_create_ignition_toolbox/sensors/mouse.hpp rename to irobot_create_gz/irobot_create_gz_toolbox/include/irobot_create_ignition_toolbox/sensors/mouse.hpp index 8e66794f..b33c868e 100644 --- a/irobot_create_ignition/irobot_create_ignition_toolbox/include/irobot_create_ignition_toolbox/sensors/mouse.hpp +++ b/irobot_create_gz/irobot_create_gz_toolbox/include/irobot_create_ignition_toolbox/sensors/mouse.hpp @@ -3,8 +3,8 @@ * @author Roni Kreinin (rkreinin@clearpathrobotics.com) */ -#ifndef IROBOT_CREATE_IGNITION_TOOLBOX__SENSORS__MOUSE_HPP_ -#define IROBOT_CREATE_IGNITION_TOOLBOX__SENSORS__MOUSE_HPP_ +#ifndef IROBOT_CREATE_GZ_TOOLBOX__SENSORS__MOUSE_HPP_ +#define IROBOT_CREATE_GZ_TOOLBOX__SENSORS__MOUSE_HPP_ #include #include @@ -15,7 +15,7 @@ #include "rclcpp/rclcpp.hpp" #include "tf2_geometry_msgs/tf2_geometry_msgs.hpp" -namespace irobot_create_ignition_toolbox +namespace irobot_create_gz_toolbox { class Mouse @@ -40,6 +40,6 @@ class Mouse tf2::Vector3 last_mouse_position_; }; -} // namespace irobot_create_ignition_toolbox +} // namespace irobot_create_gz_toolbox -#endif // IROBOT_CREATE_IGNITION_TOOLBOX__SENSORS__MOUSE_HPP_ +#endif // IROBOT_CREATE_GZ_TOOLBOX__SENSORS__MOUSE_HPP_ diff --git a/irobot_create_gz/irobot_create_gz_toolbox/include/irobot_create_ignition_toolbox/sensors/sensors_node.hpp b/irobot_create_gz/irobot_create_gz_toolbox/include/irobot_create_ignition_toolbox/sensors/sensors_node.hpp new file mode 100644 index 00000000..da35f045 --- /dev/null +++ b/irobot_create_gz/irobot_create_gz_toolbox/include/irobot_create_ignition_toolbox/sensors/sensors_node.hpp @@ -0,0 +1,46 @@ +/* + * Copyright 2021 Clearpath Robotics, Inc. + * @author Roni Kreinin (rkreinin@clearpathrobotics.com) + */ + +#ifndef IROBOT_CREATE_GZ_TOOLBOX__SENSORS__SENSORS_NODE_HPP_ +#define IROBOT_CREATE_GZ_TOOLBOX__SENSORS__SENSORS_NODE_HPP_ + +#include +#include +#include +#include + +#include "irobot_create_gz_toolbox/sensors/bumper.hpp" +#include "irobot_create_gz_toolbox/sensors/cliff.hpp" +#include "irobot_create_gz_toolbox/sensors/ir_intensity.hpp" +#include "irobot_create_gz_toolbox/sensors/mouse.hpp" +#include "irobot_create_gz_toolbox/sensors/wheel_drop.hpp" +#include "irobot_create_gz_toolbox/sensors/ir_opcode.hpp" +#include "rclcpp/rclcpp.hpp" + +namespace irobot_create_gz_toolbox +{ + +class SensorsNode : public rclcpp::Node +{ +public: + // Constructor and Destructor + SensorsNode(); + +private: + // Node + rclcpp::Node::SharedPtr nh_; + + // Sensors + std::unique_ptr bumper_; + std::unique_ptr cliff_; + std::unique_ptr ir_intensity_; + std::unique_ptr mouse_; + std::unique_ptr wheel_drop_; + std::unique_ptr ir_opcode_; +}; + +} // namespace irobot_create_gz_toolbox + +#endif // IROBOT_CREATE_GZ_TOOLBOX__SENSORS__SENSORS_NODE_HPP_ diff --git a/irobot_create_ignition/irobot_create_ignition_toolbox/include/irobot_create_ignition_toolbox/sensors/wheel_drop.hpp b/irobot_create_gz/irobot_create_gz_toolbox/include/irobot_create_ignition_toolbox/sensors/wheel_drop.hpp similarity index 76% rename from irobot_create_ignition/irobot_create_ignition_toolbox/include/irobot_create_ignition_toolbox/sensors/wheel_drop.hpp rename to irobot_create_gz/irobot_create_gz_toolbox/include/irobot_create_ignition_toolbox/sensors/wheel_drop.hpp index 30fed9b5..b889d826 100644 --- a/irobot_create_ignition/irobot_create_ignition_toolbox/include/irobot_create_ignition_toolbox/sensors/wheel_drop.hpp +++ b/irobot_create_gz/irobot_create_gz_toolbox/include/irobot_create_ignition_toolbox/sensors/wheel_drop.hpp @@ -3,8 +3,8 @@ * @author Roni Kreinin (rkreinin@clearpathrobotics.com) */ -#ifndef IROBOT_CREATE_IGNITION_TOOLBOX__SENSORS__WHEEL_DROP_HPP_ -#define IROBOT_CREATE_IGNITION_TOOLBOX__SENSORS__WHEEL_DROP_HPP_ +#ifndef IROBOT_CREATE_GZ_TOOLBOX__SENSORS__WHEEL_DROP_HPP_ +#define IROBOT_CREATE_GZ_TOOLBOX__SENSORS__WHEEL_DROP_HPP_ #include #include @@ -14,7 +14,7 @@ #include "rclcpp/rclcpp.hpp" #include "sensor_msgs/msg/joint_state.hpp" -namespace irobot_create_ignition_toolbox +namespace irobot_create_gz_toolbox { class WheelDrop @@ -40,6 +40,6 @@ class WheelDrop std::map displacement_; }; -} // namespace irobot_create_ignition_toolbox +} // namespace irobot_create_gz_toolbox -#endif // IROBOT_CREATE_IGNITION_TOOLBOX__SENSORS__WHEEL_DROP_HPP_ +#endif // IROBOT_CREATE_GZ_TOOLBOX__SENSORS__WHEEL_DROP_HPP_ diff --git a/irobot_create_ignition/irobot_create_ignition_toolbox/include/irobot_create_ignition_toolbox/utils.hpp b/irobot_create_gz/irobot_create_gz_toolbox/include/irobot_create_ignition_toolbox/utils.hpp similarity index 92% rename from irobot_create_ignition/irobot_create_ignition_toolbox/include/irobot_create_ignition_toolbox/utils.hpp rename to irobot_create_gz/irobot_create_gz_toolbox/include/irobot_create_ignition_toolbox/utils.hpp index a41ae7e2..8ea31ad5 100644 --- a/irobot_create_ignition/irobot_create_ignition_toolbox/include/irobot_create_ignition_toolbox/utils.hpp +++ b/irobot_create_gz/irobot_create_gz_toolbox/include/irobot_create_ignition_toolbox/utils.hpp @@ -3,8 +3,8 @@ * @author Roni Kreinin (rkreinin@clearpathrobotics.com) */ -#ifndef IROBOT_CREATE_IGNITION_TOOLBOX__UTILS_HPP_ -#define IROBOT_CREATE_IGNITION_TOOLBOX__UTILS_HPP_ +#ifndef IROBOT_CREATE_GZ_TOOLBOX__UTILS_HPP_ +#define IROBOT_CREATE_GZ_TOOLBOX__UTILS_HPP_ #include #include @@ -14,7 +14,7 @@ #include "tf2_geometry_msgs/tf2_geometry_msgs.hpp" #include "tf2_msgs/msg/tf_message.hpp" -namespace irobot_create_ignition_toolbox +namespace irobot_create_gz_toolbox { namespace utils @@ -97,6 +97,6 @@ inline void tf2_transform_to_pose(const tf2::Transform tf, geometry_msgs::msg::P } // namespace utils -} // namespace irobot_create_ignition_toolbox +} // namespace irobot_create_gz_toolbox -#endif // IROBOT_CREATE_IGNITION_TOOLBOX__UTILS_HPP_ +#endif // IROBOT_CREATE_GZ_TOOLBOX__UTILS_HPP_ diff --git a/irobot_create_ignition/irobot_create_ignition_toolbox/package.xml b/irobot_create_gz/irobot_create_gz_toolbox/package.xml similarity index 96% rename from irobot_create_ignition/irobot_create_ignition_toolbox/package.xml rename to irobot_create_gz/irobot_create_gz_toolbox/package.xml index 721972c5..bc885b55 100644 --- a/irobot_create_ignition/irobot_create_ignition_toolbox/package.xml +++ b/irobot_create_gz/irobot_create_gz_toolbox/package.xml @@ -1,7 +1,7 @@ - irobot_create_ignition_toolbox + irobot_create_gz_toolbox 2.1.0 Nodes and tools for simulating in Ignition iRobot(R) Create(R) 3 Educational Robot. rkreinin diff --git a/irobot_create_ignition/irobot_create_ignition_toolbox/src/interface_buttons/interface_buttons_main.cpp b/irobot_create_gz/irobot_create_gz_toolbox/src/interface_buttons/interface_buttons_main.cpp similarity index 56% rename from irobot_create_ignition/irobot_create_ignition_toolbox/src/interface_buttons/interface_buttons_main.cpp rename to irobot_create_gz/irobot_create_gz_toolbox/src/interface_buttons/interface_buttons_main.cpp index 1988c262..89df0700 100644 --- a/irobot_create_ignition/irobot_create_ignition_toolbox/src/interface_buttons/interface_buttons_main.cpp +++ b/irobot_create_gz/irobot_create_gz_toolbox/src/interface_buttons/interface_buttons_main.cpp @@ -3,13 +3,13 @@ * @author Roni Kreinin (rkreinin@clearpathrobotics.com) */ -#include "irobot_create_ignition_toolbox/interface_buttons/interface_buttons_node.hpp" +#include "irobot_create_gz_toolbox/interface_buttons/interface_buttons_node.hpp" #include int main(int argc, char * argv[]) { rclcpp::init(argc, argv); - rclcpp::spin(std::make_shared()); + rclcpp::spin(std::make_shared()); rclcpp::shutdown(); return 0; } diff --git a/irobot_create_ignition/irobot_create_ignition_toolbox/src/interface_buttons/interface_buttons_node.cpp b/irobot_create_gz/irobot_create_gz_toolbox/src/interface_buttons/interface_buttons_node.cpp similarity index 95% rename from irobot_create_ignition/irobot_create_ignition_toolbox/src/interface_buttons/interface_buttons_node.cpp rename to irobot_create_gz/irobot_create_gz_toolbox/src/interface_buttons/interface_buttons_node.cpp index 2d26a219..2c7a3566 100644 --- a/irobot_create_ignition/irobot_create_ignition_toolbox/src/interface_buttons/interface_buttons_node.cpp +++ b/irobot_create_gz/irobot_create_gz_toolbox/src/interface_buttons/interface_buttons_node.cpp @@ -3,10 +3,10 @@ * @author Roni Kreinin (rkreinin@clearpathrobotics.com) */ -#include "irobot_create_ignition_toolbox/interface_buttons/interface_buttons_node.hpp" +#include "irobot_create_gz_toolbox/interface_buttons/interface_buttons_node.hpp" #include -using irobot_create_ignition_toolbox::InterfaceButtons; +using irobot_create_gz_toolbox::InterfaceButtons; InterfaceButtons::InterfaceButtons() : rclcpp::Node("sensors_node") diff --git a/irobot_create_ignition/irobot_create_ignition_toolbox/src/pose_republisher/pose_republisher_main.cpp b/irobot_create_gz/irobot_create_gz_toolbox/src/pose_republisher/pose_republisher_main.cpp similarity index 57% rename from irobot_create_ignition/irobot_create_ignition_toolbox/src/pose_republisher/pose_republisher_main.cpp rename to irobot_create_gz/irobot_create_gz_toolbox/src/pose_republisher/pose_republisher_main.cpp index 8950bc7f..51386435 100644 --- a/irobot_create_ignition/irobot_create_ignition_toolbox/src/pose_republisher/pose_republisher_main.cpp +++ b/irobot_create_gz/irobot_create_gz_toolbox/src/pose_republisher/pose_republisher_main.cpp @@ -3,13 +3,13 @@ * @author Roni Kreinin (rkreinin@clearpathrobotics.com) */ -#include "irobot_create_ignition_toolbox/pose_republisher/pose_republisher.hpp" +#include "irobot_create_gz_toolbox/pose_republisher/pose_republisher.hpp" #include int main(int argc, char * argv[]) { rclcpp::init(argc, argv); - rclcpp::spin(std::make_shared()); + rclcpp::spin(std::make_shared()); rclcpp::shutdown(); return 0; } diff --git a/irobot_create_ignition/irobot_create_ignition_toolbox/src/pose_republisher/pose_republisher_node.cpp b/irobot_create_gz/irobot_create_gz_toolbox/src/pose_republisher/pose_republisher_node.cpp similarity index 98% rename from irobot_create_ignition/irobot_create_ignition_toolbox/src/pose_republisher/pose_republisher_node.cpp rename to irobot_create_gz/irobot_create_gz_toolbox/src/pose_republisher/pose_republisher_node.cpp index 632ba162..6e4e6655 100644 --- a/irobot_create_ignition/irobot_create_ignition_toolbox/src/pose_republisher/pose_republisher_node.cpp +++ b/irobot_create_gz/irobot_create_gz_toolbox/src/pose_republisher/pose_republisher_node.cpp @@ -6,9 +6,9 @@ #include #include -#include "irobot_create_ignition_toolbox/pose_republisher/pose_republisher.hpp" +#include "irobot_create_gz_toolbox/pose_republisher/pose_republisher.hpp" -using irobot_create_ignition_toolbox::PoseRepublisher; +using irobot_create_gz_toolbox::PoseRepublisher; PoseRepublisher::PoseRepublisher() : rclcpp::Node("pose_republisher_node"), diff --git a/irobot_create_ignition/irobot_create_ignition_toolbox/src/sensors/bumper.cpp b/irobot_create_gz/irobot_create_gz_toolbox/src/sensors/bumper.cpp similarity index 95% rename from irobot_create_ignition/irobot_create_ignition_toolbox/src/sensors/bumper.cpp rename to irobot_create_gz/irobot_create_gz_toolbox/src/sensors/bumper.cpp index b03c6055..2f2cefd8 100644 --- a/irobot_create_ignition/irobot_create_ignition_toolbox/src/sensors/bumper.cpp +++ b/irobot_create_gz/irobot_create_gz_toolbox/src/sensors/bumper.cpp @@ -6,13 +6,13 @@ #include #include -#include "irobot_create_ignition_toolbox/sensors/bumper.hpp" -#include "irobot_create_ignition_toolbox/utils.hpp" +#include "irobot_create_gz_toolbox/sensors/bumper.hpp" +#include "irobot_create_gz_toolbox/utils.hpp" #include "irobot_create_toolbox/math.hpp" #include "irobot_create_toolbox/polar_coordinates.hpp" #include "irobot_create_toolbox/sensors/bumpers.hpp" -using irobot_create_ignition_toolbox::Bumper; +using irobot_create_gz_toolbox::Bumper; Bumper::Bumper(std::shared_ptr & nh) : nh_(nh) diff --git a/irobot_create_ignition/irobot_create_ignition_toolbox/src/sensors/cliff.cpp b/irobot_create_gz/irobot_create_gz_toolbox/src/sensors/cliff.cpp similarity index 94% rename from irobot_create_ignition/irobot_create_ignition_toolbox/src/sensors/cliff.cpp rename to irobot_create_gz/irobot_create_gz_toolbox/src/sensors/cliff.cpp index 2030361b..29a56684 100644 --- a/irobot_create_ignition/irobot_create_ignition_toolbox/src/sensors/cliff.cpp +++ b/irobot_create_gz/irobot_create_gz_toolbox/src/sensors/cliff.cpp @@ -7,10 +7,10 @@ #include #include -#include "irobot_create_ignition_toolbox/sensors/cliff.hpp" +#include "irobot_create_gz_toolbox/sensors/cliff.hpp" #include "irobot_create_toolbox/math.hpp" -using irobot_create_ignition_toolbox::Cliff; +using irobot_create_gz_toolbox::Cliff; Cliff::Cliff(std::shared_ptr & nh) : nh_(nh), diff --git a/irobot_create_ignition/irobot_create_ignition_toolbox/src/sensors/ir_intensity.cpp b/irobot_create_gz/irobot_create_gz_toolbox/src/sensors/ir_intensity.cpp similarity index 95% rename from irobot_create_ignition/irobot_create_ignition_toolbox/src/sensors/ir_intensity.cpp rename to irobot_create_gz/irobot_create_gz_toolbox/src/sensors/ir_intensity.cpp index f8798ecb..13e0de4d 100644 --- a/irobot_create_ignition/irobot_create_ignition_toolbox/src/sensors/ir_intensity.cpp +++ b/irobot_create_gz/irobot_create_gz_toolbox/src/sensors/ir_intensity.cpp @@ -8,10 +8,10 @@ #include #include -#include "irobot_create_ignition_toolbox/sensors/ir_intensity.hpp" +#include "irobot_create_gz_toolbox/sensors/ir_intensity.hpp" #include "irobot_create_toolbox/math.hpp" -using irobot_create_ignition_toolbox::IrIntensity; +using irobot_create_gz_toolbox::IrIntensity; IrIntensity::IrIntensity(std::shared_ptr & nh) : nh_(nh), diff --git a/irobot_create_ignition/irobot_create_ignition_toolbox/src/sensors/ir_opcode.cpp b/irobot_create_gz/irobot_create_gz_toolbox/src/sensors/ir_opcode.cpp similarity index 96% rename from irobot_create_ignition/irobot_create_ignition_toolbox/src/sensors/ir_opcode.cpp rename to irobot_create_gz/irobot_create_gz_toolbox/src/sensors/ir_opcode.cpp index ec8077a7..f40e003d 100644 --- a/irobot_create_ignition/irobot_create_ignition_toolbox/src/sensors/ir_opcode.cpp +++ b/irobot_create_gz/irobot_create_gz_toolbox/src/sensors/ir_opcode.cpp @@ -6,10 +6,10 @@ #include #include -#include "irobot_create_ignition_toolbox/sensors/ir_opcode.hpp" +#include "irobot_create_gz_toolbox/sensors/ir_opcode.hpp" #include "irobot_create_toolbox/polar_coordinates.hpp" -using irobot_create_ignition_toolbox::IrOpcode; +using irobot_create_gz_toolbox::IrOpcode; IrOpcode::IrOpcode(std::shared_ptr & nh) : nh_(nh) @@ -121,7 +121,7 @@ IrOpcode::EmitterCartesianPointToReceiverPolarPoint(const tf2::Vector3 & emitter receiver_pose = last_receiver_pose_; } - tf2::Vector3 emitter_wrt_receiver_pose = irobot_create_ignition_toolbox::utils::object_wrt_frame( + tf2::Vector3 emitter_wrt_receiver_pose = irobot_create_gz_toolbox::utils::object_wrt_frame( emitter_pose, receiver_pose); tf2::Vector3 emitter_wrt_receiver_point = emitter_wrt_receiver_pose + emitter_point; gz::math::Vector2d cartesian_coord = @@ -144,7 +144,7 @@ IrOpcode::ReceiverCartesianPointToEmitterPolarPoint(const tf2::Vector3 & receive } // Pose of receiver relative to the emitter - tf2::Vector3 receiver_wrt_emitter_pose = irobot_create_ignition_toolbox::utils::object_wrt_frame( + tf2::Vector3 receiver_wrt_emitter_pose = irobot_create_gz_toolbox::utils::object_wrt_frame( receiver_pose, emitter_pose); tf2::Vector3 receiver_wrt_emitter_point = receiver_wrt_emitter_pose + receiver_point; gz::math::Vector2d cartesian_coord = diff --git a/irobot_create_ignition/irobot_create_ignition_toolbox/src/sensors/mouse.cpp b/irobot_create_gz/irobot_create_gz_toolbox/src/sensors/mouse.cpp similarity index 93% rename from irobot_create_ignition/irobot_create_ignition_toolbox/src/sensors/mouse.cpp rename to irobot_create_gz/irobot_create_gz_toolbox/src/sensors/mouse.cpp index e2d24f53..884dd4d6 100644 --- a/irobot_create_ignition/irobot_create_ignition_toolbox/src/sensors/mouse.cpp +++ b/irobot_create_gz/irobot_create_gz_toolbox/src/sensors/mouse.cpp @@ -6,9 +6,9 @@ #include #include -#include "irobot_create_ignition_toolbox/sensors/mouse.hpp" +#include "irobot_create_gz_toolbox/sensors/mouse.hpp" -using irobot_create_ignition_toolbox::Mouse; +using irobot_create_gz_toolbox::Mouse; Mouse::Mouse(std::shared_ptr & nh) : nh_(nh), diff --git a/irobot_create_ignition/irobot_create_ignition_toolbox/src/sensors/sensors_main.cpp b/irobot_create_gz/irobot_create_gz_toolbox/src/sensors/sensors_main.cpp similarity index 60% rename from irobot_create_ignition/irobot_create_ignition_toolbox/src/sensors/sensors_main.cpp rename to irobot_create_gz/irobot_create_gz_toolbox/src/sensors/sensors_main.cpp index f8d5cab0..4f14406d 100644 --- a/irobot_create_ignition/irobot_create_ignition_toolbox/src/sensors/sensors_main.cpp +++ b/irobot_create_gz/irobot_create_gz_toolbox/src/sensors/sensors_main.cpp @@ -5,12 +5,12 @@ #include -#include "irobot_create_ignition_toolbox/sensors/sensors_node.hpp" +#include "irobot_create_gz_toolbox/sensors/sensors_node.hpp" int main(int argc, char * argv[]) { rclcpp::init(argc, argv); - rclcpp::spin(std::make_shared()); + rclcpp::spin(std::make_shared()); rclcpp::shutdown(); return 0; } diff --git a/irobot_create_ignition/irobot_create_ignition_toolbox/src/sensors/sensors_node.cpp b/irobot_create_gz/irobot_create_gz_toolbox/src/sensors/sensors_node.cpp similarity index 83% rename from irobot_create_ignition/irobot_create_ignition_toolbox/src/sensors/sensors_node.cpp rename to irobot_create_gz/irobot_create_gz_toolbox/src/sensors/sensors_node.cpp index fa70d3ed..c5322049 100644 --- a/irobot_create_ignition/irobot_create_ignition_toolbox/src/sensors/sensors_node.cpp +++ b/irobot_create_gz/irobot_create_gz_toolbox/src/sensors/sensors_node.cpp @@ -5,9 +5,9 @@ #include -#include "irobot_create_ignition_toolbox/sensors/sensors_node.hpp" +#include "irobot_create_gz_toolbox/sensors/sensors_node.hpp" -using irobot_create_ignition_toolbox::SensorsNode; +using irobot_create_gz_toolbox::SensorsNode; SensorsNode::SensorsNode() : rclcpp::Node("sensors_node") diff --git a/irobot_create_ignition/irobot_create_ignition_toolbox/src/sensors/wheel_drop.cpp b/irobot_create_gz/irobot_create_gz_toolbox/src/sensors/wheel_drop.cpp similarity index 94% rename from irobot_create_ignition/irobot_create_ignition_toolbox/src/sensors/wheel_drop.cpp rename to irobot_create_gz/irobot_create_gz_toolbox/src/sensors/wheel_drop.cpp index 01f52623..a1f63c45 100644 --- a/irobot_create_ignition/irobot_create_ignition_toolbox/src/sensors/wheel_drop.cpp +++ b/irobot_create_gz/irobot_create_gz_toolbox/src/sensors/wheel_drop.cpp @@ -6,9 +6,9 @@ #include #include -#include "irobot_create_ignition_toolbox/sensors/wheel_drop.hpp" +#include "irobot_create_gz_toolbox/sensors/wheel_drop.hpp" -using irobot_create_ignition_toolbox::WheelDrop; +using irobot_create_gz_toolbox::WheelDrop; WheelDrop::WheelDrop(std::shared_ptr & nh) : nh_(nh), diff --git a/irobot_create_ignition/irobot_create_ignition_bringup/README.md b/irobot_create_ignition/irobot_create_ignition_bringup/README.md deleted file mode 100644 index defad810..00000000 --- a/irobot_create_ignition/irobot_create_ignition_bringup/README.md +++ /dev/null @@ -1 +0,0 @@ -# turtlebot4_ignition diff --git a/irobot_create_ignition/irobot_create_ignition_plugins/README.md b/irobot_create_ignition/irobot_create_ignition_plugins/README.md deleted file mode 100644 index 4f860643..00000000 --- a/irobot_create_ignition/irobot_create_ignition_plugins/README.md +++ /dev/null @@ -1 +0,0 @@ -# turtlebot4_ignition_gui_plugins diff --git a/irobot_create_ignition/irobot_create_ignition_toolbox/include/irobot_create_ignition_toolbox/sensors/sensors_node.hpp b/irobot_create_ignition/irobot_create_ignition_toolbox/include/irobot_create_ignition_toolbox/sensors/sensors_node.hpp deleted file mode 100644 index e6259323..00000000 --- a/irobot_create_ignition/irobot_create_ignition_toolbox/include/irobot_create_ignition_toolbox/sensors/sensors_node.hpp +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2021 Clearpath Robotics, Inc. - * @author Roni Kreinin (rkreinin@clearpathrobotics.com) - */ - -#ifndef IROBOT_CREATE_IGNITION_TOOLBOX__SENSORS__SENSORS_NODE_HPP_ -#define IROBOT_CREATE_IGNITION_TOOLBOX__SENSORS__SENSORS_NODE_HPP_ - -#include -#include -#include -#include - -#include "irobot_create_ignition_toolbox/sensors/bumper.hpp" -#include "irobot_create_ignition_toolbox/sensors/cliff.hpp" -#include "irobot_create_ignition_toolbox/sensors/ir_intensity.hpp" -#include "irobot_create_ignition_toolbox/sensors/mouse.hpp" -#include "irobot_create_ignition_toolbox/sensors/wheel_drop.hpp" -#include "irobot_create_ignition_toolbox/sensors/ir_opcode.hpp" -#include "rclcpp/rclcpp.hpp" - -namespace irobot_create_ignition_toolbox -{ - -class SensorsNode : public rclcpp::Node -{ -public: - // Constructor and Destructor - SensorsNode(); - -private: - // Node - rclcpp::Node::SharedPtr nh_; - - // Sensors - std::unique_ptr bumper_; - std::unique_ptr cliff_; - std::unique_ptr ir_intensity_; - std::unique_ptr mouse_; - std::unique_ptr wheel_drop_; - std::unique_ptr ir_opcode_; -}; - -} // namespace irobot_create_ignition_toolbox - -#endif // IROBOT_CREATE_IGNITION_TOOLBOX__SENSORS__SENSORS_NODE_HPP_ From 42434516d204e7b9cabc558987731f44a933080b Mon Sep 17 00:00:00 2001 From: Chris Iverach-Brereton Date: Wed, 17 Jul 2024 10:52:00 -0400 Subject: [PATCH 03/34] Rename files & folders ignition -> gz --- .../launch/{create3_ignition.launch.py => create3_gz.launch.py} | 2 +- ...ate3_ignition_nodes.launch.py => create3_gz_nodes.launch.py} | 0 ...gnition_bridge.launch.py => create3_ros_gz_bridge.launch.py} | 0 .../launch/{ignition.launch.py => gazebo.launch.py} | 0 .../interface_buttons/interface_buttons_node.hpp | 0 .../pose_republisher/pose_republisher.hpp | 0 .../sensors/bumper.hpp | 0 .../sensors/cliff.hpp | 0 .../sensors/ir_intensity.hpp | 0 .../sensors/ir_opcode.hpp | 0 .../sensors/mouse.hpp | 0 .../sensors/sensors_node.hpp | 0 .../sensors/wheel_drop.hpp | 0 .../utils.hpp | 0 14 files changed, 1 insertion(+), 1 deletion(-) rename irobot_create_gz/irobot_create_gz_bringup/launch/{create3_ignition.launch.py => create3_gz.launch.py} (96%) rename irobot_create_gz/irobot_create_gz_bringup/launch/{create3_ignition_nodes.launch.py => create3_gz_nodes.launch.py} (100%) rename irobot_create_gz/irobot_create_gz_bringup/launch/{create3_ros_ignition_bridge.launch.py => create3_ros_gz_bridge.launch.py} (100%) rename irobot_create_gz/irobot_create_gz_bringup/launch/{ignition.launch.py => gazebo.launch.py} (100%) rename irobot_create_gz/irobot_create_gz_toolbox/include/{irobot_create_ignition_toolbox => irobot_create_gz_toolbox}/interface_buttons/interface_buttons_node.hpp (100%) rename irobot_create_gz/irobot_create_gz_toolbox/include/{irobot_create_ignition_toolbox => irobot_create_gz_toolbox}/pose_republisher/pose_republisher.hpp (100%) rename irobot_create_gz/irobot_create_gz_toolbox/include/{irobot_create_ignition_toolbox => irobot_create_gz_toolbox}/sensors/bumper.hpp (100%) rename irobot_create_gz/irobot_create_gz_toolbox/include/{irobot_create_ignition_toolbox => irobot_create_gz_toolbox}/sensors/cliff.hpp (100%) rename irobot_create_gz/irobot_create_gz_toolbox/include/{irobot_create_ignition_toolbox => irobot_create_gz_toolbox}/sensors/ir_intensity.hpp (100%) rename irobot_create_gz/irobot_create_gz_toolbox/include/{irobot_create_ignition_toolbox => irobot_create_gz_toolbox}/sensors/ir_opcode.hpp (100%) rename irobot_create_gz/irobot_create_gz_toolbox/include/{irobot_create_ignition_toolbox => irobot_create_gz_toolbox}/sensors/mouse.hpp (100%) rename irobot_create_gz/irobot_create_gz_toolbox/include/{irobot_create_ignition_toolbox => irobot_create_gz_toolbox}/sensors/sensors_node.hpp (100%) rename irobot_create_gz/irobot_create_gz_toolbox/include/{irobot_create_ignition_toolbox => irobot_create_gz_toolbox}/sensors/wheel_drop.hpp (100%) rename irobot_create_gz/irobot_create_gz_toolbox/include/{irobot_create_ignition_toolbox => irobot_create_gz_toolbox}/utils.hpp (100%) diff --git a/irobot_create_gz/irobot_create_gz_bringup/launch/create3_ignition.launch.py b/irobot_create_gz/irobot_create_gz_bringup/launch/create3_gz.launch.py similarity index 96% rename from irobot_create_gz/irobot_create_gz_bringup/launch/create3_ignition.launch.py rename to irobot_create_gz/irobot_create_gz_bringup/launch/create3_gz.launch.py index cd6a965f..688f1e0c 100644 --- a/irobot_create_gz/irobot_create_gz_bringup/launch/create3_ignition.launch.py +++ b/irobot_create_gz/irobot_create_gz_bringup/launch/create3_gz.launch.py @@ -32,7 +32,7 @@ def generate_launch_description(): # Paths ignition_launch = PathJoinSubstitution( - [pkg_irobot_create_gz_bringup, 'launch', 'ignition.launch.py']) + [pkg_irobot_create_gz_bringup, 'launch', 'gazebo.launch.py']) robot_spawn_launch = PathJoinSubstitution( [pkg_irobot_create_gz_bringup, 'launch', 'create3_spawn.launch.py']) diff --git a/irobot_create_gz/irobot_create_gz_bringup/launch/create3_ignition_nodes.launch.py b/irobot_create_gz/irobot_create_gz_bringup/launch/create3_gz_nodes.launch.py similarity index 100% rename from irobot_create_gz/irobot_create_gz_bringup/launch/create3_ignition_nodes.launch.py rename to irobot_create_gz/irobot_create_gz_bringup/launch/create3_gz_nodes.launch.py diff --git a/irobot_create_gz/irobot_create_gz_bringup/launch/create3_ros_ignition_bridge.launch.py b/irobot_create_gz/irobot_create_gz_bringup/launch/create3_ros_gz_bridge.launch.py similarity index 100% rename from irobot_create_gz/irobot_create_gz_bringup/launch/create3_ros_ignition_bridge.launch.py rename to irobot_create_gz/irobot_create_gz_bringup/launch/create3_ros_gz_bridge.launch.py diff --git a/irobot_create_gz/irobot_create_gz_bringup/launch/ignition.launch.py b/irobot_create_gz/irobot_create_gz_bringup/launch/gazebo.launch.py similarity index 100% rename from irobot_create_gz/irobot_create_gz_bringup/launch/ignition.launch.py rename to irobot_create_gz/irobot_create_gz_bringup/launch/gazebo.launch.py diff --git a/irobot_create_gz/irobot_create_gz_toolbox/include/irobot_create_ignition_toolbox/interface_buttons/interface_buttons_node.hpp b/irobot_create_gz/irobot_create_gz_toolbox/include/irobot_create_gz_toolbox/interface_buttons/interface_buttons_node.hpp similarity index 100% rename from irobot_create_gz/irobot_create_gz_toolbox/include/irobot_create_ignition_toolbox/interface_buttons/interface_buttons_node.hpp rename to irobot_create_gz/irobot_create_gz_toolbox/include/irobot_create_gz_toolbox/interface_buttons/interface_buttons_node.hpp diff --git a/irobot_create_gz/irobot_create_gz_toolbox/include/irobot_create_ignition_toolbox/pose_republisher/pose_republisher.hpp b/irobot_create_gz/irobot_create_gz_toolbox/include/irobot_create_gz_toolbox/pose_republisher/pose_republisher.hpp similarity index 100% rename from irobot_create_gz/irobot_create_gz_toolbox/include/irobot_create_ignition_toolbox/pose_republisher/pose_republisher.hpp rename to irobot_create_gz/irobot_create_gz_toolbox/include/irobot_create_gz_toolbox/pose_republisher/pose_republisher.hpp diff --git a/irobot_create_gz/irobot_create_gz_toolbox/include/irobot_create_ignition_toolbox/sensors/bumper.hpp b/irobot_create_gz/irobot_create_gz_toolbox/include/irobot_create_gz_toolbox/sensors/bumper.hpp similarity index 100% rename from irobot_create_gz/irobot_create_gz_toolbox/include/irobot_create_ignition_toolbox/sensors/bumper.hpp rename to irobot_create_gz/irobot_create_gz_toolbox/include/irobot_create_gz_toolbox/sensors/bumper.hpp diff --git a/irobot_create_gz/irobot_create_gz_toolbox/include/irobot_create_ignition_toolbox/sensors/cliff.hpp b/irobot_create_gz/irobot_create_gz_toolbox/include/irobot_create_gz_toolbox/sensors/cliff.hpp similarity index 100% rename from irobot_create_gz/irobot_create_gz_toolbox/include/irobot_create_ignition_toolbox/sensors/cliff.hpp rename to irobot_create_gz/irobot_create_gz_toolbox/include/irobot_create_gz_toolbox/sensors/cliff.hpp diff --git a/irobot_create_gz/irobot_create_gz_toolbox/include/irobot_create_ignition_toolbox/sensors/ir_intensity.hpp b/irobot_create_gz/irobot_create_gz_toolbox/include/irobot_create_gz_toolbox/sensors/ir_intensity.hpp similarity index 100% rename from irobot_create_gz/irobot_create_gz_toolbox/include/irobot_create_ignition_toolbox/sensors/ir_intensity.hpp rename to irobot_create_gz/irobot_create_gz_toolbox/include/irobot_create_gz_toolbox/sensors/ir_intensity.hpp diff --git a/irobot_create_gz/irobot_create_gz_toolbox/include/irobot_create_ignition_toolbox/sensors/ir_opcode.hpp b/irobot_create_gz/irobot_create_gz_toolbox/include/irobot_create_gz_toolbox/sensors/ir_opcode.hpp similarity index 100% rename from irobot_create_gz/irobot_create_gz_toolbox/include/irobot_create_ignition_toolbox/sensors/ir_opcode.hpp rename to irobot_create_gz/irobot_create_gz_toolbox/include/irobot_create_gz_toolbox/sensors/ir_opcode.hpp diff --git a/irobot_create_gz/irobot_create_gz_toolbox/include/irobot_create_ignition_toolbox/sensors/mouse.hpp b/irobot_create_gz/irobot_create_gz_toolbox/include/irobot_create_gz_toolbox/sensors/mouse.hpp similarity index 100% rename from irobot_create_gz/irobot_create_gz_toolbox/include/irobot_create_ignition_toolbox/sensors/mouse.hpp rename to irobot_create_gz/irobot_create_gz_toolbox/include/irobot_create_gz_toolbox/sensors/mouse.hpp diff --git a/irobot_create_gz/irobot_create_gz_toolbox/include/irobot_create_ignition_toolbox/sensors/sensors_node.hpp b/irobot_create_gz/irobot_create_gz_toolbox/include/irobot_create_gz_toolbox/sensors/sensors_node.hpp similarity index 100% rename from irobot_create_gz/irobot_create_gz_toolbox/include/irobot_create_ignition_toolbox/sensors/sensors_node.hpp rename to irobot_create_gz/irobot_create_gz_toolbox/include/irobot_create_gz_toolbox/sensors/sensors_node.hpp diff --git a/irobot_create_gz/irobot_create_gz_toolbox/include/irobot_create_ignition_toolbox/sensors/wheel_drop.hpp b/irobot_create_gz/irobot_create_gz_toolbox/include/irobot_create_gz_toolbox/sensors/wheel_drop.hpp similarity index 100% rename from irobot_create_gz/irobot_create_gz_toolbox/include/irobot_create_ignition_toolbox/sensors/wheel_drop.hpp rename to irobot_create_gz/irobot_create_gz_toolbox/include/irobot_create_gz_toolbox/sensors/wheel_drop.hpp diff --git a/irobot_create_gz/irobot_create_gz_toolbox/include/irobot_create_ignition_toolbox/utils.hpp b/irobot_create_gz/irobot_create_gz_toolbox/include/irobot_create_gz_toolbox/utils.hpp similarity index 100% rename from irobot_create_gz/irobot_create_gz_toolbox/include/irobot_create_ignition_toolbox/utils.hpp rename to irobot_create_gz/irobot_create_gz_toolbox/include/irobot_create_gz_toolbox/utils.hpp From 134e3e1f9056381eb4e0ab64e697c5f6f94e3d9f Mon Sep 17 00:00:00 2001 From: Chris Iverach-Brereton Date: Wed, 17 Jul 2024 11:03:23 -0400 Subject: [PATCH 04/34] Add python setup files --- .../irobot_create_common_bringup/setup.cfg | 4 ++++ .../irobot_create_common_bringup/setup.py | 23 +++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 irobot_create_common/irobot_create_common_bringup/setup.cfg create mode 100644 irobot_create_common/irobot_create_common_bringup/setup.py diff --git a/irobot_create_common/irobot_create_common_bringup/setup.cfg b/irobot_create_common/irobot_create_common_bringup/setup.cfg new file mode 100644 index 00000000..e873a2e7 --- /dev/null +++ b/irobot_create_common/irobot_create_common_bringup/setup.cfg @@ -0,0 +1,4 @@ +[develop] +script_dir=$base/lib/irobot_create_common_bringup +[install] +install_scripts=$base/lib/irobot_create_common_bringup diff --git a/irobot_create_common/irobot_create_common_bringup/setup.py b/irobot_create_common/irobot_create_common_bringup/setup.py new file mode 100644 index 00000000..6034222b --- /dev/null +++ b/irobot_create_common/irobot_create_common_bringup/setup.py @@ -0,0 +1,23 @@ +from glob import glob +import os + +from setuptools import find_packages, setup + +package_name = 'axis_camera' + +setup( + name=package_name, + version='2.1.0', + packages=find_packages(exclude=['test']), + data_files=[ + ], + install_requires=['setuptools'], + zip_safe=True, + maintainer='Ekumen', + maintainer_email='ekumen@irbt.onmicrosoft.com', + description='Provides common launch and configuration scripts for a simulated iRobot(R) Create(R) 3 Educational Robot.', + license='BSD', + tests_require=['pytest'], + entry_points={ + }, +) From 557683998f5b50b3c260ab8c86d5bbcc5dd39c52 Mon Sep 17 00:00:00 2001 From: Chris Iverach-Brereton Date: Wed, 17 Jul 2024 11:05:31 -0400 Subject: [PATCH 05/34] Copypasta --- irobot_create_common/irobot_create_common_bringup/setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/irobot_create_common/irobot_create_common_bringup/setup.py b/irobot_create_common/irobot_create_common_bringup/setup.py index 6034222b..615f262a 100644 --- a/irobot_create_common/irobot_create_common_bringup/setup.py +++ b/irobot_create_common/irobot_create_common_bringup/setup.py @@ -3,7 +3,7 @@ from setuptools import find_packages, setup -package_name = 'axis_camera' +package_name = 'irobot_create_common_bringup' setup( name=package_name, From aeb6b6e7f6a7ef396a85b11df4b05c15217693c7 Mon Sep 17 00:00:00 2001 From: Chris Iverach-Brereton Date: Wed, 17 Jul 2024 11:09:28 -0400 Subject: [PATCH 06/34] Remove setup files (they're no longer necessary after all?), add ament_cmake_python dependency --- .../CMakeLists.txt | 1 + .../irobot_create_common_bringup/package.xml | 1 + .../irobot_create_common_bringup/setup.cfg | 4 ---- .../irobot_create_common_bringup/setup.py | 23 ------------------- 4 files changed, 2 insertions(+), 27 deletions(-) delete mode 100644 irobot_create_common/irobot_create_common_bringup/setup.cfg delete mode 100644 irobot_create_common/irobot_create_common_bringup/setup.py diff --git a/irobot_create_common/irobot_create_common_bringup/CMakeLists.txt b/irobot_create_common/irobot_create_common_bringup/CMakeLists.txt index cc7942f5..c7a34366 100644 --- a/irobot_create_common/irobot_create_common_bringup/CMakeLists.txt +++ b/irobot_create_common/irobot_create_common_bringup/CMakeLists.txt @@ -12,6 +12,7 @@ endif() find_package(ament_cmake REQUIRED) find_package(ament_cmake_python REQUIRED) +find_package(rclpy REQUIRED) install( DIRECTORY diff --git a/irobot_create_common/irobot_create_common_bringup/package.xml b/irobot_create_common/irobot_create_common_bringup/package.xml index a0043bae..0c3f9a38 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_bringup/setup.cfg b/irobot_create_common/irobot_create_common_bringup/setup.cfg deleted file mode 100644 index e873a2e7..00000000 --- a/irobot_create_common/irobot_create_common_bringup/setup.cfg +++ /dev/null @@ -1,4 +0,0 @@ -[develop] -script_dir=$base/lib/irobot_create_common_bringup -[install] -install_scripts=$base/lib/irobot_create_common_bringup diff --git a/irobot_create_common/irobot_create_common_bringup/setup.py b/irobot_create_common/irobot_create_common_bringup/setup.py deleted file mode 100644 index 615f262a..00000000 --- a/irobot_create_common/irobot_create_common_bringup/setup.py +++ /dev/null @@ -1,23 +0,0 @@ -from glob import glob -import os - -from setuptools import find_packages, setup - -package_name = 'irobot_create_common_bringup' - -setup( - name=package_name, - version='2.1.0', - packages=find_packages(exclude=['test']), - data_files=[ - ], - install_requires=['setuptools'], - zip_safe=True, - maintainer='Ekumen', - maintainer_email='ekumen@irbt.onmicrosoft.com', - description='Provides common launch and configuration scripts for a simulated iRobot(R) Create(R) 3 Educational Robot.', - license='BSD', - tests_require=['pytest'], - entry_points={ - }, -) From b780095651360c9390b8b8b07cc03c3f3c564618 Mon Sep 17 00:00:00 2001 From: Chris Iverach-Brereton Date: Wed, 17 Jul 2024 12:10:07 -0400 Subject: [PATCH 07/34] Remove substitution deprecations --- .../irobot_create_control/launch/include/control.py | 7 +++---- 1 file changed, 3 insertions(+), 4 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 89cba524..77e4dc2e 100644 --- a/irobot_create_common/irobot_create_control/launch/include/control.py +++ b/irobot_create_common/irobot_create_control/launch/include/control.py @@ -6,9 +6,8 @@ from ament_index_python.packages import get_package_share_directory from launch import LaunchDescription from launch.actions import DeclareLaunchArgument, RegisterEventHandler -from launch.conditions import LaunchConfigurationNotEquals from launch.event_handlers import OnProcessExit -from launch.substitutions import LaunchConfiguration, PathJoinSubstitution +from launch.substitutions import LaunchConfiguration, NotEqualsSubstitution, PathJoinSubstitution from launch_ros.actions import Node ARGUMENTS = [ @@ -63,7 +62,7 @@ def generate_launch_description(): ('/tf_static', 'tf_static') ], output='screen', - condition=LaunchConfigurationNotEquals('namespace', '') + condition=NotEqualsSubstitution(LaunchConfiguration('namespace'), '') ) # Static transform from /base_link to base_link @@ -79,7 +78,7 @@ def generate_launch_description(): ('/tf_static', 'tf_static') ], output='screen', - condition=LaunchConfigurationNotEquals('namespace', '') + condition=NotEqualsSubstitution(LaunchConfiguration('namespace'), '') ) ld = LaunchDescription(ARGUMENTS) From f0a03cc236a9f69299c64b8046f08d2356126d97 Mon Sep 17 00:00:00 2001 From: Chris Iverach-Brereton Date: Wed, 17 Jul 2024 12:17:06 -0400 Subject: [PATCH 08/34] Add IfCondition wrappers --- .../irobot_create_control/launch/include/control.py | 4 ++-- 1 file changed, 2 insertions(+), 2 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 77e4dc2e..944c4c62 100644 --- a/irobot_create_common/irobot_create_control/launch/include/control.py +++ b/irobot_create_common/irobot_create_control/launch/include/control.py @@ -62,7 +62,7 @@ def generate_launch_description(): ('/tf_static', 'tf_static') ], output='screen', - condition=NotEqualsSubstitution(LaunchConfiguration('namespace'), '') + condition=IfCondition(NotEqualsSubstitution(LaunchConfiguration('namespace'), '')) ) # Static transform from /base_link to base_link @@ -78,7 +78,7 @@ def generate_launch_description(): ('/tf_static', 'tf_static') ], output='screen', - condition=NotEqualsSubstitution(LaunchConfiguration('namespace'), '') + condition=IfCondition(NotEqualsSubstitution(LaunchConfiguration('namespace'), '')) ) ld = LaunchDescription(ARGUMENTS) From 75888b678ec1774b705a431e711d08b9923301b0 Mon Sep 17 00:00:00 2001 From: Chris Iverach-Brereton Date: Wed, 17 Jul 2024 12:18:41 -0400 Subject: [PATCH 09/34] Missing import --- .../irobot_create_control/launch/include/control.py | 1 + 1 file changed, 1 insertion(+) 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 944c4c62..26aa2497 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 IfCondition from launch.event_handlers import OnProcessExit from launch.substitutions import LaunchConfiguration, NotEqualsSubstitution, PathJoinSubstitution from launch_ros.actions import Node From fc68eb628bb1dca4504cf3b007536e60f1f840e5 Mon Sep 17 00:00:00 2001 From: Chris Iverach-Brereton Date: Tue, 23 Jul 2024 13:28:22 -0400 Subject: [PATCH 10/34] Rename gazebo launch file --- .../launch/{gazebo.launch.py => sim.launch.py} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename irobot_create_gz/irobot_create_gz_bringup/launch/{gazebo.launch.py => sim.launch.py} (100%) diff --git a/irobot_create_gz/irobot_create_gz_bringup/launch/gazebo.launch.py b/irobot_create_gz/irobot_create_gz_bringup/launch/sim.launch.py similarity index 100% rename from irobot_create_gz/irobot_create_gz_bringup/launch/gazebo.launch.py rename to irobot_create_gz/irobot_create_gz_bringup/launch/sim.launch.py From 3cc9e195f741cd1ba99bc1374ed0d5a5725c8000 Mon Sep 17 00:00:00 2001 From: Chris Iverach-Brereton Date: Tue, 23 Jul 2024 13:28:57 -0400 Subject: [PATCH 11/34] Update launch file --- .../irobot_create_gz_bringup/launch/create3_gz.launch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/irobot_create_gz/irobot_create_gz_bringup/launch/create3_gz.launch.py b/irobot_create_gz/irobot_create_gz_bringup/launch/create3_gz.launch.py index 688f1e0c..a59d84f4 100644 --- a/irobot_create_gz/irobot_create_gz_bringup/launch/create3_gz.launch.py +++ b/irobot_create_gz/irobot_create_gz_bringup/launch/create3_gz.launch.py @@ -32,7 +32,7 @@ def generate_launch_description(): # Paths ignition_launch = PathJoinSubstitution( - [pkg_irobot_create_gz_bringup, 'launch', 'gazebo.launch.py']) + [pkg_irobot_create_gz_bringup, 'launch', 'sim.launch.py']) robot_spawn_launch = PathJoinSubstitution( [pkg_irobot_create_gz_bringup, 'launch', 'create3_spawn.launch.py']) From 9207bdc77b036c3693bd62a3acfdea9f69a01dc3 Mon Sep 17 00:00:00 2001 From: Chris Iverach-Brereton Date: Thu, 25 Jul 2024 12:15:50 -0400 Subject: [PATCH 12/34] Update the GUI config with fixed camera position, add 3d scene manager --- .../gui/create3/gui.config | 100 +++++++++++++++--- 1 file changed, 86 insertions(+), 14 deletions(-) diff --git a/irobot_create_gz/irobot_create_gz_bringup/gui/create3/gui.config b/irobot_create_gz/irobot_create_gz_bringup/gui/create3/gui.config index 4f650410..b4d6022a 100644 --- a/irobot_create_gz/irobot_create_gz_bringup/gui/create3/gui.config +++ b/irobot_create_gz/irobot_create_gz_bringup/gui/create3/gui.config @@ -1,16 +1,91 @@ - - - - 3D View - false - docked - - ogre2 - scene - -0.0176 -0.737 0.017 0 -0.135 1.64 - + + + + 3D View + docked + false + + ogre2 + scene + 0.4 0.4 0.4 + 0.8 0.8 0.8 + -6 0 6 0 0.5 0 + + + + false + floating + + + + @@ -19,7 +94,6 @@ false false 72 - 121 1 floating @@ -91,7 +165,6 @@ - From c344de0ae3fd39cfed79723823a12750510b2d4d Mon Sep 17 00:00:00 2001 From: Chris Iverach-Brereton Date: Thu, 25 Jul 2024 12:16:23 -0400 Subject: [PATCH 13/34] Enable the plugins, fix the path envars --- .../launch/create3_gz.launch.py | 7 ++++ .../launch/sim.launch.py | 37 ++++++++++--------- 2 files changed, 27 insertions(+), 17 deletions(-) diff --git a/irobot_create_gz/irobot_create_gz_bringup/launch/create3_gz.launch.py b/irobot_create_gz/irobot_create_gz_bringup/launch/create3_gz.launch.py index a59d84f4..67642025 100644 --- a/irobot_create_gz/irobot_create_gz_bringup/launch/create3_gz.launch.py +++ b/irobot_create_gz/irobot_create_gz_bringup/launch/create3_gz.launch.py @@ -35,6 +35,8 @@ def generate_launch_description(): [pkg_irobot_create_gz_bringup, 'launch', 'sim.launch.py']) robot_spawn_launch = PathJoinSubstitution( [pkg_irobot_create_gz_bringup, 'launch', 'create3_spawn.launch.py']) + create3_nodes_launch = PathJoinSubstitution( + [pkg_irobot_create_gz_bringup, 'launch', 'create3_gz_nodes.launch.py']) ignition = IncludeLaunchDescription( PythonLaunchDescriptionSource([ignition_launch]), @@ -53,8 +55,13 @@ def generate_launch_description(): ('z', LaunchConfiguration('z')), ('yaw', LaunchConfiguration('yaw'))]) + create3_nodes = IncludeLaunchDescription( + PythonLaunchDescriptionSource([create3_nodes_launch]), + launch_arguments=[]) + # Create launch description and add actions ld = LaunchDescription(ARGUMENTS) ld.add_action(ignition) ld.add_action(robot_spawn) + ld.add_action(create3_nodes) return ld diff --git a/irobot_create_gz/irobot_create_gz_bringup/launch/sim.launch.py b/irobot_create_gz/irobot_create_gz_bringup/launch/sim.launch.py index d04771a6..7d5694fd 100644 --- a/irobot_create_gz/irobot_create_gz_bringup/launch/sim.launch.py +++ b/irobot_create_gz/irobot_create_gz_bringup/launch/sim.launch.py @@ -29,33 +29,35 @@ def generate_launch_description(): # Directories pkg_irobot_create_gz_bringup = get_package_share_directory( 'irobot_create_gz_bringup') - #pkg_irobot_create_gz_plugins = get_package_share_directory( - # 'irobot_create_gz_plugins') + pkg_irobot_create_gz_plugins = get_package_share_directory( + 'irobot_create_gz_plugins') pkg_irobot_create_description = get_package_share_directory( 'irobot_create_description') pkg_ros_gz_sim = get_package_share_directory( 'ros_gz_sim') # Set Ignition resource path - gz_resource_path = SetEnvironmentVariable(name='GZ_SIM_RESOURCE_PATH', - value=[os.path.join( - pkg_irobot_create_gz_bringup, - 'worlds'), ':' + - str(Path( - pkg_irobot_create_description). - parent.resolve())]) + gz_resource_path = SetEnvironmentVariable( + name='GZ_SIM_RESOURCE_PATH', + value=':'.join([ + os.path.join(pkg_irobot_create_gz_bringup, 'worlds'), + str(Path(pkg_irobot_create_description).parent.resolve()) + ]) + ) - #gz_gui_plugin_path = SetEnvironmentVariable(name='GZ_GUI_PLUGIN_PATH', - # value=[os.path.join( - # pkg_irobot_create_gz_plugins, - # 'lib')]) + gz_gui_plugin_path = SetEnvironmentVariable( + name='GZ_GUI_PLUGIN_PATH', + value=":".join([ + os.path.join(pkg_irobot_create_gz_plugins, 'lib') + ]) + ) # Paths gz_sim_launch = PathJoinSubstitution( [pkg_ros_gz_sim, 'launch', 'gz_sim.launch.py']) # Ignition gazebo - ignition_gazebo = IncludeLaunchDescription( + gz_sim = IncludeLaunchDescription( PythonLaunchDescriptionSource([gz_sim_launch]), launch_arguments=[ ('gz_args', [LaunchConfiguration('world'), @@ -63,7 +65,8 @@ def generate_launch_description(): ' -v 4', ' --gui-config ', PathJoinSubstitution([pkg_irobot_create_gz_bringup, - 'gui', 'create3', 'gui.config'])]) + 'gui', 'create3', 'gui.config']) + ]) ] ) @@ -78,7 +81,7 @@ def generate_launch_description(): # Create launch description and add actions ld = LaunchDescription(ARGUMENTS) ld.add_action(gz_resource_path) - #ld.add_action(gz_gui_plugin_path) - ld.add_action(ignition_gazebo) + ld.add_action(gz_gui_plugin_path) + ld.add_action(gz_sim) ld.add_action(clock_bridge) return ld From bada05581e99b32961030a64626b700867677292 Mon Sep 17 00:00:00 2001 From: Chris Iverach-Brereton Date: Thu, 25 Jul 2024 12:19:34 -0400 Subject: [PATCH 14/34] Remove commented-out parameters --- .../gui/create3/gui.config | 66 ------------------- 1 file changed, 66 deletions(-) diff --git a/irobot_create_gz/irobot_create_gz_bringup/gui/create3/gui.config b/irobot_create_gz/irobot_create_gz_bringup/gui/create3/gui.config index b4d6022a..2b915f82 100644 --- a/irobot_create_gz/irobot_create_gz_bringup/gui/create3/gui.config +++ b/irobot_create_gz/irobot_create_gz_bringup/gui/create3/gui.config @@ -17,72 +17,6 @@ false floating - From b1c823254748348465e327a23dba8b3c432e6be0 Mon Sep 17 00:00:00 2001 From: Chris Iverach-Brereton Date: Thu, 25 Jul 2024 12:54:24 -0400 Subject: [PATCH 15/34] Initial migration from Twist to TwistStamped. Headers are not initalized; just the message type is changed so far --- .../motion_control/behaviors_scheduler.hpp | 4 +- .../motion_control/drive_goal_behaviors.hpp | 12 ++--- .../motion_control/simple_goal_controller.hpp | 18 ++++---- .../motion_control_node.hpp | 10 ++-- .../motion_control/drive_goal_behaviors.cpp | 46 +++++++++---------- .../src/motion_control/reflex_behavior.cpp | 12 ++--- .../motion_control/wall_follow_behavior.cpp | 6 +-- .../src/motion_control_node.cpp | 32 ++++++------- 8 files changed, 70 insertions(+), 70 deletions(-) diff --git a/irobot_create_common/irobot_create_nodes/include/irobot_create_nodes/motion_control/behaviors_scheduler.hpp b/irobot_create_common/irobot_create_nodes/include/irobot_create_nodes/motion_control/behaviors_scheduler.hpp index 9f732e2e..2463b819 100644 --- a/irobot_create_common/irobot_create_nodes/include/irobot_create_nodes/motion_control/behaviors_scheduler.hpp +++ b/irobot_create_common/irobot_create_nodes/include/irobot_create_nodes/motion_control/behaviors_scheduler.hpp @@ -9,7 +9,7 @@ #include #include "boost/optional.hpp" -#include "geometry_msgs/msg/twist.hpp" +#include "geometry_msgs/msg/twist_stamped.hpp" #include "irobot_create_msgs/msg/hazard_detection_vector.hpp" #include "tf2/LinearMath/Transform.h" @@ -28,7 +28,7 @@ struct RobotState class BehaviorsScheduler { public: - using optional_output_t = boost::optional; + using optional_output_t = boost::optional; using run_behavior_func_t = std::function; using is_done_func_t = std::function; using cleanup_func_t = std::function; diff --git a/irobot_create_common/irobot_create_nodes/include/irobot_create_nodes/motion_control/drive_goal_behaviors.hpp b/irobot_create_common/irobot_create_nodes/include/irobot_create_nodes/motion_control/drive_goal_behaviors.hpp index ef3bd746..f874be7f 100644 --- a/irobot_create_common/irobot_create_nodes/include/irobot_create_nodes/motion_control/drive_goal_behaviors.hpp +++ b/irobot_create_common/irobot_create_nodes/include/irobot_create_nodes/motion_control/drive_goal_behaviors.hpp @@ -10,7 +10,7 @@ #include #include -#include "geometry_msgs/msg/twist.hpp" +#include "geometry_msgs/msg/twist_stamped.hpp" #include "irobot_create_nodes/motion_control/behaviors_scheduler.hpp" #include "irobot_create_msgs/action/drive_arc.hpp" #include "irobot_create_msgs/action/drive_distance.hpp" @@ -23,7 +23,7 @@ namespace irobot_create_nodes { -geometry_msgs::msg::Twist get_default_velocity_cmd(); +geometry_msgs::msg::TwistStamped get_default_velocity_cmd(); geometry_msgs::msg::PoseStamped get_current_pose_stamped( const rclcpp::Time & current_time, const tf2::Transform & pose); @@ -253,7 +253,7 @@ class DriveArcBehavior : public DriveGoalBaseBehavior first_iter_; - geometry_msgs::msg::Twist arc_velocity_cmd_; + geometry_msgs::msg::TwistStamped arc_velocity_cmd_; float translate_speed_; const float slow_angle_dist_ {0.4}; const float converge_angle_dist_ {M_PI / 360.0f}; @@ -292,7 +292,7 @@ class DriveDistanceBehavior float goal_travel_; tf2::Vector3 start_position_; std::atomic first_iter_; - geometry_msgs::msg::Twist drive_velocity_cmd_; + geometry_msgs::msg::TwistStamped drive_velocity_cmd_; float translate_speed_; const float slow_translate_dist_ {0.1}; const float converge_translate_dist_ {0.005}; @@ -328,7 +328,7 @@ class RotateAngleBehavior : public DriveGoalBaseBehavior first_iter_; - geometry_msgs::msg::Twist rotate_velocity_cmd_; + geometry_msgs::msg::TwistStamped rotate_velocity_cmd_; float servo_speed_; float max_rot_speed_radps_; const float slow_angle_dist_ {0.6}; @@ -369,7 +369,7 @@ class NavigateToPositionBehavior float remain_angle_travel_; int8_t start_sign_; std::atomic first_iter_; - geometry_msgs::msg::Twist rotate_velocity_cmd_; + geometry_msgs::msg::TwistStamped rotate_velocity_cmd_; float servo_speed_; float max_rot_speed_radps_; const float apply_ang_correction_thresh_ {0.05}; diff --git a/irobot_create_common/irobot_create_nodes/include/irobot_create_nodes/motion_control/simple_goal_controller.hpp b/irobot_create_common/irobot_create_nodes/include/irobot_create_nodes/motion_control/simple_goal_controller.hpp index 33be9d44..54bbc934 100644 --- a/irobot_create_common/irobot_create_nodes/include/irobot_create_nodes/motion_control/simple_goal_controller.hpp +++ b/irobot_create_common/irobot_create_nodes/include/irobot_create_nodes/motion_control/simple_goal_controller.hpp @@ -94,7 +94,7 @@ class SimpleGoalController gp.x - current_position.getX(), gp.y - current_position.getY()); if (dist_to_goal <= gp.radius) { - servo_vel = geometry_msgs::msg::Twist(); + servo_vel = geometry_msgs::msg::TwistStamped(); navigate_state_ = NavigateStates::GO_TO_GOAL_POSITION; } else { double ang = diff_angle(gp, current_position, current_angle); @@ -103,11 +103,11 @@ class SimpleGoalController ang = angles::normalize_angle(ang + M_PI); } bound_rotation(ang); - servo_vel = geometry_msgs::msg::Twist(); + servo_vel = geometry_msgs::msg::TwistStamped(); if (std::abs(ang) < TO_GOAL_ANGLE_CONVERGED) { navigate_state_ = NavigateStates::GO_TO_GOAL_POSITION; } else { - servo_vel->angular.z = ang; + servo_vel->twist.angular.z = ang; } } break; @@ -124,7 +124,7 @@ class SimpleGoalController // Angle is 180 from travel direction abs_ang = angles::normalize_angle(abs_ang + M_PI); } - servo_vel = geometry_msgs::msg::Twist(); + servo_vel = geometry_msgs::msg::TwistStamped(); // If robot is close enough to goal, move to final stage if (dist_to_goal < goal_points_.front().radius) { navigate_state_ = NavigateStates::GOAL_ANGLE; @@ -140,9 +140,9 @@ class SimpleGoalController if (gp.drive_backwards) { translate_velocity *= -1; } - servo_vel->linear.x = translate_velocity; + servo_vel->twist.linear.x = translate_velocity; if (abs_ang > GO_TO_GOAL_APPLY_ROTATION_ANGLE) { - servo_vel->angular.z = ang; + servo_vel->twist.angular.z = ang; } } break; @@ -153,12 +153,12 @@ class SimpleGoalController angles::shortest_angular_distance(current_angle, goal_points_.front().theta); bound_rotation(ang); if (std::abs(ang) > GOAL_ANGLE_CONVERGED) { - servo_vel = geometry_msgs::msg::Twist(); - servo_vel->angular.z = ang; + servo_vel = geometry_msgs::msg::TwistStamped(); + servo_vel->twist.angular.z = ang; } else { goal_points_.pop_front(); if (goal_points_.size() > 0) { - servo_vel = geometry_msgs::msg::Twist(); + servo_vel = geometry_msgs::msg::TwistStamped(); navigate_state_ = NavigateStates::ANGLE_TO_GOAL; } } diff --git a/irobot_create_common/irobot_create_nodes/include/irobot_create_nodes/motion_control_node.hpp b/irobot_create_common/irobot_create_nodes/include/irobot_create_nodes/motion_control_node.hpp index 279ad381..f7aa124b 100644 --- a/irobot_create_common/irobot_create_nodes/include/irobot_create_nodes/motion_control_node.hpp +++ b/irobot_create_common/irobot_create_nodes/include/irobot_create_nodes/motion_control_node.hpp @@ -82,7 +82,7 @@ class MotionControlNode : public rclcpp::Node void hazard_vector_callback(irobot_create_msgs::msg::HazardDetectionVector::ConstSharedPtr msg); /// \brief Callback for new velocity commands - void commanded_velocity_callback(geometry_msgs::msg::Twist::ConstSharedPtr msg); + void commanded_velocity_callback(geometry_msgs::msg::TwistStamped::ConstSharedPtr msg); /// \brief Callback for robot odometry void robot_pose_callback(nav_msgs::msg::Odometry::ConstSharedPtr msg); @@ -91,7 +91,7 @@ class MotionControlNode : public rclcpp::Node void kidnap_callback(irobot_create_msgs::msg::KidnapStatus::ConstSharedPtr msg); /// \brief Given command, bound by max speed, checking each wheel - void bound_command_by_limits(geometry_msgs::msg::Twist & cmd); + void bound_command_by_limits(geometry_msgs::msg::TwistStamped & cmd); /// These robot services live in ui-mgr node on robot, but here for convenience enum ResponseStatus : bool @@ -106,10 +106,10 @@ class MotionControlNode : public rclcpp::Node rclcpp::Subscription::SharedPtr hazard_detection_sub_; - rclcpp::Subscription::SharedPtr teleop_subscription_; + rclcpp::Subscription::SharedPtr teleop_subscription_; rclcpp::Subscription::SharedPtr odom_pose_sub_; rclcpp::Subscription::SharedPtr kidnap_sub_; - rclcpp::Publisher::SharedPtr cmd_vel_out_pub_; + rclcpp::Publisher::SharedPtr cmd_vel_out_pub_; rclcpp::Publisher::SharedPtr backup_limit_hazard_pub_; rclcpp::Publisher::SharedPtr wheel_status_pub_; rclcpp::TimerBase::SharedPtr control_timer_ {nullptr}; @@ -128,7 +128,7 @@ class MotionControlNode : public rclcpp::Node std::shared_ptr wall_follow_behavior_ {nullptr}; std::mutex mutex_; - geometry_msgs::msg::Twist last_teleop_cmd_; + geometry_msgs::msg::TwistStamped last_teleop_cmd_; rclcpp::Time last_teleop_ts_; rclcpp::Duration wheels_stop_threshold_; std::atomic allow_speed_param_change_ {false}; diff --git a/irobot_create_common/irobot_create_nodes/src/motion_control/drive_goal_behaviors.cpp b/irobot_create_common/irobot_create_nodes/src/motion_control/drive_goal_behaviors.cpp index bd5df683..3df71866 100644 --- a/irobot_create_common/irobot_create_nodes/src/motion_control/drive_goal_behaviors.cpp +++ b/irobot_create_common/irobot_create_nodes/src/motion_control/drive_goal_behaviors.cpp @@ -14,15 +14,15 @@ namespace irobot_create_nodes { //// Helper functions //// -geometry_msgs::msg::Twist get_default_velocity_cmd() +geometry_msgs::msg::TwistStamped get_default_velocity_cmd() { - geometry_msgs::msg::Twist default_cmd; - default_cmd.linear.x = 0; - default_cmd.linear.y = 0; - default_cmd.linear.z = 0; - default_cmd.angular.x = 0; - default_cmd.angular.y = 0; - default_cmd.angular.z = 0; + geometry_msgs::msg::TwistStamped default_cmd; + default_cmd.twist.linear.x = 0; + default_cmd.twist.linear.y = 0; + default_cmd.twist.linear.z = 0; + default_cmd.twist.angular.x = 0; + default_cmd.twist.angular.y = 0; + default_cmd.twist.angular.z = 0; return default_cmd; } geometry_msgs::msg::PoseStamped get_current_pose_stamped( @@ -74,10 +74,10 @@ void DriveArcBehavior::initialize_goal(const irobot_create_msgs::action::DriveAr const std::lock_guard lock(drive_arc_params_mutex_); arc_velocity_cmd_ = get_default_velocity_cmd(); - arc_velocity_cmd_.linear.x = max_speed; - arc_velocity_cmd_.angular.z = std::copysign(max_speed / std::abs(goal.radius), goal.angle); + arc_velocity_cmd_.twist.linear.x = max_speed; + arc_velocity_cmd_.twist.angular.z = std::copysign(max_speed / std::abs(goal.radius), goal.angle); if (goal.translate_direction == irobot_create_msgs::action::DriveArc::Goal::TRANSLATE_BACKWARD) { - arc_velocity_cmd_.linear.x *= -1.0f; + arc_velocity_cmd_.twist.linear.x *= -1.0f; } remain_angle_travel_ = goal.angle; start_sign_ = std::copysign(1, remain_angle_travel_); @@ -114,13 +114,13 @@ bool DriveArcBehavior::iterate_on_goal( } float scale = abs_remain_angle_travel / slow_angle_dist_; scale = std::max(scale, min_percent_); - output->linear.x = arc_velocity_cmd_.linear.x * scale; - output->angular.z = arc_velocity_cmd_.angular.z * scale; - float abs_linear = std::abs(output->linear.x); + output->twist.linear.x = arc_velocity_cmd_.twist.linear.x * scale; + output->twist.angular.z = arc_velocity_cmd_.twist.angular.z * scale; + float abs_linear = std::abs(output->twist.linear.x); if (abs_linear < min_controllable_) { float up_scale = min_controllable_ / abs_linear; - output->linear.x *= up_scale; - output->angular.z *= up_scale; + output->twist.linear.x *= up_scale; + output->twist.angular.z *= up_scale; } } } @@ -172,7 +172,7 @@ void DriveDistanceBehavior::initialize_goal( remaining_travel_ = goal_travel_; float max_speed = std::min(translate_speed_, goal.max_translation_speed); RCLCPP_INFO(logger_, "DriveDistance with distance %f, max_speed %f", goal.distance, max_speed); - drive_velocity_cmd_.linear.x = std::copysign(max_speed, goal_travel_); + drive_velocity_cmd_.twist.linear.x = std::copysign(max_speed, goal_travel_); } bool DriveDistanceBehavior::iterate_on_goal( @@ -204,8 +204,8 @@ bool DriveDistanceBehavior::iterate_on_goal( } abs_remaining = std::max(abs_remaining, min_translate_vel_); float remain_vel = std::copysign(abs_remaining, goal_travel_); - if (std::abs(remain_vel) < std::abs(output->linear.x)) { - output->linear.x = remain_vel; + if (std::abs(remain_vel) < std::abs(output->twist.linear.x)) { + output->twist.linear.x = remain_vel; } } } @@ -256,7 +256,7 @@ void RotateAngleBehavior::initialize_goal( start_sign_ = std::copysign(1, remain_angle_travel_); float max_speed = std::min(max_rot_speed_radps_, goal.max_rotation_speed); RCLCPP_INFO(logger_, "RotateAngle with angle %f, max_speed %f", goal.angle, max_speed); - rotate_velocity_cmd_.angular.z = std::copysign(max_speed, remain_angle_travel_); + rotate_velocity_cmd_.twist.angular.z = std::copysign(max_speed, remain_angle_travel_); } bool RotateAngleBehavior::iterate_on_goal( @@ -287,8 +287,8 @@ bool RotateAngleBehavior::iterate_on_goal( return true; } double slow_speed = std::max(abs_remain_angle_travel, min_angular_vel_); - if (slow_speed < std::abs(output->angular.z)) { - output->angular.z = std::copysign(slow_speed, remain_angle_travel_); + if (slow_speed < std::abs(output->twist.angular.z)) { + output->twist.angular.z = std::copysign(slow_speed, remain_angle_travel_); } } } @@ -428,7 +428,7 @@ bool NavigateToPositionBehavior::iterate_on_goal( // Look for deviation from goal while driving straight and apply small correction float goal_ang_diff = angle_to_goal(current_pose, goal_pose_); if (std::abs(goal_ang_diff) > apply_ang_correction_thresh_) { - output->angular.z += goal_ang_diff; + output->twist.angular.z += goal_ang_diff; } } } diff --git a/irobot_create_common/irobot_create_nodes/src/motion_control/reflex_behavior.cpp b/irobot_create_common/irobot_create_nodes/src/motion_control/reflex_behavior.cpp index cc975265..726415f8 100644 --- a/irobot_create_common/irobot_create_nodes/src/motion_control/reflex_behavior.cpp +++ b/irobot_create_common/irobot_create_nodes/src/motion_control/reflex_behavior.cpp @@ -254,23 +254,23 @@ BehaviorsScheduler::optional_output_t ReflexBehavior::execute_reflex( running_reflex_ = false; } else if (drive_dir != DriveAwayDirection::NO_HAZARD_TO_ESCAPE) { // Pick velocity to escape hazards based on hazard types and locations - servo_cmd = geometry_msgs::msg::Twist(); + servo_cmd = geometry_msgs::msg::TwistStamped(); switch (drive_dir) { case DriveAwayDirection::PURE_BACKUP: { - servo_cmd->linear.x = BACKUP_X_VELOCITY; + servo_cmd->twist.linear.x = BACKUP_X_VELOCITY; break; } case DriveAwayDirection::ARC_CLOCKWISE: { - servo_cmd->linear.x = ARC_X_VELOCITY; - servo_cmd->angular.z = -ARC_ANGULAR_VELOCITY; + servo_cmd->twist.linear.x = ARC_X_VELOCITY; + servo_cmd->twist.angular.z = -ARC_ANGULAR_VELOCITY; break; } case DriveAwayDirection::ARC_COUNTER_CLOCKWISE: { - servo_cmd->linear.x = ARC_X_VELOCITY; - servo_cmd->angular.z = ARC_ANGULAR_VELOCITY; + servo_cmd->twist.linear.x = ARC_X_VELOCITY; + servo_cmd->twist.angular.z = ARC_ANGULAR_VELOCITY; break; } case DriveAwayDirection::NO_HAZARD_TO_ESCAPE: // this code path is covered above diff --git a/irobot_create_common/irobot_create_nodes/src/motion_control/wall_follow_behavior.cpp b/irobot_create_common/irobot_create_nodes/src/motion_control/wall_follow_behavior.cpp index 79e5149a..49f12b21 100644 --- a/irobot_create_common/irobot_create_nodes/src/motion_control/wall_follow_behavior.cpp +++ b/irobot_create_common/irobot_create_nodes/src/motion_control/wall_follow_behavior.cpp @@ -208,9 +208,9 @@ BehaviorsScheduler::optional_output_t WallFollowBehavior::get_next_servo_cmd( current_state.pose, last_ir_intensity_, active_hazard_frames, wf_vel_cmd); } - BehaviorsScheduler::optional_output_t servo_cmd = geometry_msgs::msg::Twist(); - servo_cmd->linear.x = wf_vel_cmd.translate; - servo_cmd->angular.z = wf_vel_cmd.rotate; + BehaviorsScheduler::optional_output_t servo_cmd = geometry_msgs::msg::TwistStamped(); + servo_cmd->twist.linear.x = wf_vel_cmd.translate; + servo_cmd->twist.angular.z = wf_vel_cmd.rotate; return servo_cmd; } 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..a1dda9e5 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 @@ -111,7 +111,7 @@ MotionControlNode::MotionControlNode(const rclcpp::NodeOptions & options) std::bind(&MotionControlNode::hazard_vector_callback, this, _1)); // Create subscription to let other applications drive the robot - teleop_subscription_ = this->create_subscription( + teleop_subscription_ = this->create_subscription( "cmd_vel", rclcpp::SensorDataQoS(), std::bind(&MotionControlNode::commanded_velocity_callback, this, _1)); @@ -123,8 +123,8 @@ MotionControlNode::MotionControlNode(const rclcpp::NodeOptions & options) "kidnap_status", rclcpp::SensorDataQoS(), std::bind(&MotionControlNode::kidnap_callback, this, _1)); - cmd_vel_out_pub_ = this->create_publisher( - "diffdrive_controller/cmd_vel_unstamped", rclcpp::SystemDefaultsQoS()); + cmd_vel_out_pub_ = this->create_publisher( + "diffdrive_controller/cmd_vel", rclcpp::SystemDefaultsQoS()); backup_limit_hazard_pub_ = this->create_publisher( "_internal/backup_limit", rclcpp::SensorDataQoS().reliable()); @@ -257,7 +257,7 @@ void MotionControlNode::control_robot() // Create a null command if we don't have anything. // We also disable reflexes because the robot is in an idle state. if (!command) { - command = geometry_msgs::msg::Twist(); + command = geometry_msgs::msg::TwistStamped(); } else if (apply_backup_limits) { bound_command_by_limits(*command); } @@ -274,7 +274,7 @@ void MotionControlNode::control_robot() if (backup_printed_ && !backup_buffer_low_) { backup_printed_ = false; } - auto cmd_out_msg = std::make_unique(); + auto cmd_out_msg = std::make_unique(); if (!e_stop_engaged_) { *cmd_out_msg = *command; } @@ -330,7 +330,7 @@ void MotionControlNode::hazard_vector_callback( reflex_behavior_->update_hazards(current_state_); } -void MotionControlNode::commanded_velocity_callback(geometry_msgs::msg::Twist::ConstSharedPtr msg) +void MotionControlNode::commanded_velocity_callback(geometry_msgs::msg::TwistStamped::ConstSharedPtr msg) { if (scheduler_->has_behavior()) { const auto time_now = this->now(); @@ -371,18 +371,18 @@ void MotionControlNode::reset_last_teleop_cmd() last_teleop_ts_ = this->now(); } -void MotionControlNode::bound_command_by_limits(geometry_msgs::msg::Twist & cmd) +void MotionControlNode::bound_command_by_limits(geometry_msgs::msg::TwistStamped & cmd) { - if (std::abs(cmd.angular.z) > GYRO_MAX_ROTATE_SPEED_RAD_S) { - cmd.angular.z = std::copysign(GYRO_MAX_ROTATE_SPEED_RAD_S, cmd.angular.z); + if (std::abs(cmd.twist.angular.z) > GYRO_MAX_ROTATE_SPEED_RAD_S) { + cmd.twist.angular.z = std::copysign(GYRO_MAX_ROTATE_SPEED_RAD_S, cmd.twist.angular.z); } if (safety_override_mode_ == SafetyOverrideMode::NONE && backup_buffer_ <= 0.0 && - cmd.linear.x < 0.0) + cmd.twist.linear.x < 0.0) { // Robot has run out of room to backup - cmd.linear.x = 0.0; - cmd.angular.z = 0.0; + cmd.twist.linear.x = 0.0; + cmd.twist.angular.z = 0.0; const auto time_now = this->now(); if (!backup_printed_) { backup_printed_ = true; @@ -392,8 +392,8 @@ void MotionControlNode::bound_command_by_limits(geometry_msgs::msg::Twist & cmd) safety_override_param_name_.c_str()); } } else { - double left_vel = cmd.linear.x - cmd.angular.z * wheel_base_ / 2.0; - double right_vel = cmd.angular.z * wheel_base_ + left_vel; + double left_vel = cmd.twist.linear.x - cmd.twist.angular.z * wheel_base_ / 2.0; + double right_vel = cmd.twist.angular.z * wheel_base_ + left_vel; const double max_vel = std::max(std::abs(left_vel), std::abs(right_vel)); if (max_vel > 0 && max_vel > max_speed_) { const double scale = max_speed_ / max_vel; @@ -401,8 +401,8 @@ void MotionControlNode::bound_command_by_limits(geometry_msgs::msg::Twist & cmd) left_vel *= scale; right_vel *= scale; // Convert back to cartesian - cmd.linear.x = (left_vel + right_vel) / 2.0; - cmd.angular.z = (right_vel - left_vel) / wheel_base_; + cmd.twist.linear.x = (left_vel + right_vel) / 2.0; + cmd.twist.angular.z = (right_vel - left_vel) / wheel_base_; } } } From ac43b55a9372324805e9d81026577bb91aeca682 Mon Sep 17 00:00:00 2001 From: Chris Iverach-Brereton Date: Thu, 25 Jul 2024 13:11:19 -0400 Subject: [PATCH 16/34] Override the backup safety for now; it seems to be clobbering the undock behaviour --- .../launch/create3_nodes.launch.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 ca2833b5..bafd600c 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 @@ -75,7 +75,10 @@ def generate_launch_description(): package='irobot_create_nodes', name='motion_control', executable='motion_control', - parameters=[{'use_sim_time': True}], + parameters=[{ + 'use_sim_time': True, + 'safety_override': 'backup_only' + }], output='screen', remappings=[ ('/tf', 'tf'), From f34e8b3a979cfc780e05996942016b8e5c26e49c Mon Sep 17 00:00:00 2001 From: Chris Iverach-Brereton Date: Thu, 25 Jul 2024 15:15:49 -0400 Subject: [PATCH 17/34] Update the gz_ros_bridge to use stamped messages for cmd_vel --- .../launch/create3_ros_gz_bridge.launch.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/irobot_create_gz/irobot_create_gz_bringup/launch/create3_ros_gz_bridge.launch.py b/irobot_create_gz/irobot_create_gz_bringup/launch/create3_ros_gz_bridge.launch.py index ced37aae..66df2026 100644 --- a/irobot_create_gz/irobot_create_gz_bringup/launch/create3_ros_gz_bridge.launch.py +++ b/irobot_create_gz/irobot_create_gz_bringup/launch/create3_ros_gz_bridge.launch.py @@ -57,15 +57,15 @@ def generate_launch_description(): }], arguments=[ [namespace, - '/cmd_vel' + '@geometry_msgs/msg/Twist' + '[ignition.msgs.Twist'], + '/cmd_vel' + '@geometry_msgs/msg/TwistStamped' + '[ignition.msgs.Twist'], ['/model/', robot_name, '/cmd_vel' + - '@geometry_msgs/msg/Twist' + + '@geometry_msgs/msg/TwistStamped' + ']ignition.msgs.Twist'] ], remappings=[ ([namespace, '/cmd_vel'], 'cmd_vel'), (['/model/', robot_name, '/cmd_vel'], - 'diffdrive_controller/cmd_vel_unstamped') + 'diffdrive_controller/cmd_vel') ]) # Pose bridge From 990a68bc85d9c6643979e7b3196458c80bf3f239 Mon Sep 17 00:00:00 2001 From: Chris Iverach-Brereton Date: Fri, 26 Jul 2024 16:01:11 -0400 Subject: [PATCH 18/34] Don't allow the dock/undock actions to be preempted --- .../src/motion_control/docking_behavior.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/irobot_create_common/irobot_create_nodes/src/motion_control/docking_behavior.cpp b/irobot_create_common/irobot_create_nodes/src/motion_control/docking_behavior.cpp index d4a574da..16459fe5 100644 --- a/irobot_create_common/irobot_create_nodes/src/motion_control/docking_behavior.cpp +++ b/irobot_create_common/irobot_create_nodes/src/motion_control/docking_behavior.cpp @@ -154,7 +154,7 @@ void DockingBehavior::handle_dock_servo_accepted( BehaviorsScheduler::BehaviorsData data; data.run_func = std::bind(&DockingBehavior::execute_dock_servo, this, goal_handle, _1); data.is_done_func = std::bind(&DockingBehavior::docking_behavior_is_done, this); - data.stop_on_new_behavior = true; + data.stop_on_new_behavior = false; data.apply_backup_limits = false; const bool ret = behavior_scheduler_->set_behavior(data); @@ -291,7 +291,7 @@ void DockingBehavior::handle_undock_accepted( BehaviorsScheduler::BehaviorsData data; data.run_func = std::bind(&DockingBehavior::execute_undock, this, goal_handle, _1); data.is_done_func = std::bind(&DockingBehavior::docking_behavior_is_done, this); - data.stop_on_new_behavior = true; + data.stop_on_new_behavior = false; data.apply_backup_limits = false; const bool ret = behavior_scheduler_->set_behavior(data); From 13f4ee037ef715661325113ce9aaa356784206e5 Mon Sep 17 00:00:00 2001 From: Chris Iverach-Brereton Date: Mon, 29 Jul 2024 14:01:43 -0400 Subject: [PATCH 19/34] Add the InteractiveViewControl so we can move the camera around inside Gazebo --- .../irobot_create_gz_bringup/gui/create3/gui.config | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/irobot_create_gz/irobot_create_gz_bringup/gui/create3/gui.config b/irobot_create_gz/irobot_create_gz_bringup/gui/create3/gui.config index 2b915f82..d07f693c 100644 --- a/irobot_create_gz/irobot_create_gz_bringup/gui/create3/gui.config +++ b/irobot_create_gz/irobot_create_gz_bringup/gui/create3/gui.config @@ -19,6 +19,12 @@ floating + + + false + floating + + From c01cddfd8c9f0d73ba1c8e26eb9e3fbd04111de5 Mon Sep 17 00:00:00 2001 From: Chris Iverach-Brereton Date: Mon, 29 Jul 2024 14:17:28 -0400 Subject: [PATCH 20/34] Reduce the width of wall 12 so the robot's default spawn location doesn't clip into the wall --- irobot_create_gz/irobot_create_gz_bringup/worlds/maze.sdf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/irobot_create_gz/irobot_create_gz_bringup/worlds/maze.sdf b/irobot_create_gz/irobot_create_gz_bringup/worlds/maze.sdf index 4a4492d1..3a3a10a7 100644 --- a/irobot_create_gz/irobot_create_gz_bringup/worlds/maze.sdf +++ b/irobot_create_gz/irobot_create_gz_bringup/worlds/maze.sdf @@ -362,19 +362,19 @@ - 0 5 0 0 0 0 + 0 5.5 0 0 0 0 true - 2 10 1 + 2 9 1 - 2 10 1 + 2 9 1 From 1de4ba06441e9d656f41d0363bcd712c4c47f610 Mon Sep 17 00:00:00 2001 From: Chris Iverach-Brereton Date: Mon, 29 Jul 2024 14:17:57 -0400 Subject: [PATCH 21/34] Add launch instructions to the readme --- .../irobot_create_gz_bringup/README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/irobot_create_gz/irobot_create_gz_bringup/README.md b/irobot_create_gz/irobot_create_gz_bringup/README.md index b6c9738f..ad47c01b 100644 --- a/irobot_create_gz/irobot_create_gz_bringup/README.md +++ b/irobot_create_gz/irobot_create_gz_bringup/README.md @@ -1 +1,16 @@ # turtlebot4_gz + +To launch the simulation, run +```bash +ros2 launch irobot_create_gz_bringup create3_gz.launch.py +``` + +Wait for the simulation environment to load completely, then press the orange `play` button in the +lower-left corner to start the simulation. The robot starts docked on its charger. + +## Worlds + +The default simulation world is the `depot` environment. To chage worlds, use the `world` +argument. Supported worlds are: +- `depot` (default) +- `maze` \ No newline at end of file From ccc4134fc61ead9045aefbc7aad487cc99a380ba Mon Sep 17 00:00:00 2001 From: Chris Iverach-Brereton Date: Mon, 29 Jul 2024 14:19:57 -0400 Subject: [PATCH 22/34] Add note about how to change initial pose --- irobot_create_gz/irobot_create_gz_bringup/README.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/irobot_create_gz/irobot_create_gz_bringup/README.md b/irobot_create_gz/irobot_create_gz_bringup/README.md index ad47c01b..8b23bc13 100644 --- a/irobot_create_gz/irobot_create_gz_bringup/README.md +++ b/irobot_create_gz/irobot_create_gz_bringup/README.md @@ -13,4 +13,10 @@ lower-left corner to start the simulation. The robot starts docked on its charg The default simulation world is the `depot` environment. To chage worlds, use the `world` argument. Supported worlds are: - `depot` (default) -- `maze` \ No newline at end of file +- `maze` + +## Robot spawn location + +By default the robot spawns at the origin. To change the robot's spawn location, use the +`x`, `y`, `z` and `yaw` arguments. Note that changing `z` may result in the robot spawning +in the air or below the ground plane, depending in the value used. \ No newline at end of file From 46bd4bddc5ced38c16fa0bc2232008649874305d Mon Sep 17 00:00:00 2001 From: Chris Iverach-Brereton Date: Tue, 30 Jul 2024 12:12:33 -0400 Subject: [PATCH 23/34] Fix logging for the buttons plugin --- .../irobot_create_gz_plugins/Create3Hmi/Create3Hmi.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/irobot_create_gz/irobot_create_gz_plugins/Create3Hmi/Create3Hmi.cc b/irobot_create_gz/irobot_create_gz_plugins/Create3Hmi/Create3Hmi.cc index d042b776..0ba3a0f0 100644 --- a/irobot_create_gz/irobot_create_gz_plugins/Create3Hmi/Create3Hmi.cc +++ b/irobot_create_gz/irobot_create_gz_plugins/Create3Hmi/Create3Hmi.cc @@ -57,7 +57,7 @@ void Create3Hmi::OnCreate3Button(const int button) button_msg.set_data(button); if (!this->create3_button_pub_.Publish(button_msg)) { - ignerr << "gz::msgs::Int32 message couldn't be published at topic: " << + gzerr << "gz::msgs::Int32 message couldn't be published at topic: " << this->create3_button_topic_ << std::endl; } } @@ -72,7 +72,7 @@ void Create3Hmi::SetNamespace(const QString &_name) this->namespace_ = _name.toStdString(); this->create3_button_topic_ = this->namespace_ + "/create3_buttons"; - ignmsg << "A new robot name has been entered, publishing on topic: '" << + gzlog << "A new robot name has been entered, publishing on topic: '" << this->create3_button_topic_ << " ' " <findChild()->notifyWithDuration( QString::fromStdString("Error when advertising topic: " + this->create3_button_topic_), 4000); - ignerr << "Error when advertising topic: " << + gzerr << "Error when advertising topic: " << this->create3_button_topic_ << std::endl; }else { App()->findChild()->notifyWithDuration( From 772418422ee85fd200975a69bdc47ebe2a4ff492 Mon Sep 17 00:00:00 2001 From: Chris Iverach-Brereton Date: Tue, 13 Aug 2024 09:12:53 -0400 Subject: [PATCH 24/34] Revert accidental change to changelog --- irobot_create_gz/irobot_create_gz_bringup/CHANGELOG.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/irobot_create_gz/irobot_create_gz_bringup/CHANGELOG.rst b/irobot_create_gz/irobot_create_gz_bringup/CHANGELOG.rst index de7d2d82..3122f825 100644 --- a/irobot_create_gz/irobot_create_gz_bringup/CHANGELOG.rst +++ b/irobot_create_gz/irobot_create_gz_bringup/CHANGELOG.rst @@ -5,7 +5,7 @@ Changelog for package irobot_create_gz_bringup 2.1.0 (2023-05-15) ------------------ * Multi robot support (`#207 `_) -* Added gz_ros2_control dependency as it is released now. (`#204 `_) +* Added ign_ros2_control dependency as it is released now. (`#204 `_) * Contributors: Roni Kreinin, roni-kreinin 2.0.0 (2023-01-19) From ba07a502c2ba6ad05d1eb6c8eca9ae5fcfd6d254 Mon Sep 17 00:00:00 2001 From: Chris Iverach-Brereton Date: Tue, 13 Aug 2024 09:26:49 -0400 Subject: [PATCH 25/34] Revert changes to CMakeLists --- irobot_create_common/irobot_create_common_bringup/CMakeLists.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/irobot_create_common/irobot_create_common_bringup/CMakeLists.txt b/irobot_create_common/irobot_create_common_bringup/CMakeLists.txt index c7a34366..cc7942f5 100644 --- a/irobot_create_common/irobot_create_common_bringup/CMakeLists.txt +++ b/irobot_create_common/irobot_create_common_bringup/CMakeLists.txt @@ -12,7 +12,6 @@ endif() find_package(ament_cmake REQUIRED) find_package(ament_cmake_python REQUIRED) -find_package(rclpy REQUIRED) install( DIRECTORY From f7bdf15be18d0116c0c52afa2a33682da5519419 Mon Sep 17 00:00:00 2001 From: Chris Iverach-Brereton Date: Tue, 13 Aug 2024 09:37:24 -0400 Subject: [PATCH 26/34] Set the time in the stamped twist message headers --- .../src/motion_control/drive_goal_behaviors.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/irobot_create_common/irobot_create_nodes/src/motion_control/drive_goal_behaviors.cpp b/irobot_create_common/irobot_create_nodes/src/motion_control/drive_goal_behaviors.cpp index 3df71866..9f6a2c37 100644 --- a/irobot_create_common/irobot_create_nodes/src/motion_control/drive_goal_behaviors.cpp +++ b/irobot_create_common/irobot_create_nodes/src/motion_control/drive_goal_behaviors.cpp @@ -14,7 +14,9 @@ namespace irobot_create_nodes { //// Helper functions //// -geometry_msgs::msg::TwistStamped get_default_velocity_cmd() +geometry_msgs::msg::TwistStamped get_default_velocity_cmd( + const rclcpp::Time & current_time +) { geometry_msgs::msg::TwistStamped default_cmd; default_cmd.twist.linear.x = 0; @@ -23,6 +25,7 @@ geometry_msgs::msg::TwistStamped get_default_velocity_cmd() default_cmd.twist.angular.x = 0; default_cmd.twist.angular.y = 0; default_cmd.twist.angular.z = 0; + default_cmd.header.stamp = current_time; return default_cmd; } geometry_msgs::msg::PoseStamped get_current_pose_stamped( @@ -73,7 +76,8 @@ void DriveArcBehavior::initialize_goal(const irobot_create_msgs::action::DriveAr goal.radius, goal.angle, max_speed); const std::lock_guard lock(drive_arc_params_mutex_); - arc_velocity_cmd_ = get_default_velocity_cmd(); + rclcpp::Time current_time = clock_->now(); + arc_velocity_cmd_ = get_default_velocity_cmd(current_time); arc_velocity_cmd_.twist.linear.x = max_speed; arc_velocity_cmd_.twist.angular.z = std::copysign(max_speed / std::abs(goal.radius), goal.angle); if (goal.translate_direction == irobot_create_msgs::action::DriveArc::Goal::TRANSLATE_BACKWARD) { @@ -166,7 +170,8 @@ void DriveDistanceBehavior::initialize_goal( { first_iter_ = true; const std::lock_guard lock(drive_distance_params_mutex_); - drive_velocity_cmd_ = get_default_velocity_cmd(); + rclcpp::Time current_time = clock_->now(); + drive_velocity_cmd_ = get_default_velocity_cmd(current_time); goal_travel_ = goal.distance; travel_distance_sq_ = goal_travel_ * goal_travel_; remaining_travel_ = goal_travel_; @@ -251,7 +256,8 @@ void RotateAngleBehavior::initialize_goal( { first_iter_ = true; const std::lock_guard lock(rotate_angle_params_mutex_); - rotate_velocity_cmd_ = get_default_velocity_cmd(); + rclcpp::Time current_time = clock_->now(); + rotate_velocity_cmd_ = get_default_velocity_cmd(current_time); remain_angle_travel_ = goal.angle; start_sign_ = std::copysign(1, remain_angle_travel_); float max_speed = std::min(max_rot_speed_radps_, goal.max_rotation_speed); From 46865fe7bbc1c5bb477ceeda9e1cade85f8a7d38 Mon Sep 17 00:00:00 2001 From: Chris Iverach-Brereton Date: Tue, 13 Aug 2024 10:30:49 -0400 Subject: [PATCH 27/34] Revert get_default_velocity_cmd to have no parameters as it's used externally, set the stamp outside that function (since we may create the command, do some math, and then publish it later). Add an unstamped velocity command input --- .../motion_control_node.hpp | 3 ++ .../motion_control/drive_goal_behaviors.cpp | 17 +++++------ .../src/motion_control_node.cpp | 28 +++++++++++++++++++ 3 files changed, 38 insertions(+), 10 deletions(-) diff --git a/irobot_create_common/irobot_create_nodes/include/irobot_create_nodes/motion_control_node.hpp b/irobot_create_common/irobot_create_nodes/include/irobot_create_nodes/motion_control_node.hpp index f7aa124b..59ab536c 100644 --- a/irobot_create_common/irobot_create_nodes/include/irobot_create_nodes/motion_control_node.hpp +++ b/irobot_create_common/irobot_create_nodes/include/irobot_create_nodes/motion_control_node.hpp @@ -13,6 +13,7 @@ #include "tf2_ros/transform_listener.h" #include "geometry_msgs/msg/twist.hpp" +#include "geometry_msgs/msg/twist_stamped.hpp" #include "irobot_create_msgs/msg/kidnap_status.hpp" #include "irobot_create_msgs/msg/hazard_detection.hpp" #include "irobot_create_msgs/msg/wheel_status.hpp" @@ -83,6 +84,7 @@ class MotionControlNode : public rclcpp::Node /// \brief Callback for new velocity commands void commanded_velocity_callback(geometry_msgs::msg::TwistStamped::ConstSharedPtr msg); + void commanded_velocity_unstamped_callback(geometry_msgs::msg::Twist::ConstSharedPtr msg); /// \brief Callback for robot odometry void robot_pose_callback(nav_msgs::msg::Odometry::ConstSharedPtr msg); @@ -107,6 +109,7 @@ class MotionControlNode : public rclcpp::Node rclcpp::Subscription::SharedPtr hazard_detection_sub_; rclcpp::Subscription::SharedPtr teleop_subscription_; + rclcpp::Subscription::SharedPtr teleop_unstamped_subscription_; rclcpp::Subscription::SharedPtr odom_pose_sub_; rclcpp::Subscription::SharedPtr kidnap_sub_; rclcpp::Publisher::SharedPtr cmd_vel_out_pub_; diff --git a/irobot_create_common/irobot_create_nodes/src/motion_control/drive_goal_behaviors.cpp b/irobot_create_common/irobot_create_nodes/src/motion_control/drive_goal_behaviors.cpp index 9f6a2c37..0d38cab2 100644 --- a/irobot_create_common/irobot_create_nodes/src/motion_control/drive_goal_behaviors.cpp +++ b/irobot_create_common/irobot_create_nodes/src/motion_control/drive_goal_behaviors.cpp @@ -14,9 +14,7 @@ namespace irobot_create_nodes { //// Helper functions //// -geometry_msgs::msg::TwistStamped get_default_velocity_cmd( - const rclcpp::Time & current_time -) +geometry_msgs::msg::TwistStamped get_default_velocity_cmd() { geometry_msgs::msg::TwistStamped default_cmd; default_cmd.twist.linear.x = 0; @@ -25,7 +23,6 @@ geometry_msgs::msg::TwistStamped get_default_velocity_cmd( default_cmd.twist.angular.x = 0; default_cmd.twist.angular.y = 0; default_cmd.twist.angular.z = 0; - default_cmd.header.stamp = current_time; return default_cmd; } geometry_msgs::msg::PoseStamped get_current_pose_stamped( @@ -76,8 +73,8 @@ void DriveArcBehavior::initialize_goal(const irobot_create_msgs::action::DriveAr goal.radius, goal.angle, max_speed); const std::lock_guard lock(drive_arc_params_mutex_); - rclcpp::Time current_time = clock_->now(); - arc_velocity_cmd_ = get_default_velocity_cmd(current_time); + arc_velocity_cmd_ = get_default_velocity_cmd(); + arc_velocity_cmd_.header.stamp = clock_->now(); arc_velocity_cmd_.twist.linear.x = max_speed; arc_velocity_cmd_.twist.angular.z = std::copysign(max_speed / std::abs(goal.radius), goal.angle); if (goal.translate_direction == irobot_create_msgs::action::DriveArc::Goal::TRANSLATE_BACKWARD) { @@ -170,8 +167,8 @@ void DriveDistanceBehavior::initialize_goal( { first_iter_ = true; const std::lock_guard lock(drive_distance_params_mutex_); - rclcpp::Time current_time = clock_->now(); - drive_velocity_cmd_ = get_default_velocity_cmd(current_time); + drive_velocity_cmd_ = get_default_velocity_cmd(); + drive_velocity_cmd_.header.stamp = clock_->now(); goal_travel_ = goal.distance; travel_distance_sq_ = goal_travel_ * goal_travel_; remaining_travel_ = goal_travel_; @@ -256,8 +253,8 @@ void RotateAngleBehavior::initialize_goal( { first_iter_ = true; const std::lock_guard lock(rotate_angle_params_mutex_); - rclcpp::Time current_time = clock_->now(); - rotate_velocity_cmd_ = get_default_velocity_cmd(current_time); + rotate_velocity_cmd_ = get_default_velocity_cmd(); + rotate_velocity_cmd_.header.stamp = clock_->now(); remain_angle_travel_ = goal.angle; start_sign_ = std::copysign(1, remain_angle_travel_); float max_speed = std::min(max_rot_speed_radps_, goal.max_rotation_speed); 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 a1dda9e5..77ba54bf 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 @@ -114,6 +114,9 @@ MotionControlNode::MotionControlNode(const rclcpp::NodeOptions & options) teleop_subscription_ = this->create_subscription( "cmd_vel", rclcpp::SensorDataQoS(), std::bind(&MotionControlNode::commanded_velocity_callback, this, _1)); + teleop_unstamped_subscription_ = this->create_subscription( + "cmd_vel_unstamped", rclcpp::SensorDataQoS(), + std::bind(&MotionControlNode::commanded_velocity_unstamped_callback, this, _1)); odom_pose_sub_ = this->create_subscription( "odom", rclcpp::SensorDataQoS(), @@ -349,6 +352,30 @@ void MotionControlNode::commanded_velocity_callback(geometry_msgs::msg::TwistSta last_teleop_ts_ = this->now(); } + +void MotionControlNode::commanded_velocity_unstamped_callback(geometry_msgs::msg::Twist::ConstSharedPtr msg) +{ + geometry_msgs::msg::TwistStamped stamped_msg; + stamped_msg.twist = *msg; + stamped_msg.header.stamp = this->get_clock()->now(); + + if (scheduler_->has_behavior()) { + const auto time_now = this->now(); + if (time_now - auto_override_print_ts_ > repeat_print_) { + auto_override_print_ts_ = time_now; + RCLCPP_WARN( + this->get_logger(), + "Ignoring velocities commanded while an autonomous behavior is running!"); + } + return; + } + + const std::lock_guard lock(mutex_); + + last_teleop_cmd_ = stamped_msg; + last_teleop_ts_ = this->now(); +} + void MotionControlNode::robot_pose_callback(nav_msgs::msg::Odometry::ConstSharedPtr msg) { const std::lock_guard lock(current_state_mutex_); @@ -368,6 +395,7 @@ void MotionControlNode::reset_last_teleop_cmd() const std::lock_guard lock(mutex_); last_teleop_cmd_ = get_default_velocity_cmd(); + last_teleop_cmd_.header.stamp = this->get_clock()->now(); last_teleop_ts_ = this->now(); } From cbe7a8ef6b8eaf09b08ca17272d8d5670d5cff72 Mon Sep 17 00:00:00 2001 From: Chris Iverach-Brereton Date: Wed, 14 Aug 2024 10:59:58 -0400 Subject: [PATCH 28/34] Revert additional changelog modifications --- .../irobot_create_gz_bringup/CHANGELOG.rst | 16 ++++++++-------- .../irobot_create_gz_plugins/CHANGELOG.rst | 12 ++++++------ .../irobot_create_gz_sim/CHANGELOG.rst | 10 +++++----- .../irobot_create_gz_toolbox/CHANGELOG.rst | 14 +++++++------- 4 files changed, 26 insertions(+), 26 deletions(-) diff --git a/irobot_create_gz/irobot_create_gz_bringup/CHANGELOG.rst b/irobot_create_gz/irobot_create_gz_bringup/CHANGELOG.rst index 3122f825..4a90d5a7 100644 --- a/irobot_create_gz/irobot_create_gz_bringup/CHANGELOG.rst +++ b/irobot_create_gz/irobot_create_gz_bringup/CHANGELOG.rst @@ -1,5 +1,5 @@ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Changelog for package irobot_create_gz_bringup +Changelog for package irobot_create_ignition_bringup ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2.1.0 (2023-05-15) @@ -13,7 +13,7 @@ Changelog for package irobot_create_gz_bringup * Update to ROS 2 Humble (`#197 `_) * Update message names to https://github.com/iRobotEducation/irobot_create_msgs/pull/10 * rename dock topic into dock_status - * comment gz_ros2_control dependency as it must be built from sources + * comment ign_ros2_control dependency as it must be built from sources Co-authored-by: Francisco Martín Rico * add missing dependency to irobot-create-common-bringup (`#186 `_) * Contributors: Alberto Soragna, Francisco Martín Rico @@ -39,8 +39,8 @@ Changelog for package irobot_create_gz_bringup * use new node names in parameter files * remove declare parameter utility and fix linter tests * Added pose publisher (`#154 `_) -* Use gz_ros2_control (`#148 `_) - * Use gz_ros2_control +* Use ign_ros2_control (`#148 `_) + * Use ign_ros2_control * Removed remapping * Documentation * fix gazebo ignition world name (`#150 `_) @@ -56,14 +56,14 @@ Changelog for package irobot_create_gz_bringup Cleaned up gazebo launch arg Adjusted front caster position * Simulation -> simulator - * Added irobot_create_gz packages + * Added irobot_create_ignition packages * Fixed some linter warnings - * Removed joint state publisher from ros_gz_bridge + * Removed joint state publisher from ros_ign_bridge * - Reorganized packages - Shifted center of gravity of create3 forwards by 22.8 mm - Added min/max velocity and acceleration to diff drive plugin * Moved README.md to irobot_create_gazebo - Created new README.md for irobot_create_gz + Created new README.md for irobot_create_ignition * Update README.md * Added ignition edifice repos for source installation * Create README.md @@ -74,7 +74,7 @@ Changelog for package irobot_create_gz_bringup * Updated README to have installation and example instructions for both Ignition and Classic Moved .repos files to the root of the repository * Ignition and Gazebo packages are now optional and only built if the required dependencies are installed - * Made ros_gz_interfaces optional in irobot_create_gz_bringup + * Made ros_ign_interfaces optional in irobot_create_ignition_bringup * fix license and minor changes to CMake and README * Interface buttons mock publisher not used in Ignition sim * Fixed linter errors diff --git a/irobot_create_gz/irobot_create_gz_plugins/CHANGELOG.rst b/irobot_create_gz/irobot_create_gz_plugins/CHANGELOG.rst index 39226262..13049f08 100644 --- a/irobot_create_gz/irobot_create_gz_plugins/CHANGELOG.rst +++ b/irobot_create_gz/irobot_create_gz_plugins/CHANGELOG.rst @@ -1,5 +1,5 @@ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Changelog for package irobot_create_gz_plugins +Changelog for package irobot_create_ignition_plugins ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2.1.0 (2023-05-15) @@ -12,7 +12,7 @@ Changelog for package irobot_create_gz_plugins * Update to ROS 2 Humble (`#197 `_) * Update message names to https://github.com/iRobotEducation/irobot_create_msgs/pull/10 * rename dock topic into dock_status - * comment gz_ros2_control dependency as it must be built from sources + * comment ign_ros2_control dependency as it must be built from sources Co-authored-by: Francisco Martín Rico * add missing dependency to irobot-create-common-bringup (`#186 `_) * Contributors: Alberto Soragna, Francisco Martín Rico @@ -37,14 +37,14 @@ Changelog for package irobot_create_gz_plugins Cleaned up gazebo launch arg Adjusted front caster position * Simulation -> simulator - * Added irobot_create_gz packages + * Added irobot_create_ignition packages * Fixed some linter warnings - * Removed joint state publisher from ros_gz_bridge + * Removed joint state publisher from ros_ign_bridge * - Reorganized packages - Shifted center of gravity of create3 forwards by 22.8 mm - Added min/max velocity and acceleration to diff drive plugin * Moved README.md to irobot_create_gazebo - Created new README.md for irobot_create_gz + Created new README.md for irobot_create_ignition * Update README.md * Added ignition edifice repos for source installation * Create README.md @@ -55,7 +55,7 @@ Changelog for package irobot_create_gz_plugins * Updated README to have installation and example instructions for both Ignition and Classic Moved .repos files to the root of the repository * Ignition and Gazebo packages are now optional and only built if the required dependencies are installed - * Made ros_gz_interfaces optional in irobot_create_gz_bringup + * Made ros_ign_interfaces optional in irobot_create_ignition_bringup * fix license and minor changes to CMake and README * Interface buttons mock publisher not used in Ignition sim * Fixed linter errors diff --git a/irobot_create_gz/irobot_create_gz_sim/CHANGELOG.rst b/irobot_create_gz/irobot_create_gz_sim/CHANGELOG.rst index 65e35dcf..bfc2aec9 100644 --- a/irobot_create_gz/irobot_create_gz_sim/CHANGELOG.rst +++ b/irobot_create_gz/irobot_create_gz_sim/CHANGELOG.rst @@ -1,5 +1,5 @@ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Changelog for package irobot_create_gz_sim +Changelog for package irobot_create_ignition_sim ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2.1.0 (2023-05-15) @@ -37,14 +37,14 @@ Changelog for package irobot_create_gz_sim Cleaned up gazebo launch arg Adjusted front caster position * Simulation -> simulator - * Added irobot_create_gz packages + * Added irobot_create_ignition packages * Fixed some linter warnings - * Removed joint state publisher from ros_gz_bridge + * Removed joint state publisher from ros_ign_bridge * - Reorganized packages - Shifted center of gravity of create3 forwards by 22.8 mm - Added min/max velocity and acceleration to diff drive plugin * Moved README.md to irobot_create_gazebo - Created new README.md for irobot_create_gz + Created new README.md for irobot_create_ignition * Update README.md * Added ignition edifice repos for source installation * Create README.md @@ -55,7 +55,7 @@ Changelog for package irobot_create_gz_sim * Updated README to have installation and example instructions for both Ignition and Classic Moved .repos files to the root of the repository * Ignition and Gazebo packages are now optional and only built if the required dependencies are installed - * Made ros_gz_interfaces optional in irobot_create_gz_bringup + * Made ros_ign_interfaces optional in irobot_create_ignition_bringup * fix license and minor changes to CMake and README * Interface buttons mock publisher not used in Ignition sim * Fixed linter errors diff --git a/irobot_create_gz/irobot_create_gz_toolbox/CHANGELOG.rst b/irobot_create_gz/irobot_create_gz_toolbox/CHANGELOG.rst index 2cf5b712..dfa501cd 100644 --- a/irobot_create_gz/irobot_create_gz_toolbox/CHANGELOG.rst +++ b/irobot_create_gz/irobot_create_gz_toolbox/CHANGELOG.rst @@ -1,5 +1,5 @@ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -Changelog for package irobot_create_gz_toolbox +Changelog for package irobot_create_ignition_toolbox ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 2.1.0 (2023-05-15) @@ -12,12 +12,12 @@ Changelog for package irobot_create_gz_toolbox * Update to ROS 2 Humble (`#197 `_) * Update message names to https://github.com/iRobotEducation/irobot_create_msgs/pull/10 * rename dock topic into dock_status - * comment gz_ros2_control dependency as it must be built from sources + * comment ign_ros2_control dependency as it must be built from sources Co-authored-by: Francisco Martín Rico * add missing dependency to irobot-create-common-bringup (`#186 `_) * Renamed Ignition Toolbox libraries (`#178 `_) * Renamed Ignition Toolbox libraries - * Pre-pend library names with irobot_create_gz + * Pre-pend library names with irobot_create_ignition * Contributors: Alberto Soragna, Francisco Martín Rico, roni-kreinin 1.0.1 (2022-04-12) @@ -51,14 +51,14 @@ Changelog for package irobot_create_gz_toolbox Cleaned up gazebo launch arg Adjusted front caster position * Simulation -> simulator - * Added irobot_create_gz packages + * Added irobot_create_ignition packages * Fixed some linter warnings - * Removed joint state publisher from ros_gz_bridge + * Removed joint state publisher from ros_ign_bridge * - Reorganized packages - Shifted center of gravity of create3 forwards by 22.8 mm - Added min/max velocity and acceleration to diff drive plugin * Moved README.md to irobot_create_gazebo - Created new README.md for irobot_create_gz + Created new README.md for irobot_create_ignition * Update README.md * Added ignition edifice repos for source installation * Create README.md @@ -69,7 +69,7 @@ Changelog for package irobot_create_gz_toolbox * Updated README to have installation and example instructions for both Ignition and Classic Moved .repos files to the root of the repository * Ignition and Gazebo packages are now optional and only built if the required dependencies are installed - * Made ros_gz_interfaces optional in irobot_create_gz_bringup + * Made ros_ign_interfaces optional in irobot_create_ignition_bringup * fix license and minor changes to CMake and README * Interface buttons mock publisher not used in Ignition sim * Fixed linter errors From 4747b1bb56fbd2ef3765d88edfcc9fe47ebcde27 Mon Sep 17 00:00:00 2001 From: Chris Iverach-Brereton Date: Thu, 15 Aug 2024 11:59:10 -0400 Subject: [PATCH 29/34] Add dependency on gz_gui_vendor (provides gz-gui8) --- irobot_create_gz/irobot_create_gz_plugins/package.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/irobot_create_gz/irobot_create_gz_plugins/package.xml b/irobot_create_gz/irobot_create_gz_plugins/package.xml index bd3c3d2a..23ed82f1 100644 --- a/irobot_create_gz/irobot_create_gz_plugins/package.xml +++ b/irobot_create_gz/irobot_create_gz_plugins/package.xml @@ -8,6 +8,7 @@ BSD ament_cmake + gz_gui_vendor ros_gz From edfc92713c4aa33cbfc7399b5213d6e6352f1437 Mon Sep 17 00:00:00 2001 From: Chris Iverach-Brereton Date: Thu, 15 Aug 2024 14:20:14 -0400 Subject: [PATCH 30/34] Add dependency on gz_math_vendor (provides gz-math7) --- irobot_create_common/irobot_create_toolbox/package.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/irobot_create_common/irobot_create_toolbox/package.xml b/irobot_create_common/irobot_create_toolbox/package.xml index 9fa5d0a5..9b8858ee 100644 --- a/irobot_create_common/irobot_create_toolbox/package.xml +++ b/irobot_create_common/irobot_create_toolbox/package.xml @@ -8,6 +8,7 @@ BSD ament_cmake + gz_math_vendor rclcpp From cc53fca58aace86a771a8258f06feb53f2595917 Mon Sep 17 00:00:00 2001 From: Chris Iverach-Brereton Date: Fri, 16 Aug 2024 11:28:35 -0400 Subject: [PATCH 31/34] Update CI for Jazzy --- .github/workflows/ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 173df627..03307ec1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,17 +10,17 @@ on: jobs: build_and_test: name: build_and_test - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - name: Set Ignition Version run: | - echo "IGNITION_VERSION=edifice" >> $GITHUB_ENV + echo "GZ_VERSION=harmonic" >> $GITHUB_ENV - uses: actions/checkout@v2.3.4 - uses: ros-tooling/setup-ros@0.7.1 with: - required-ros-distributions: humble + required-ros-distributions: jazzy - uses: ros-tooling/action-ros-ci@0.3.5 id: action_ros_ci_step with: - target-ros2-distro: humble + target-ros2-distro: jazzy import-token: ${{ secrets.REPO_TOKEN }} From 02be9b7dd55aed7715f2199921a07e78caef80b8 Mon Sep 17 00:00:00 2001 From: Chris Iverach-Brereton Date: Fri, 16 Aug 2024 11:29:02 -0400 Subject: [PATCH 32/34] Make gz-gui8 required in cmake --- irobot_create_gz/irobot_create_gz_plugins/CMakeLists.txt | 2 +- .../irobot_create_gz_plugins/Create3Hmi/CMakeLists.txt | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/irobot_create_gz/irobot_create_gz_plugins/CMakeLists.txt b/irobot_create_gz/irobot_create_gz_plugins/CMakeLists.txt index ea49328d..3f86601f 100644 --- a/irobot_create_gz/irobot_create_gz_plugins/CMakeLists.txt +++ b/irobot_create_gz/irobot_create_gz_plugins/CMakeLists.txt @@ -11,7 +11,7 @@ find_package(ament_cmake REQUIRED) set(OpenGL_GL_PREFERENCE LEGACY) # Find the Ignition gui library -find_package(gz-gui8) +find_package(gz-gui8 REQUIRED) add_subdirectory(Create3Hmi) if(BUILD_TESTING) diff --git a/irobot_create_gz/irobot_create_gz_plugins/Create3Hmi/CMakeLists.txt b/irobot_create_gz/irobot_create_gz_plugins/Create3Hmi/CMakeLists.txt index 5f09addc..721c1ca2 100644 --- a/irobot_create_gz/irobot_create_gz_plugins/Create3Hmi/CMakeLists.txt +++ b/irobot_create_gz/irobot_create_gz_plugins/Create3Hmi/CMakeLists.txt @@ -15,6 +15,8 @@ find_package(Qt5 REQUIRED ) +find_package(gz-gui8 REQUIRED) + qt5_add_resources(resources_rcc Create3Hmi.qrc) add_library( From 1b0ecf4b5a3fd44a88cfe141dc6b59e9b8bec1e0 Mon Sep 17 00:00:00 2001 From: Chris Iverach-Brereton Date: Fri, 16 Aug 2024 14:21:43 -0400 Subject: [PATCH 33/34] Update CI versions to latest --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 03307ec1..3699c3df 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,10 +16,10 @@ jobs: run: | echo "GZ_VERSION=harmonic" >> $GITHUB_ENV - uses: actions/checkout@v2.3.4 - - uses: ros-tooling/setup-ros@0.7.1 + - uses: ros-tooling/setup-ros@0.7.8 with: required-ros-distributions: jazzy - - uses: ros-tooling/action-ros-ci@0.3.5 + - uses: ros-tooling/action-ros-ci@0.3.14 id: action_ros_ci_step with: target-ros2-distro: jazzy From 447f8f67baede6f160e6257a2b05c3ea6d87d1fa Mon Sep 17 00:00:00 2001 From: Chris Iverach-Brereton Date: Fri, 16 Aug 2024 15:27:48 -0400 Subject: [PATCH 34/34] Linter fixes --- .../src/kidnap_estimator_publisher.cpp | 8 +++---- .../src/motion_control/wall_follow_states.cpp | 4 ++-- .../src/motion_control_node.cpp | 6 +++-- .../launch/sim.launch.py | 22 ++++++++++--------- .../Create3Hmi/Create3Hmi.hh | 2 +- 5 files changed, 23 insertions(+), 19 deletions(-) diff --git a/irobot_create_common/irobot_create_nodes/src/kidnap_estimator_publisher.cpp b/irobot_create_common/irobot_create_nodes/src/kidnap_estimator_publisher.cpp index 9f1deab1..c08ed4e1 100644 --- a/irobot_create_common/irobot_create_nodes/src/kidnap_estimator_publisher.cpp +++ b/irobot_create_common/irobot_create_nodes/src/kidnap_estimator_publisher.cpp @@ -43,15 +43,15 @@ void KidnapEstimator::kidnap_callback(irobot_create_msgs::msg::HazardDetectionVe const std::size_t wheel_drop_count = std::count_if( hazard_vector.begin(), hazard_vector.end(), [](auto hazard_vector) { return hazard_vector.header.frame_id == "wheel_drop_left" || - hazard_vector.header.frame_id == "wheel_drop_right"; + hazard_vector.header.frame_id == "wheel_drop_right"; }); const std::size_t cliff_sensor_count = std::count_if( hazard_vector.begin(), hazard_vector.end(), [](auto hazard_vector) { return hazard_vector.header.frame_id == "cliff_side_left" || - hazard_vector.header.frame_id == "cliff_side_right" || - hazard_vector.header.frame_id == "cliff_front_left" || - hazard_vector.header.frame_id == "cliff_front_right"; + hazard_vector.header.frame_id == "cliff_side_right" || + hazard_vector.header.frame_id == "cliff_front_left" || + hazard_vector.header.frame_id == "cliff_front_right"; }); // Set header timestamp. diff --git a/irobot_create_common/irobot_create_nodes/src/motion_control/wall_follow_states.cpp b/irobot_create_common/irobot_create_nodes/src/motion_control/wall_follow_states.cpp index f16b1261..02b55ab5 100644 --- a/irobot_create_common/irobot_create_nodes/src/motion_control/wall_follow_states.cpp +++ b/irobot_create_common/irobot_create_nodes/src/motion_control/wall_follow_states.cpp @@ -166,8 +166,8 @@ bool ObstacleInFront::get_next_velocity( { // Summarize IR sensors auto obstacle_in_sensors = [this](const std::vector & sensors, - const irobot_create_msgs::msg::IrIntensityVector & ir_intensity, - int16_t min_obs_threshold, int16_t & obs_val) -> bool { + const irobot_create_msgs::msg::IrIntensityVector & ir_intensity, + int16_t min_obs_threshold, int16_t & obs_val) -> bool { for (const auto & frame : sensors) { auto frame_it = std::find_if( ir_intensity.readings.begin(), 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 77ba54bf..4ba32c2a 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 @@ -333,7 +333,8 @@ void MotionControlNode::hazard_vector_callback( reflex_behavior_->update_hazards(current_state_); } -void MotionControlNode::commanded_velocity_callback(geometry_msgs::msg::TwistStamped::ConstSharedPtr msg) +void MotionControlNode::commanded_velocity_callback( + geometry_msgs::msg::TwistStamped::ConstSharedPtr msg) { if (scheduler_->has_behavior()) { const auto time_now = this->now(); @@ -353,7 +354,8 @@ void MotionControlNode::commanded_velocity_callback(geometry_msgs::msg::TwistSta } -void MotionControlNode::commanded_velocity_unstamped_callback(geometry_msgs::msg::Twist::ConstSharedPtr msg) +void MotionControlNode::commanded_velocity_unstamped_callback( + geometry_msgs::msg::Twist::ConstSharedPtr msg) { geometry_msgs::msg::TwistStamped stamped_msg; stamped_msg.twist = *msg; diff --git a/irobot_create_gz/irobot_create_gz_bringup/launch/sim.launch.py b/irobot_create_gz/irobot_create_gz_bringup/launch/sim.launch.py index 7d5694fd..28e64bdc 100644 --- a/irobot_create_gz/irobot_create_gz_bringup/launch/sim.launch.py +++ b/irobot_create_gz/irobot_create_gz_bringup/launch/sim.launch.py @@ -47,7 +47,7 @@ def generate_launch_description(): gz_gui_plugin_path = SetEnvironmentVariable( name='GZ_GUI_PLUGIN_PATH', - value=":".join([ + value=':'.join([ os.path.join(pkg_irobot_create_gz_plugins, 'lib') ]) ) @@ -59,15 +59,17 @@ def generate_launch_description(): # Ignition gazebo gz_sim = IncludeLaunchDescription( PythonLaunchDescriptionSource([gz_sim_launch]), - launch_arguments=[ - ('gz_args', [LaunchConfiguration('world'), - '.sdf', - ' -v 4', - ' --gui-config ', - PathJoinSubstitution([pkg_irobot_create_gz_bringup, - 'gui', 'create3', 'gui.config']) - ]) - ] + launch_arguments=[( + 'gz_args', [ + LaunchConfiguration('world'), + '.sdf', + ' -v 4', + ' --gui-config ', + PathJoinSubstitution( + [pkg_irobot_create_gz_bringup, 'gui', 'create3', 'gui.config'] + ) + ] + )] ) # clock bridge diff --git a/irobot_create_gz/irobot_create_gz_plugins/Create3Hmi/Create3Hmi.hh b/irobot_create_gz/irobot_create_gz_plugins/Create3Hmi/Create3Hmi.hh index c9a4578b..6ca10104 100644 --- a/irobot_create_gz/irobot_create_gz_plugins/Create3Hmi/Create3Hmi.hh +++ b/irobot_create_gz/irobot_create_gz_plugins/Create3Hmi/Create3Hmi.hh @@ -68,6 +68,6 @@ private: } // namespace gui -} // namespace ignition +} // namespace gz #endif // IROBOT_CREATE_GZ__IROBOT_CREATE_GZ_PLUGINS__CREATE3HMI__CREATE3HMI_HH_