Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Faster than Real -Time support in GZ #23783

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

dirksavage88
Copy link
Contributor

Solved Problem

The new GZ simulation real time factor is configurable, however the service request has not been implemented in the GZ bridge.

partially fixes Fixes #23602

Solution

  • Configure the GZ bridge to send a service request with the simulation speedup value environment variable "PX4_SIM_SPEED_FACTOR"

Changelog Entry

For release notes:

Feature: Configurable real time factor in new GZ sim
New parameter: None
Documentation: Configurable via environment variable "PX4_SIM_SPEED_FACTOR"

Alternatives

Change the real time facto in gazebo world sdf manually, or make a world file specific to an increased RTF

Test coverage

Context

Related links, screenshot before/after, video

Signed-off-by: dirksavage88 <[email protected]>
@dirksavage88 dirksavage88 mentioned this pull request Oct 7, 2024
30 tasks
@mrpollo mrpollo requested review from Jaeyoung-Lim and dagar October 7, 2024 15:00
@github-actions github-actions bot added the stale label Nov 7, 2024
@mrpollo
Copy link
Contributor

mrpollo commented Nov 8, 2024

@Jaeyoung-Lim @dagar can you please give this a review? seems like a good addition

@github-actions github-actions bot removed the stale label Nov 9, 2024
Copy link
Member

@Jaeyoung-Lim Jaeyoung-Lim left a comment

Choose a reason for hiding this comment

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

Amazing thanks!

  • Just one small nitpick on the order of configuring the physics.

  • More of a question/note: Since we configure the physics in the gz bridge, this might cause problems when running multiple px4 instances. Might be worth taking it out to somewhere else in the future.

if (!callPhysicsMsgService(physics_service, p_req)) {
return PX4_ERROR;
}
}
Copy link
Member

Choose a reason for hiding this comment

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

It is probably harmless, but should we maybe configure the physics before spawning the model?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I placed the physics service call further up in the init method, but not sure if this is before the model spawn you mentioned @Jaeyoung-Lim

Signed-off-by: dirksavage88 <[email protected]>
@hamishwillee
Copy link
Contributor

This will good and will need docs hint hint

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.

(new) GZ Feature tracker
4 participants