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

Mission speed change not working #11764

Closed
julianoes opened this issue Apr 2, 2019 · 14 comments · Fixed by #11836 or #11772
Closed

Mission speed change not working #11764

julianoes opened this issue Apr 2, 2019 · 14 comments · Fixed by #11836 or #11772

Comments

@julianoes
Copy link
Contributor

julianoes commented Apr 2, 2019

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: 0b548fa

@julianoes julianoes self-assigned this Apr 2, 2019
@julianoes julianoes changed the title Mission speed Mission speed change not working Apr 2, 2019
@julianoes
Copy link
Contributor Author

@bresch any idea why this happens?

@dagar
Copy link
Member

dagar commented Apr 2, 2019

Do you recall when it last worked?

@julianoes
Copy link
Contributor Author

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

@bresch
Copy link
Member

bresch commented Apr 3, 2019

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

@julianoes
Copy link
Contributor Author

It's implemented in the navigator actually.

@julianoes
Copy link
Contributor Author

Not fixed properly yet.

@julianoes
Copy link
Contributor Author

@bresch did you find anything?

@bresch
Copy link
Member

bresch commented Apr 4, 2019

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

@MaEtUgR
Copy link
Member

MaEtUgR commented Apr 8, 2019

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

@julianoes
Copy link
Contributor Author

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

@MaEtUgR
Copy link
Member

MaEtUgR commented Apr 8, 2019

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.

@MaEtUgR
Copy link
Member

MaEtUgR commented Apr 9, 2019

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

@MaEtUgR
Copy link
Member

MaEtUgR commented Apr 9, 2019

@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.

@julianoes
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants