PX4 / PX4-user_guide

PX4 User Guide
https://docs.px4.io/main/en/index.html
Other
282 stars 1.56k forks source link

Deprecate jMAVSim #3245

Closed hamishwillee closed 2 weeks ago

hamishwillee commented 2 weeks ago

JMAVSim doesn't work on the lasted mainline on Ubuntu or WSL on Windows, and presumably won't work on v1.15. There is no one making any particular effort to maintain it, and I know there is a strong argument to drop all support and focus on gazebo.

What this does is "bite the bullet" and deprecate JMAVSim in the docs

@mrpollo @dagar Any disagreements/suggestions? In this release should we actually remove the installation of jmavsim from the ubuntu.sh installer script too?

Are we any closer to also deprecating Ubuntu 18 and ROS (1)?

hamishwillee commented 2 weeks ago

@romain-chiap Howdy! This PR moves JMAVSim from part of the PX4 core supported simulators to "community supported", leaving Gazebo/Gazebo-Classic the only devteam-maintained simulator. In the short term nothing will actually change.

I'm contacting you because it is possible in future that JMAVSim will break or be retired, and I don't want to also break SIH.

Is it possible to update SIH so that it works using Gazebo on Ubuntu 22+ as the visualizer? Or possibly without any visualizer at all?

github-actions[bot] commented 2 weeks ago

No flaws found

hamishwillee commented 2 weeks ago

Merging, but open to further discussion.

romain-chiap commented 2 weeks ago

Hey, thanks I appreciate.

Short answer: the SIH can already work without visualization.

To make it work with Gazebo we need to run Gazebo as a visualizer only (i.e. disable its physics engine). The SIH sends periodic mavlink message HIL_STATE_QUATERNION. If gazebo already uses this mavlink message to display the vehicle that can be pretty straight forward.

I've never opened the code for gazebo. Can you ping in someone knowledgable to this conversation?

hamishwillee commented 2 weeks ago

Awesome @Jaeyoung-Lim is the best person to talk to about Gazebo-Classic - and should be able to recommend the best people for Gazebo (?).

Jae, can you comment on ^^^ - essentially how can we run Gazebo(s) as a visualizer for SIH?

Jaeyoung-Lim commented 2 weeks ago

@romain-chiap Yeap you can do that. The only down side is that we still need to "work around" the dynamics simulation as we can only "simulate" in gazebo.

This should be fairly straight forward to implement, where we just need a plugin that sets the pose of the model according to the local position estimate of the model.

On the alternative, we might want to explore pursuing something nicer as a visualizer in general. For example, Ardupilot has this visualizer: https://ardupilot.org/dev/docs/common-uavlogviewer.html which is based on a python binding of cesium. Might be easier to add this to SIH and we can reuse it as a log visualizer?

romain-chiap commented 1 week ago

Thanks Jae!

How can I do that given it will be my first time coding in gazebo? Can you point me to an example plugin? and to the structure/function for the pose?

Jaeyoung-Lim commented 1 week ago

@romain-chiap I was more implying that we should not implement the visualizer in gazebo...

but if you want to you can go through some gazebo tutorials and check the plugins we have integrated into gazebo: https://github.com/PX4/PX4-SITL_gazebo-classic/tree/main/src

romain-chiap commented 1 week ago

Aha, thanks for the clarification.

In this case I'm happy to leave it as it is. @hamishwillee, I will update the docs

hamishwillee commented 1 week ago

@Jaeyoung-Lim Thanks! It is a fair bit of work to understand gazebo enough to even get started.

@frede791 - is the situation different for Gazebo (Gz_)? The discussion here is about replacing Jmavsim as the visualizer for Simulation in Hardware because JMavsim is not very well supported. I guess we're hoping for some way to gazebo so that it looks at the output of SIH.

Jaeyoung-Lim commented 1 week ago

@hamishwillee @romain-chiap I am not sure if I message is getting through.

I think we would want some sort of visualizer to visualize SIH, but I personally think gz is the wrong software to do so. @romain-chiap Would you be able to look into somekind of 3D visualizer tool that is light weight enough that we can use for SIH?

romain-chiap commented 1 week ago

For some projects, I use Xplane for visualization from the SIH. Using the plugin from nasa Xplane connect, this is not leightweight, but the free version allows for 10min of flights, and the people really love the graphics.

QGC used to be able to connect to Xplane in version 3. Can we imagine putting that back in place in the current version of QGC?

I feel I'm missing a piece of information here, why going for another visualizer when jmavsim is already working. Can we imagine supporting jmavsim as a visualizer for SIH only?

hamishwillee commented 1 week ago

@romain-chiap Both JMAVSim and XPlane are community supported meaning they might work, or might not. The only supported simulators are Gazebo Classic and Gazebo. That's why I'm hoping we can get this working with Gazebo, since that stays working going forward.

If somebody wants to put effort into supporting JMAVsim as a visualizer then fine, but the question is "who". I don't want to do it.