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

VTOL crashes after transition to fixed wing #710

Closed
Seiwert opened this issue Feb 17, 2021 · 19 comments
Closed

VTOL crashes after transition to fixed wing #710

Seiwert opened this issue Feb 17, 2021 · 19 comments
Assignees

Comments

@Seiwert
Copy link

Seiwert commented Feb 17, 2021

Hello,

I'm encountering an issue with all fixed wing style vehicles when trying to fly. The tailsitter, standard vtol, and plane models all go into a death spin and crash into the ground either after takeoff in the case of the plane or after transitioning to fixed wing mode in the case of the VTOL models. The VTOL models act totally normal up until the point at which they transition. An important distinction here though is I only encounter this issue when attempting to start the simulation with the roslaunch scripts provided. If I launch the vehicle with the make px4_sitl gazebo_tailsitter or similar commands, the vehicle flies and performs as expected.

I'm at a bit of a loss tracing this. It seems as though both methods of starting the simulation utilize the same SDF file so I'm unsure as to what the culprit could be. Any assistance would be greatly appreciated. Thanks in advance!

@Jaeyoung-Lim
Copy link
Member

@Seiwert If you are only seeing it when running with ROS, there is probably something wrong with your launchfile or how the simulation is being launched.

Could you elaborate on how you are running the sim?

@Seiwert
Copy link
Author

Seiwert commented Feb 22, 2021

Hi @Jaeyoung-Lim , thanks for the response! So like I kind of mentioned before, when I launch the sim by utilizing the make files (e.g. make px4_sitl gazebo_tailsitter) everything works as I would expect.

However, when I try to use any of the launch files that are included with PX4 is when I run into issues. I've only been using the mavros ones however (primarily mavros_posix_sitl.launch) and the only thing I've changed is the vehicle type argument.

And to test that the system and overall movement is working I've just been using QGroundControl to run simple missions

@ghfue
Copy link

ghfue commented Feb 25, 2021

I have seen this issue as well using plane and plane_catapult attempting to takeoff on a mission. I have reverted the PX4 branch to tag v1.11.3 (with the submodules), where it still works.

This works on master:
make px4_sitl gazebo_plane_catapult

while this plane sim spirals and crashes on takeoff on master using the exact same mission but works on PX4 v1.11.3 and older:
roslaunch px4 mavros_posix_sitl.launch vehicle:=plane_catapult

To eliminate mavros (which shouldn't affect anything here), it is also unsuccessful taking off using this launch command:
roslaunch px4 posix_sitl.launch vehicle:=plane_catapult

@Seiwert
Copy link
Author

Seiwert commented Feb 26, 2021

@ghfue I tried reverting to that tag as you suggested and it didn't quite work. Once again the make command works (although I'm seeing incredibly different flight behavior) the roslaunch based command does not work. However this time I'm getting a different error. When I start everything with any of the roslaunch files, I get an error saying the accelerometer is uncalibrated. To my understanding it is not possible to calibrate with the SITL and it should've came pre-calibrated.

@ghfue
Copy link

ghfue commented Feb 26, 2021

@Seiwert Try doing a clean build and clear your eeprom.

@Seiwert
Copy link
Author

Seiwert commented Feb 26, 2021

@ghfue That resolved my issue. I had to do some odd combinations of resetting all parameters and settings back to default and then doing a clean build but it eventually resolved the issue. I was unable to get this to work for the tailsitter but the standard vtol worked just fine ( the standard vtol will work for my needs). Glad to know this can be resolved by rolling back to a previous release but I'll keep this issue open for now in hopes of digging into the current root problem with current master

@ghfue
Copy link

ghfue commented Mar 3, 2021

@Jaeyoung-Lim I think we can change the label from question to bug.

@Jaeyoung-Lim
Copy link
Member

@ghfue I am not sure, since I think this is coming from how the simulation is being launched from ROS, which is not part of this repo

@Seiwert
Copy link
Author

Seiwert commented Mar 4, 2021

@Jaeyoung-Lim What repo would you think this issue would be better placed in? I can close this one and open in the appropriate repo and just link back to here for tracking

@Jaeyoung-Lim
Copy link
Member

Jaeyoung-Lim commented Mar 4, 2021

@Seiwert You can keep this issue open, but the problem is probably in your roslaunch file

Can you look into fixing the problem?

@Seiwert
Copy link
Author

Seiwert commented Mar 6, 2021

@Jaeyoung-Lim I highly doubt it's the launch file as I've not changed the launch file at all and still encounter the issue. I can try to fix the problem but will need to do further research into how the SITL setup even works to begin to understand where the problem could lie

@Jaeyoung-Lim
Copy link
Member

@Seiwert Thanks! Please let us know how your investigation goes

But then what can it be? The only difference between the roslaunch and make target is that one uses a roslaunchfile and one uses a script. The rest of sdf/binaries that are being run are exactly the same

@Seiwert
Copy link
Author

Seiwert commented Mar 6, 2021

@Jaeyoung-Lim That was my exact confusion. I found the script the make target uses and tried comparing outputs from it to the roslaunch and they seemed identical

@Jaeyoung-Lim
Copy link
Member

@Seiwert Can you check if #730 fixed your problem?

@Jaeyoung-Lim Jaeyoung-Lim self-assigned this Mar 19, 2021
@ghfue
Copy link

ghfue commented Mar 22, 2021

Thanks @Jaeyoung-Lim , this appears to be fixed in my testing with that revert.

@Jaeyoung-Lim
Copy link
Member

@ghfue Thanks, not sure what exactly was the issue but closing this issue for now

@aoberai
Copy link

aoberai commented Jun 8, 2022

In case a change needs to be made to main, I have the exact same issue as op in the same situation (doesnt work with launch file, plain make px4... command works fine for transition to fw- will try the revert but I see that it was not merged to main - maybe something left to be fixed. To modify the launch file, all I did was change mavros_posix_sitl.launch to have the vehicle tailsitter. I see a couple of people on the px4 forums having the same issue whose posts were left mostly unaddressed.

@Jaeyoung-Lim
Copy link
Member

@aoberai please post a separate issue with instructions on how to reproduce your problem

@aoberai
Copy link

aoberai commented Jun 8, 2022

#871

junwoo091400 added a commit to junwoo091400/PX4-SITL_gazebo that referenced this issue Sep 26, 2022
- This fixes the transition crash error, which seems to be related to
PX4#710 as well.
- While standard_vtol.sdf.jinja was updated to the new naming
convention, the standard_vtol_drop was not updated, this commit fixes
that.
- Also, PX4#730 is also relevant
for this issue.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants