mavlink / MAVSDK

API and library for MAVLink compatible systems written in C++17
https://mavsdk.mavlink.io
BSD 3-Clause "New" or "Revised" License
593 stars 492 forks source link

Ardupilot and MAVSDK compatability #1996

Open 41Mo opened 1 year ago

41Mo commented 1 year ago

Bug report

Greetings. I am trying to communicate with ArduCopter firmware via MAVSDK, and i found out a few problems. Some of them already discussed in #1990 issue.

Issue details

  1. action.takeoff() implementation for apm - takeoff_async_apm function works only if vehicle is not in offboard mode. This is kinda strange behaviour. e.g. User might change mode to offboard via rc controller and then want to takeoff, but in this case command would not be sent. Probably there is missing else branch.

  2. Another strange thing, not a bug, but misleading behavior is telemetry.set_rate_battery(). This function sets MAVLINK_MSG_ID_SYS_STATUS, which is used not only for battery, but for health status primarily. Probably this function should be called set_rate_sys_status()? And for battery rate MAVSDK should implement set_rate_battery(), which sets BATTERY_STATUS rate?

julianoes commented 1 year ago

Hi @41Mo, thanks for the notes.

  1. This was added by @ykhedar. Let's see if he can explain why it's done that way. I don't have insight into it.
  2. That's indeed misleading. Especially now that we also parse the proper battery status message, as far as I remember, so we could fix this now properly. Would you mind creating a pull request to fix it?
ykhedar commented 1 year ago

Hi @41Mo Good catch regarding point 1. It is indeed missing the else block. Do you want to create a PR for this? Otherwise, I can do that in a few days.

41Mo commented 1 year ago

@julianoes I will be happy to do pr on 2 issue.

Jai-GAY commented 8 months ago

Bug report

Greetings. I am trying to communicate with ArduCopter firmware via MAVSDK, and i found out a few problems. Some of them already discussed in #1990 issue.

@41Mo Have you successfully get more actions working with Arducopter? does the set_rate_battery helps? if yes, what value (hz) do you use?

Nevermind, I got it working on Pi4B.