Port the lunar pole exploration rover plugins and model to Gazebo Harmonic, keeping Fortress (closes #47) - #48
Open
asimonov wants to merge 2 commits into
Open
Conversation
…). SolarPanelPlugin, RechargeableBatteryPlugin, SensorPowerSystemPlugin and RadioisotopeThermalGeneratorPlugin were written against the Ignition Fortress API and, since space-ros#41, only built on Humble. They now target the Gazebo Harmonic (gz-sim 8) API: gz::sim, gz::rendering and gz::sensors namespaces, gz/ header paths, the GZ_ADD_PLUGIN registration macros and the gz* console macros. Each message type gets its own include, as gz-msgs 10 no longer provides them transitively. Fortress ships gz/ redirect headers for all of these namespaces but not for the GZ_ / gz prefixed macros, so plugins/gz_compat.hh maps those onto their Ignition names when they are missing. One set of sources therefore builds on both distributions; CMakeLists.txt and package.xml select the Ignition system packages on Humble and the ROS gz_*_vendor packages otherwise, and the environment hook sets both IGN_GAZEBO_* and GZ_SIM_* paths.
…ros#47). The ros2_control hardware plugin and the Gazebo system plugins have different names on the two: ign_ros2_control/IgnitionSystem and ignition-gazebo-*-system on Fortress, gz_ros2_control/GazeboSimSystem and gz-sim-*-system on Harmonic. xacro properties keyed on ROS_DISTRO select the right set, so the same model serves the Humble demo and the Jazzy one. The gz_ros2_control plugin also referenced its controller configuration via $(find lunar_pole_exploration_rover), coupling the model to a package in the demos repository. The configuration now lives with the model, as the curiosity rover's does.
This was referenced Sep 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #47.
Makes the lunar pole exploration rover's power system plugins and model build and run on Gazebo Harmonic / ROS 2 Jazzy while keeping Ignition Fortress / ROS 2 Humble working. Two commits:
SolarPanelPlugin,RechargeableBatteryPlugin,SensorPowerSystemPluginandRadioisotopeThermalGeneratorPluginnow target the gz-sim 8 API (gz::sim/gz::rendering/gz::sensors,gz/headers,GZ_ADD_PLUGIN,gz*console macros, per-message includes for gz-msgs 10). Fortress shipsgz/redirect headers for all of those namespaces but not for theGZ_/gzprefixed macros, so a 60-lineplugins/gz_compat.hhmaps those onto their Ignition names when absent. One source tree builds on both;CMakeLists.txtandpackage.xmlpick the Ignition system packages on Humble and the ROSgz_*_vendorpackages otherwise (so on Jazzy the plugins link against the same libraries asros_gzandgz_ros2_control), and the environment hook sets bothIGN_GAZEBO_*andGZ_SIM_*paths so Harmonic finds the meshes and plugins (the hook part of Update to Gazebo Harmonic/Jazzy #36). Since Building packages onjazzythat includesimulationbreaks due to missing humble dependencies #41 the plugins were excluded from non-Humble builds; this makes them available again.ROS_DISTROselectign_ros2_control/IgnitionSystem+ignition-gazebo-*-systemorgz_ros2_control/GazeboSimSystem+gz-sim-*-system, so the one model serves both the existing Humble demo and the Jazzy one. The rover's controller configuration also moves here, next to the model, instead of being referenced through$(find lunar_pole_exploration_rover)in the demos repository (as the curiosity rover's is).The canadarm, curiosity and lunar terrain models are untouched. Running the ported
SolarPanelPluginon Harmonic exposes a thread-safety bug in it (#44); the fix is a separate PR stacked on this one, and the Jazzy demo (space-ros/demos#165) needs both.Effect on consumers
Every demo that builds this package on Jazzy (
space_robots,lunar_terrain) previously got asimulationpackage with no plugins; it now compiles the four plugins as well, which adds well under a minute to the build and declaresgz_{sim,plugin,common,rendering,sensors}_vendoras dependencies — the same vendor stack both demos already pull in forros_gzandgz_ros2_control(space_robotsbuilds those from source;lunar_terraininstallsros-jazzy-ros-gz), so no new class of dependency. Nothing those demos take from the package (the model directories) changes. On Humble (lunar_pole_exploration_roveronmain) the build is the same as before.Checked by building the current
demosmainDockerfiles of all three against this branch plus the #44 fix (arm64, one edit each to clone the branch instead ofmain):lunar_pole_exploration_roveron Humble (67 packages),space_robots(53 packages) andlunar_terrain(11 packages) all build clean. The Humble image was also run headless: the server stays up with all four plugins loaded from the image build, the solar panel publishes ~106.7 W and the battery 30 V / 100 %, with no crash output.Verification on Harmonic
With the #44 fix on top, the Jazzy demo from space-ros/demos#165 built against this branch and run headless (
gz sim -s --headless-rendering): all four ros2_control controllers active, the rover drives and rotates through the demo services, the left solar panel reports 106.786 W at rest (the same reading the Fortress build gives) and rises to ~129 W as the rover turns, the battery reports 30 V / 100 %, the sensor activation switches change the power consumption, and all eight 2048x2048mono16cameras deliver frames. Every topic, service, joint and frame in the demo README was checked against a live run with the GUI.