Closed m-yoshida04 closed 2 years ago
The build is successfully completed when it is done from the sources.
(Sources are downloaded by entering the command of git clone https://github.com/mavlink/MAVSDK.git
and build according to https://mavsdk.mavlink.io/main/en/cpp/guide/build.html
)
However, the vehicle will not respond to the command even after the follow me example is run by the command of build/follow_me udp://:14540
.
In other examples such as fly_mission
and takeoff_and_land
, the vehicle responds to the command as expected.
Does anybody know how I can solve this issue?
I have the latest PX4 source codes by entering the commands of git clone https://github.com/PX4/PX4-Autopilot.git --recursive
and uses QGC daily build as GCS.
Thank you for your help in advance.
You are trying to build the example from the mavsdk main
branch which requires the library to be updated to main as well. The main
branch has quite a few API changes and will be released as version 2 soon.
Until then, I recommend checking out the branch v1.4
(or the release tag) which matches what you have installed.
Thank you for your quick reply. I would like to run the example for new follow me mode in MAVSDK. Is branch v1.4
is good one to be checked out and run?
That's v2.0 then as it has changed recently. In that case you need to use the new subscription API. Check the changes here: https://github.com/mavlink/MAVSDK/pull/1768
Thank you again for your kind reply.
It seems fake_location_provider.cpp in mavsdk main
branch does provide target lateral and longitudinal information but does not provide target altitude. If it is correct, I believe this is the reason why the vehicle does not respond to the follow me command via MAVSDK in my simulation while the follow me example is executed. The outputs of pos_est and vel_est in follow_target_estimator message are always 'NAN' in my simulation.
I did succeed to run the example for new follow me mode via MAVSDK. So, this can be closed. Thank you.
Oh nice! Thanks for the note.
I got the MAVSDK source codes using git command of
git clone https://github.com/mavlink/MAVSDK.git --recursive
. Then I tried to build them per the following commands in the MAVSDK/examples/follow_me.However, following message came in and the built never succeed.
It can not find NewSystemHandle in the mavsdk.h.
Could anybody help me to build?
Thanks.