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
removal of PX4_GZ_MODEL env variable and fix of ground glitching #22400
Conversation
Signed-off-by: frederik <frederik@auterion.com>
Honestly I'm not even sure anymore, I was hoping we could fully clean this up after the split between PX4 and model/gzserver as discussed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @frede791
Regarding your question, the instance of PX4_GZ_MODEL
in platforms/posix/Debug/launch_sitl.json.in
will not be affected by your changes. It is there just to let the user choose the GZ model they want to debug with.
Improvement based upon comment. Co-authored-by: Beniamino Pozzan <beniamino.pozzan@gmail.com>
@beniaminopozzan Thanks for the catch. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @frede791 , LGTM.
Now, could you update the documentation too please?
https://docs.px4.io/main/en/sim_gazebo_gz/#syntax needs to be adjusted
@beniaminopozzan The user guide update is ready to go and @hamishwillee is just waiting for this to be merged. |
Thanks @frede791 ! |
…#22400) Removal of PX4_GZ_MODEL env variable and fix of ground glitching Signed-off-by: frederik <frederik@auterion.com> Co-authored-by: frederik <frederik@auterion.com> Co-authored-by: Beniamino Pozzan <beniamino.pozzan@gmail.com>
…#22400) Removal of PX4_GZ_MODEL env variable and fix of ground glitching Signed-off-by: frederik <frederik@auterion.com> Co-authored-by: frederik <frederik@auterion.com> Co-authored-by: Beniamino Pozzan <beniamino.pozzan@gmail.com>
…#22400) Removal of PX4_GZ_MODEL env variable and fix of ground glitching Signed-off-by: frederik <frederik@auterion.com> Co-authored-by: frederik <frederik@auterion.com> Co-authored-by: Beniamino Pozzan <beniamino.pozzan@gmail.com>
Solved Problem
This PR solves two problems:
PX4_GZ_MODEL
and its aliasPX4_SIM_MODEL
. By replacing all instancesPX4_GZ_MODEL
withPX4_SIM_MODEL#*gz_
we can eliminate the need forPX4_GZ_MODEL
.PX4_GZ_MODEL_POSE
(which previously could not be used withPX4_SIM_MODEL
) the undefined pose position elements were filled up with 0. This leads to cases where models would clip into the ground, as described in [Bug] Vehicles glitching into the ground in Gazebo #22214. This PR addresses this by checking whether the z-coordinate is less or equal to 0 and if that is the case, it will release the model at 1m above.Question for @dagar and/or @beniaminopozzan: There are currently two instancees of
PX4_GZ_MODEL
being used in a debug file inplatforms/posix/Debug/launch_sitl.json.in
. Can you explain how removing the environmental variablePX4_GZ_MODEL
would affect this?Fixes #22214 (properly this time).
Solution
Replace
PX4_GZ_MODEL
withPX4_SIM_MODEL#*gz_
Changelog Entry
For release notes:
Alternatives
We could also do a fancier pose calculation by reading it out of the sdf file that is provided. This may be more costly in terms of start up time.