From 8d510a19a84f6adda1cf0d17ea29aba1b954e989 Mon Sep 17 00:00:00 2001 From: "rafal.gorecki" Date: Thu, 9 Jan 2025 09:54:53 +0100 Subject: [PATCH] Fixes related with building simulation on Jazzy --- README.md | 2 +- ROS_API.md | 2 +- husarion_ugv/hardware_deps.repos | 6 +- husarion_ugv/simulation_deps.repos | 8 +- .../urdf/common/gazebo.urdf.xacro | 4 +- husarion_ugv_gazebo/CMakeLists.txt | 24 +-- husarion_ugv_gazebo/config/gz_bridge.yaml | 10 +- .../config/teleop_with_estop.config | 174 +++++++++--------- husarion_ugv_gazebo/hooks/setup_envs.sh.in | 4 +- .../husarion_ugv_gazebo/estop_system.hpp | 8 +- .../husarion_ugv_gazebo/gui/e_stop.hpp | 6 +- husarion_ugv_gazebo/package.xml | 2 +- husarion_ugv_gazebo/plugins.xml | 2 +- husarion_ugv_gazebo/src/estop_system.cpp | 30 +-- husarion_ugv_gazebo/src/gui/e_stop.cpp | 10 +- husarion_ugv_gazebo/src/led_strip.cpp | 4 +- 16 files changed, 147 insertions(+), 149 deletions(-) diff --git a/README.md b/README.md index a5e46bd95..60396c74e 100644 --- a/README.md +++ b/README.md @@ -87,7 +87,7 @@ Launch arguments are largely common to both simulation and physical robot. Howev | --- | --- | ---------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | ❌ | ✅ | `add_world_transform` | Adds a world frame that connects the tf trees of individual robots (useful when running multiple robots).
***bool:*** `False` | | ✅ | ✅ | `animations_config_path` | Path to a YAML file with a description of led configuration. This file includes definition of robot panels, virtual segments and default animations.
***string:*** [`{robot_model}_animations.yaml`](./husarion_ugv_lights/config) | -| ❌ | ✅ | `battery_config_path` | Path to the Ignition LinearBatteryPlugin configuration file. This configuration is intended for use in simulations only.
***string:*** `None` | +| ❌ | ✅ | `battery_config_path` | Path to the Gazebo `LinearBatteryPlugin` configuration file. This configuration is intended for use in simulations only.
***string:*** `None` | | ✅ | ✅ | `components_config_path` | Additional components configuration file. Components described in this file are dynamically included in robot's URDF. Available options are described in [the manual](https://husarion.com/manuals/panther/panther-options).
***string:*** [`components.yaml`](./husarion_ugv_description/config/components.yaml) | | ✅ | ✅ | `controller_config_path` | Path to controller configuration file. A path to custom configuration can be specified here.
***string:*** [`{wheel_type}_controller.yaml`](./husarion_ugv_controller/config/) | | ✅ | ✅ | `disable_manager` | Enable or disable manager_bt_node.
***bool:*** `False` | diff --git a/ROS_API.md b/ROS_API.md index dd10a4d03..5f0f0f322 100644 --- a/ROS_API.md +++ b/ROS_API.md @@ -58,7 +58,7 @@ Below is information about the physical robot API. For the simulation, topics an | ✅ | ✅ | `lights_controller` | This node is responsible for processing animations and publishing frames to `light_driver` node.
[*husarion_ugv_lights/LightsControllerNode*](./husarion_ugv_lights/include/husarion_ugv_lights/lights_controller_node.hpp) | | ✅ | ❌ | `lights_driver` | This node is responsible for displaying frames on the robot's lights.
[*husarion_ugv_lights/LightsDriverNode*](./husarion_ugv_lights/include/husarion_ugv_lights/lights_driver_node.hpp) | | ✅ | ✅ | `lights_manager` | Node responsible for managing lights animation scheduling.
[husarion_ugv_manager/lights_manager](./husarion_ugv_manager/include/husarion_ugv_manager/lights_manager_node.hpp) | -| ✅ | ✅ | ⚙️ `navsat_transform` ⚙️ | It converts raw GPS data into odometry data and publishes corrected GPS positions based on sensor data at a higher frequency.
*[robot_localization/navsat_transform](https://github.com/cra-ros-pkg/robot_localization)* | +| ✅ | ✅ | ⚙️ `navsat_transform` ⚙️ | It converts raw GPS data into odometry data and publishes corrected GPS positions based on sensor data at a higher frequency.
*[robot_localization/navsat_transform](https://github.com/cra-ros-pkg/robot_localization)* | | ✅ | ✅ | `robot_state_publisher` | Broadcasts a robot's state to tf2 using a provided URDF model and joint states. It updates the model and broadcasts poses for fixed and movable joints to tf2 topics.
*[robot_state_publisher/robot_state_publisher](https://github.com/ros/robot_state_publisher)* | | ✅ | ❌ | `safety_manager` | Node responsible for managing safety features, and software shutdown of components.
*[husarion_ugv_manager/safety_manager_node](./husarion_ugv_manager/include/husarion_ugv_manager/safety_manager_node.hpp)* | | ✅ | ❌ | `system_monitor` | Publishes system state of the Built-in Computer such as CPU usage, RAM memory usage, disk usage and CPU temperature.
*[husarion_ugv_diagnostics/system_monitor_node](./husarion_ugv_diagnostics/include/husarion_ugv_diagnostics/system_monitor_node.hpp)* | diff --git a/husarion_ugv/hardware_deps.repos b/husarion_ugv/hardware_deps.repos index abcbc820f..a70950e1e 100644 --- a/husarion_ugv/hardware_deps.repos +++ b/husarion_ugv/hardware_deps.repos @@ -6,12 +6,12 @@ repositories: husarion_controllers: type: git url: https://github.com/husarion/husarion_controllers - version: d184d9b5936ec3f51084b70dc7d3825fa5ecaee0 + version: 053c5b1320352c496ac2d02c8bc44c695d8dd4ad ros_components_description: type: git url: https://github.com/husarion/ros_components_description.git - version: 517350ac672b7383c3377e63244353a104096c39 + version: d34d27edb3abc12ee6d197d0d513e00fe9a5604e ros2_controllers: # Caused by two error: 1. https://github.com/ros-controls/ros2_controllers/pull/1104 2. There is no nice way to change `sensor_name` imu_bradcaster param when spawning multiple robots -> ros2_control refer only to single imu entity type: git url: https://github.com/husarion/ros2_controllers/ - version: 9da42a07a83bbf3faf5cad11793fff22f25068af + version: 0784c2c7c9bad6566c994fb1cb7efe8a06db1df5 diff --git a/husarion_ugv/simulation_deps.repos b/husarion_ugv/simulation_deps.repos index 8ecbfcd64..97c416a99 100644 --- a/husarion_ugv/simulation_deps.repos +++ b/husarion_ugv/simulation_deps.repos @@ -6,16 +6,16 @@ repositories: husarion_controllers: type: git url: https://github.com/husarion/husarion_controllers - version: d184d9b5936ec3f51084b70dc7d3825fa5ecaee0 + version: 053c5b1320352c496ac2d02c8bc44c695d8dd4ad husarion_gz_worlds: type: git url: https://github.com/husarion/husarion_gz_worlds.git - version: 9d514a09c74bca2afbfba76cf2c87134918bbf97 + version: 8bda52a5048816bd14779a2b2e15591d5597f841 ros_components_description: type: git url: https://github.com/husarion/ros_components_description.git - version: 517350ac672b7383c3377e63244353a104096c39 + version: d34d27edb3abc12ee6d197d0d513e00fe9a5604e ros2_controllers: # Caused by two error: 1. https://github.com/ros-controls/ros2_controllers/pull/1104 2. There is no nice way to change `sensor_name` imu_bradcaster param when spawning multiple robots -> ros2_control refer only to single imu entity type: git url: https://github.com/husarion/ros2_controllers/ - version: 9da42a07a83bbf3faf5cad11793fff22f25068af + version: 0784c2c7c9bad6566c994fb1cb7efe8a06db1df5 diff --git a/husarion_ugv_description/urdf/common/gazebo.urdf.xacro b/husarion_ugv_description/urdf/common/gazebo.urdf.xacro index 409182003..6d2b65920 100644 --- a/husarion_ugv_description/urdf/common/gazebo.urdf.xacro +++ b/husarion_ugv_description/urdf/common/gazebo.urdf.xacro @@ -10,7 +10,7 @@ - ${ns}battery 41.4 @@ -33,7 +33,7 @@ - + ${config_file} ${namespace} diff --git a/husarion_ugv_gazebo/CMakeLists.txt b/husarion_ugv_gazebo/CMakeLists.txt index 962f6db54..da51f71f9 100644 --- a/husarion_ugv_gazebo/CMakeLists.txt +++ b/husarion_ugv_gazebo/CMakeLists.txt @@ -8,11 +8,11 @@ endif() set(PACKAGE_DEPENDENCIES ament_cmake hardware_interface - ignition-gazebo6 - ignition-msgs8 - ignition-plugin1 - ignition-transport11 - ign_ros2_control + gz-sim8 + gz-msgs10 + gz-plugin2 + gz-transport13 + gz_ros2_control pluginlib rclcpp realtime_tools @@ -32,12 +32,12 @@ add_library(estop_system SHARED src/estop_system.cpp) ament_target_dependencies( estop_system hardware_interface - ign_ros2_control + gz_ros2_control rclcpp rclcpp_lifecycle std_msgs std_srvs) -target_link_libraries(estop_system ignition-gazebo6) +target_link_libraries(estop_system gz-sim8) set(CMAKE_AUTOMOC ON) qt5_add_resources(resources_rcc src/gui/EStop.qrc) @@ -47,8 +47,8 @@ add_library(EStop SHARED include/husarion_ugv_gazebo/gui/e_stop.hpp ament_target_dependencies(EStop rclcpp std_srvs) target_link_libraries( EStop - ignition-gazebo6 - ignition-plugin1 + gz-sim8 + gz-plugin2 ${Qt5Core_LIBRARIES} ${Qt5Qml_LIBRARIES} ${Qt5Quick_LIBRARIES} @@ -56,8 +56,8 @@ target_link_libraries( add_library(LEDStrip SHARED src/led_strip.cpp) ament_target_dependencies(LEDStrip realtime_tools) -target_link_libraries(LEDStrip ignition-gazebo6 ignition-msgs8 ignition-plugin1 - ignition-transport11) +target_link_libraries(LEDStrip gz-sim8 gz-msgs10 gz-plugin2 + gz-transport13) install( TARGETS estop_system @@ -86,7 +86,7 @@ endif() ament_export_include_directories(include) -pluginlib_export_plugin_description_file(ign_ros2_control plugins.xml) +pluginlib_export_plugin_description_file(gz_ros2_control plugins.xml) ament_environment_hooks("${CMAKE_CURRENT_SOURCE_DIR}/hooks/setup_envs.sh.in") diff --git a/husarion_ugv_gazebo/config/gz_bridge.yaml b/husarion_ugv_gazebo/config/gz_bridge.yaml index d7f8114bf..73980e649 100644 --- a/husarion_ugv_gazebo/config/gz_bridge.yaml +++ b/husarion_ugv_gazebo/config/gz_bridge.yaml @@ -3,28 +3,28 @@ - topic_name: /clock ros_type_name: rosgraph_msgs/msg/Clock - gz_type_name: ignition.msgs.Clock + gz_type_name: gz.msgs.Clock direction: GZ_TO_ROS - ros_topic_name: battery/battery_status gz_topic_name: /model//battery//battery/state ros_type_name: sensor_msgs/msg/BatteryState - gz_type_name: ignition.msgs.BatteryState + gz_type_name: gz.msgs.BatteryState direction: GZ_TO_ROS - topic_name: cmd_vel ros_type_name: geometry_msgs/msg/Twist - gz_type_name: ignition.msgs.Twist + gz_type_name: gz.msgs.Twist direction: GZ_TO_ROS - ros_topic_name: lights/channel_1_frame gz_topic_name: /lights/channel_1_frame ros_type_name: sensor_msgs/msg/Image - gz_type_name: ignition.msgs.Image + gz_type_name: gz.msgs.Image direction: ROS_TO_GZ - ros_topic_name: lights/channel_2_frame gz_topic_name: /lights/channel_2_frame ros_type_name: sensor_msgs/msg/Image - gz_type_name: ignition.msgs.Image + gz_type_name: gz.msgs.Image direction: ROS_TO_GZ diff --git a/husarion_ugv_gazebo/config/teleop_with_estop.config b/husarion_ugv_gazebo/config/teleop_with_estop.config index 3bdf8538a..022c35384 100644 --- a/husarion_ugv_gazebo/config/teleop_with_estop.config +++ b/husarion_ugv_gazebo/config/teleop_with_estop.config @@ -4,8 +4,8 @@ -1 -1 - 1850 - 1016 + 1920 + 1080