Skip to content

Revert rascal model to prevent crash on arming #15

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Jaeyoung-Lim
Copy link
Member

@Jaeyoung-Lim Jaeyoung-Lim commented Mar 19, 2025

Problem Description
When trying to fly the Rascal model with PX4 SITL, the vehicle would crash immediately after takeoff

Turns out this was because the motor attached on Auterion/FlightGear-Rascal@d0d1db1 was way to powerful
@RomanBapst FYI (5 years old commit...)

Fixes PX4/PX4-Autopilot#24466
@simfinite

Solution
Revert model to use previous gas powered engine (for now)

image

@Jaeyoung-Lim Jaeyoung-Lim requested a review from dagar March 19, 2025 23:54
@Jaeyoung-Lim Jaeyoung-Lim changed the title Revert rascal model to prevent crashing Revert rascal model to prevent crash on arming Mar 19, 2025
@simfinite
Copy link

@Jaeyoung-Lim thanks for looking into this!

I am having troubles to reproduce the fix, i.e. the issue still persists on my end. Also, it seems the engine specified in Zenoah_G-26A.xml is also an electric engine with even more power:

<?xml version="1.0"?>
<!-- Zenoah G-26A -->
<!-- 2.96 hp engine -->
<!-- one horsepower equals 745.69987 Watts -->

<electric_engine name="electric_1mw">
  <power unit="WATTS">  2207.27 </power>
</electric_engine>

Reducing the power, also does not help. I tried with a tenth of this power, but the plane still rolls on its back and crashes the moment it is armed. If I reduce to 50W, the plane starts spinning/going in circles on the ground when arming.

@Jaeyoung-Lim
Copy link
Member Author

@simfinite hmm...I see have you checked flying manually?

@Jaeyoung-Lim
Copy link
Member Author

Jaeyoung-Lim commented Mar 20, 2025

@kaklik any chance you can share insights on how we can fix this?

@simfinite
Copy link

@simfinite hmm...I see have you checked flying manually?

Good idea, I just tried that. I can arm in manual mode, but as soon as I give some throttle, the plane starts to rotate wildly and crashes.

@simfinite
Copy link

I did some more testing. The behavior is not 100% reproducible, sometimes the aircraft "jumps" into the air quickly rotating, sometimes it just rolls over. Either way, I cannot get it flying in PX4 SITL.
Here is an example: https://clip.place/w/axvEjfFDzMhF3Qagq6ymVA

I also tried flying the Rascal model in FlightGear and I can also see a little quirk when first applying throttle, but it will work afterwards. As @Jaeyoung-Lim suggested in another thread, this seems to be related to ground reactions.

Can anyone confirm to have similar problems or is this just on my end?

@Jaeyoung-Lim
Copy link
Member Author

Jaeyoung-Lim commented Mar 21, 2025

@simfinite
I realized that the setup works without any problems in PX4 v1.13.3

I am guessing it might be something related to the control allocation configuration.

What is confusing for me is that it seems to fly okay after the vehicle is airborne, so it is definitely not just the channel numbering or a sign error.

@simfinite
Copy link

@simfinite I realized that the setup works without any problems in PX4 v1.13.3

Confirmed. I can takeoff via commander takeoff. Not an elegant takeoff, it turns 90° CW before lifting off, but it continues to fly ok once airborne.

@Jaeyoung-Lim
Copy link
Member Author

@simfinite Yes, same with me as well. I had some look into flight logs comparing the two versions, but I couldnt find anything meaningful.

I was wondering if anyway it doesnt make much sense if the vehicle turns to the reaction of your throttle. So maybe we either we an aircraft that is too light OR the rotors are too heavy?

@sfuhrer
Copy link

sfuhrer commented Mar 26, 2025

Did you check that the mapping is correct?
mixer for 1.13
now, with CA
It seems to be correct for all other planes in SITL, and it was all the same mixer back then, so I would be surprised if it's wrong just on that one here..

Otherwise try to disable all actuators beside the motor and see if it accelerates forward, and then one by one add more actuators again.

@Jaeyoung-Lim
Copy link
Member Author

Jaeyoung-Lim commented Mar 26, 2025

@sfuhrer Mapping is correct (You can fly the plane once in the air).

I am wondering if the throttle is more aggressive with recent versions of PX4. It seems to be worse in auto takeoff compared to manual takeoff. The spin seems to be a reaction force spinning the vehicle as immediate torque is applied to the props.

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.

[Bug] JSBSim SITL crashes immediately after arming
3 participants