Px4-autopilot: Mission speed change not working

Created on 2 Apr 2019  路  14Comments  路  Source: PX4/PX4-Autopilot

In recent jMAVSim SITL tests using the Dronecode SDK I found that the MAVLink command MAV_CMD_DO_CHANGE_SPEED does not seem to have any effect.

No matter what the speed is set, the vehicle speed is always 5 m/s presumably the cruise velocity.

Firmware version: 0b548fa6849e7a608b4c120fb66a760e51806056

bug multicopter

All 14 comments

@bresch any idea why this happens?

Do you recall when it last worked?

My guess it's limited to cruise velocity somewhere in position control or flight task but I couldn't find it yet.

Right, the velocity is limited by the cruise speed parameter. I have to check how "DO_CHANGE_SPEED" is implemented in the mavlink receiver.

It's implemented in the navigator actually.

Not fixed properly yet.

@bresch did you find anything?

I need to discuss with @MaEtUgR for a proper fix, hopefully tomorrow we can have something.

Does this only happen with smooth mission enabled or always? Because #11772 only changed the smooth vel task which

  1. is not the upstream default
  2. gives us a hint where the problem is

This happens with default jMAVSim SITL, so whatever comes with that. I don't know what sort of smoothing goes on.

There seem to be two problems:

  • Mission speed does not get applied in the smooth mission (MPC_AUTO_MODE 1, default)
  • Speeds above the cruise speed do not work in general also with MPC_AUTO_MODE 0.

I did a test with DronecodeSDK and make && build/default/integration_tests/integration_tests_runner --gtest_filter="SitlTest.MissionChangeSpeed" and at this point I still get the correct values: https://github.com/PX4/Firmware/blob/d9f8e37288d8e34baac79b32d71862045946534b/src/lib/FlightTasks/tasks/Auto/FlightTaskAuto.cpp#L129

@julianoes The DronecodeSDK test seems super picky:

[11:40:47|Info ] Mission status update: 2 / 4 (mission_change_speed.cpp:165)
[11:40:53|Warn ] speed check, should be: 3 m/s, actually: 3.06059 m/s (mission_change_speed.cpp:88)
[11:41:15|Debug] current: 3, total: 4 (mission_impl.cpp:1200)
[11:41:15|Info ] Mission status update: 3 / 4 (mission_change_speed.cpp:165)
[11:41:21|Warn ] speed check, should be: 8 m/s, actually: 8.07201 m/s (mission_change_speed.cpp:88)

but at least it succeeds if it's within +-1m/s.

The warning is misleading, that should be a pass overall.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lgh5054 picture lgh5054  路  4Comments

ghost picture ghost  路  4Comments

Stifael picture Stifael  路  3Comments

alexcherpi picture alexcherpi  路  4Comments

wuxianshen picture wuxianshen  路  3Comments