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

[MC / VTOL] Take off ramp overshoots MPC_TKO_SPEED constraint #12689

Open
ThomasRigi opened this issue Aug 13, 2019 · 2 comments
Open

[MC / VTOL] Take off ramp overshoots MPC_TKO_SPEED constraint #12689

ThomasRigi opened this issue Aug 13, 2019 · 2 comments

Comments

@ThomasRigi
Copy link
Member

ThomasRigi commented Aug 13, 2019

Describe the bug
During the take off ramp, the vehicle doesn't respect the MPC_TKO_SPEED constraint. Instead, the vehicle accelerates to MPC_Z_VEL_MAX_UP even when below MPC_LAND_ALT1 (and after finishing the ramp it slows down again if still below MPC_LAND_ALT1).

To Reproduce
Steps to reproduce the behavior:

  1. Start SITL (tested with Gazebo's standard VTOL plane, but I imagine it's the same for any MC)
  2. Set up parameters (tested with MPC_TKO_SPEED =1m/s, MPC_Z_VEL_MAX_UP = 2.5m/s, MPC_TKO_RAMP_T = 5s, MPC_LAND_ALT1 = 10m in SITL, and with MPC_TKO_SPEED =1.5m/s, MPC_Z_VEL_MAX_UP = 2.5m/s, MPC_TKO_RAMP_T = 5s, MPC_LAND_ALT1 = 12m in the real world)
  3. Take off

I experienced this behaviour with the take off command in QGC as well as launching missions. It's reproducible in SITL and on our real VTOL drone.

Expected behavior
Have the vehicle respect the MPC_TKO_SPEED during the take off ramp

Log Files and Screenshots
Always provide a link to the flight log file:
https://logs.px4.io/plot_app?log=a9e878be-395a-45ee-8f72-40db4b265931

Add screenshots to help explain your problem.
Screenshot from 2019-08-13 10-45-52

Drone (please complete the following information):

  • Tested on standard VTOL in Gazebo and a v-tail quadplane in the real world
  • SITL was tested on both on v1.9.0 and current (13.08.19) master, real drone runs v1.9.0 on a Cube

On a side note: why does QGC complain about MPC_TKO_RAMP_T having to be between 0 and 1 and in the parameter reference it says between 0 and 5?

@bresch bresch added this to the Release v1.10.0 milestone Aug 14, 2019
@bresch bresch self-assigned this Aug 14, 2019
@bresch
Copy link
Member

bresch commented Aug 14, 2019

Hi @ThomasRigi ,

I looked into that issue and I'm able to reproduce it.
The problem is the following: the trajectory generator produces a velocity and a position setpoint but the logic for the takeoff ramps cuts the velocity setpoint. The signals are not consistent anymore (derivative of position != velocity) and the position error increases -> velocity sp wants to increase to reduce the position error and this is why it goes beyond the takeoff velocity parameter.

2019-08-14_11-38-07_01_plot

A proper solution would be to tell the trajectory generator what's the current max velocity or even better, what's the current max acceleration (defined by the takeoff ramp).

On a side note: why does QGC complain about MPC_TKO_RAMP_T having to be between 0 and 1 and in the parameter reference it says between 0 and 5?

You still have the old metadata where the max was 1. You need to update the metadata or get a newer version of QGC

@bresch bresch changed the title [MC / VTOL] Take off ramp ignores MPC_TKO_SPEED constraint [MC / VTOL] Take off ramp overshoots MPC_TKO_SPEED constraint Aug 14, 2019
@stale
Copy link

stale bot commented Nov 12, 2019

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.

@stale stale bot added the stale label Nov 12, 2019
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

3 participants