Can I modify Ignition Gazebo Physic while running simulation ?

asked 2022-05-09 06:32:23 -0500

Jouliano gravatar image

I am currently working on a simulator using Ignition Gazebo as a tool to add some physics to make it more realistic. As the mission I would like to simulate are very long (2-3 months), it is very important that the whole simulation is accelerated under conditions I fixed. I need a real time simulation to compute the missions and an accelerated simulation to react in function of those missions.

I found two parameters to make it so : max_step_size (spatial) & real_time_factor (temporal) but I only can modify them while creating my sdf file and not after using a ROS2 node.

I have also found a package named "gazebo_ros_pkgs" that have a SetPhysicsProperties ( service that could help my but it only works with Gazebo.

Is there a way I can control the real_time_factor parameter of Ignition Gazebo using a ROS2 node ? Thank you for your time and answers.

edit retag flag offensive close merge delete


I know this is not an answer but question, what about this:

It's foxy and Gazebo Citadel (formerly ign). Surely, there's a lot of stuff to show the example.

So, your question is more for this one:

I believe you can do that, but I don't know how. Hope I helped you with those links! Please ask if u have more questions!

kakcalu13 gravatar imagekakcalu13 ( 2022-05-13 10:04:45 -0500 )edit

Thanks for your reply. Unfortunately, these are links that I've already browsed and couldn't / didn't know how to use for my purposes. However, I'm going to dive back in to see if I've missed anything since you're proposing the same idea maybe that would be worth it ! I believe that first there is no topic/service in Gazebo Citadel that could modify the RTF when the simulation is launched along with no way to create any (or no way that I am aware of). Secondly, the ros2/ign bridge is limited.

Jouliano gravatar imageJouliano ( 2022-05-16 03:20:30 -0500 )edit