Skip to content

Conversation

Copy link

Copilot AI commented Nov 11, 2025

Implements migration from Gazebo Classic to Gazebo Sim (formerly Ignition Gazebo) following LCAS migration patterns. Both simulators remain functional.

Changes

Package Dependencies (hunter_gazebo/package.xml)

  • Added ros_gz_sim, ros_gz_bridge, gz_ros2_control alongside existing Gazebo Classic dependencies

Launch Files

  • Added launch_gz_sim.launch.py for Gazebo Sim using ros_gz_sim/gz_sim.launch.py and ros_gz_sim/create spawner
    • Passes sim_gazebo:=sim argument to xacro to load only Gazebo Sim plugin
  • Clock bridge added: /clock@rosgraph_msgs/msg/Clock[gz.msgs.Clock
  • Controller loading switched from ExecuteProcess to controller_manager/spawner nodes
  • Updated launch_sim.launch.py for Gazebo Classic to pass sim_gazebo:=classic argument

Robot Description (hunter_description/description/ros2_control.xacro)

  • Added xacro conditional logic with sim_gazebo argument (default: 'classic')
  • Gazebo Classic plugin (libgazebo_ros2_control.so) loads only when sim_gazebo:=classic
  • Gazebo Sim plugin (libgz_ros2_control-system.so) loads only when sim_gazebo:=sim
  • Only one plugin loads at a time - prevents conflicts from simultaneous loading
  • Fixed parameter path syntax: $(find ...)$(find-pkg-share ...)

Documentation

  • README updated with both launch options
  • Added MIGRATION_GUIDE.md with technical details, plugin selection explanation, and testing checklist

Usage

# Gazebo Sim (recommended)
ros2 launch hunter_gazebo launch_gz_sim.launch.py

# Gazebo Classic (legacy)
ros2 launch hunter_gazebo launch_sim.launch.py

The appropriate plugin loads based on the xacro argument passed by each launch file, ensuring only one simulator plugin is active at a time.

Original prompt

This section details on the original issue you should resolve

<issue_title>migrate hunter_gazebo to the new Gazebo Sim</issue_title>
<issue_description>Following guidance in https://github.com/LCAS/aoc_distro/wiki/Migration-to-new-Gazebo implement the transition from Gazebo classic to Gazebo Sim for the hunter_gazebo. Some changes may be required in other ROS2 packages in this repository, but mostly it is about changes to hunter_gazebo.

Whereever possible retain compatibility with Gazebo Classic, and keep the changes small and manageable.</issue_description>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 4 commits November 11, 2025 08:35
Co-authored-by: marc-hanheide <1153084+marc-hanheide@users.noreply.github.com>
Co-authored-by: marc-hanheide <1153084+marc-hanheide@users.noreply.github.com>
Co-authored-by: marc-hanheide <1153084+marc-hanheide@users.noreply.github.com>
Co-authored-by: marc-hanheide <1153084+marc-hanheide@users.noreply.github.com>
Copilot AI changed the title [WIP] Migrate hunter_gazebo to the new Gazebo Sim Add Gazebo Sim support while maintaining Gazebo Classic compatibility Nov 11, 2025
Copilot AI requested a review from marc-hanheide November 11, 2025 08:43
Copilot finished work on behalf of marc-hanheide November 11, 2025 08:43
@marc-hanheide marc-hanheide requested review from a team, Cyano0 and LeonardoGuevara and removed request for a team November 11, 2025 08:52
@marc-hanheide marc-hanheide marked this pull request as ready for review November 11, 2025 08:54
Co-authored-by: marc-hanheide <1153084+marc-hanheide@users.noreply.github.com>
Copilot AI requested a review from marc-hanheide November 11, 2025 08:59
Copilot finished work on behalf of marc-hanheide November 11, 2025 08:59
@marc-hanheide
Copy link
Member

@LeonardoGuevara @ibrahimhroob

I tried this to retain support for both gazebo classic and new gazebo sim...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

migrate hunter_gazebo to the new Gazebo Sim

2 participants