PX4 / PX4-Autopilot

PX4 Autopilot Software
https://px4.io
BSD 3-Clause "New" or "Revised" License
8.53k stars 13.52k forks source link

[Bug] rc_cessna cannot be launched without having a ground station running. #22285

Closed frede791 closed 5 months ago

frede791 commented 1 year ago

Describe the bug

The rc_cessna model cannot take off without also having a ground station open. All other models present in PX4 for Gazebo do not require a ground station to be open and can be commandeered solely from the PX4 command line.

To Reproduce

Run make px4_sitl gz_rc_cessna while not running QGC or AMC.

Expected behavior

Model should be able to arm and provide the Ready for takeoff! prompt after which the vehicle can be launched through the PX4 command line.

Screenshot / Media

image

Flight Log

N/A

Software Version

Current PX4 main branch, Commit: 26fd4c852c52837e306790e0f86b27d0b0df516e

Flight controller

It's in simulation.

Vehicle type

Fixed Wing

How are the different components wired up (including port information)

No response

Additional context

No response

dagar commented 1 year ago

In the past my opinion was that we should keep the simulations as closely in sync with real usage as possible (eg data link failsafes) to prevent any surprises when people make the transition. The downside of this is the annoyance of requiring QGC for a quick test.

What do you think?

Jaeyoung-Lim commented 1 year ago

@frede791 This is realistic behavior of the vehicle, and a mere inconvenience for simulation development.

IMHO, SITL only makes sense if it replicates the behavior of real vehicles.

I think this is less worse than people trying to fly without a ground station on a real vehicle, and realizing the failsafe is enabled by default.

frede791 commented 1 year ago

I don't really have a preference either way but I would aim to enforce consistency across all models. So either all of them don't run without QGC or they all do.

That being said, having QGC as a requirement does provide a more holistic experience.

dagar commented 1 year ago

I would aim to enforce consistency across all models. So either all of them don't run without QGC or they all do.

Yes definitely, anything that's not I think we should consider a bug.

frede791 commented 1 year ago

@dagar @Jaeyoung-Lim So which one do you wanna go for?

Jaeyoung-Lim commented 1 year ago

We should keep the current behavior

At least I shouldnt make flying without a ground station connection the default.

dagar commented 1 year ago

I agree with @Jaeyoung-Lim.

Somewhat contradicting myself here, but I'm not opposed to having some kind of alternative for this use case.

frede791 commented 1 year ago

I don't know about adding more models that add nothing in terms of behavior or appearance. I feel that this would be better solved through setting a env variable somewhere that tells px4 it is allowed to run without ground control.

danielhonies commented 1 year ago

In the past my opinion was that we should keep the simulations as closely in sync with real usage as possible (eg data link failsafes) to prevent any surprises when people make the transition. The downside of this is the annoyance of requiring QGC for a quick test.

What do you think?

Regarding consistency, the parameter is not set for the real world airframes though.

Jaeyoung-Lim commented 1 year ago

@danielhonies Where is this being set? We should change that

danielhonies commented 1 year ago

@Jaeyoung-Lim It is set in the airframe files as a default param. Check the PR to see where he changed it. Should we really set this though? I feel like a decent amount of people still fly real vehicles with a conventional RC connection and no GCS, but from what I read from the code this would then end up in a pre-flight fail.

Jaeyoung-Lim commented 1 year ago

Should we really set this though? I feel like a decent amount of people still fly real vehicles with a conventional RC connection and no GCS, but from what I read from the code this would then end up in a pre-flight fail.

I am asking since I couldn't find it in the airframe configs. If we are to change this we should for all vehicles, not just fixedwings.

At least for me, enabling it would be the safer option. I wouldn't assume someone flying with no GCS connection without any feedback would know what they are doing - unless they opt-in to this option. They can still fly without a GCS connection. They just can't do it without understanding that PX4 has different flight modes, and the behavior is not fully defined with the four stick inputs.

danielhonies commented 1 year ago

You can see it here: https://github.com/PX4/PX4-Autopilot/pull/22299/files, it's the NAV_DLL_ACT param. A GitHub search through the whole repo only brings up a few simulation airframes where it is set.

danielhonies commented 1 year ago

In my use case we would just configure everything with GQC and map the flight modes to an RC Channel. I'm thinking Hobbyists/FPV here. Yeah no real feedback is not optimal but I think a lot of beginners would also not know why their drone is not arming and be really confused.

frede791 commented 1 year ago

I agree with @danielhonies that setting the requirement for real world airframes would only lead to confusion for beginners. I would therefore opt to only enforce it across all simulation airframes.