Skip to content

Conversation

azeey
Copy link
Contributor

@azeey azeey commented Jul 25, 2025

🎉 New feature

Toward #732

Summary

Set up

In order to test this, you'll need a source build of gz-sim with the following PRs:

I have removed all Gazebo ROS vendor packages temporarily since those are currently pinned to Ionic. With the recent changes removing the version numbers from the packages, having gz-jetty installed, either from binaries or from source, should be sufficient to build this PR.

Test it

  1. Install ROS 2 Rolling

  2. Add Gazebo nightlies to your apt sources. Follow https://gazebosim.org/docs/jetty/install_ubuntu/, but use ubuntu-nightly instead of ubuntu-stable.

    deb [arch=amd64 signed-by=/usr/share/keyrings/pkgs-osrf-archive-keyring.gpg] http://packages.osrfoundation.org/gazebo/ubuntu-nightly noble main
    
  3. Install gz-jetty

    sudo apt install gz-jetty
    
  4. Create a new workspace and use vcs to checkout standard_interfaces.repos

    mkdir -p ~/ros_gz_ws/src
    cd ~/ros_gz_ws/src
    vcs import --input https://raw.githubusercontent.com/gazebo-tooling/gz_vendor/refs/heads/main/gz_vendor.repos
    touch gz_dartsim_vendor/COLCON_IGNORE
    touch gz_ogre_next_vendor/COLCON_IGNORE
    
    git clone https://github.com/azeey/ros_gz -b standard_interfaces
    cd ..
    
  5. Source rolling and install dependencies

    source /opt/ros/rolling/setup.bash
    export GZ_BUILD_FROM_SOURCE=1
    rosdep install -i -y -r --from-paths src --skip-keys="rviz2 sdformat_urdf"
    
    
  6. Build workspace

    colcon build
    
  7. Run tests
    colcon test --packages-select ros_gz_sim

  8. If you want to run just the tests introduced in this PR, in a new terminal:

    source ~/ros_gz_ws/install/setup.bash
    cd ~/ros_gz/ws/build/ros_gz_sim
    ctest -R gz_simulation
    

Tip

If the build fails with c++: fatal error, it likely ran out of memory. Try building with colcon build --parallel-workers=1 --executor sequential

Note

If the build fails due to missing APIs. It is likely that somehow, ros_gz_sim is being build against the Gazebo install in the system instead of the one we are building from source. If this happens, uninstall libgz-sim10, remove the build/ros_gz_sim directory and build again.

Checklist

  • Signed all commits for DCO
  • Added tests
  • Added example and/or tutorial
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers
  • Was GenAI used to generate this PR? If so, make sure to add "Generated-by" to your commits. (See this policy for more info.)

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by and Generated-by messages.

azeey added 10 commits July 21, 2025 23:23
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
@azeey azeey changed the title Standard interfaces Implement ROS standard simulation interfaces Jul 25, 2025
azeey added 2 commits July 25, 2025 14:45
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
@azeey azeey added this to the Jetty Release milestone Jul 28, 2025
azeey added 9 commits July 29, 2025 17:27
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
This also comments out vendor packages since those are still pinned to
Ionic.

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
@azeey azeey requested review from ahcorde, iche033 and sauk2 September 9, 2025 06:05
…ve been released

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
@ahcorde ahcorde requested a review from iche033 September 12, 2025 08:29
} else {
// TODO(azeey) Error
}
gz::msgs::WorldControlState control_msg;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed that when the world is paused, setting entity state causes the world to resume playing. I think that's because the WorldControlState msg's pause field defaults to 0 and that's read here in SimulationRunner

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
…ction

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
…struction

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
Copy link
Contributor

@iche033 iche033 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tested various services using https://github.com/RobotecAI/q_simulation_interfaces and they work great. Just one minor issue with running the simulate step action multiple times.

auto action_result = std::make_shared<SimulateStepsAction::Result>();
action_result->result.result = Result::RESULT_OPERATION_FAILED;
action_result->result.error_message = "Another goal is already running";
goal_handle->abort(action_result);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When testing the simulate step action, the first action call works fine but subsequent action seems to fail and end up here saying another goal is running.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 7dc79c6

Copy link
Contributor

@iche033 iche033 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can ticket the simulation step action issue and address that if needed. Otherwise the code looks good.

Signed-off-by: Addisu Z. Taddese <addisu@openrobotics.org>
@azeey
Copy link
Contributor Author

azeey commented Sep 30, 2025

@ros-pull-request-builder retest this please

@azeey azeey merged commit ae92d97 into gazebosim:ros2 Sep 30, 2025
5 checks passed
@github-project-automation github-project-automation bot moved this from In review to Done in Core development Sep 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants