The question has been asked before a long time ago but i havn't heard anything of it ever since. Is it possible to find out if a waypoint has been reached? Does dronekit implement this mavlink message? I'm programming a drone to stop for a few seconds once the waypoint is reached and havn't found a way to do so.

Views: 251

Reply to This

Replies to This Discussion

That worked?? I never tried that command since according to the API it doesn't stop the vehicle.



Evidlo said:

I figured this one out too.  Just use MAV_CMD_CONDITION_DELAY to add delay commands after each waypoint.

# hold position at current location for given seconds
def delay(time):
    return Command(0, 0, 0, mavutil.mavlink.MAV_FRAME_GLOBAL_RELATIVE_ALT, mavutil.mavlink.MAV_CMD_CONDITION_DELAY, 0, 0, time, 0, 0, 0, 0, 0, 0)


Melvin said:

Yea, but i noticed that the "MISSION_ITEM_REACHED" message is thrown after the delay(atleast its like that in the simulation) and i need something to tell me when it has reached it at that exact moment. So im thinking of switchin to Loiter mode after the delay to see if it works just fine). Sadly i live in PR and still got no power to charge up my laptop(bless Irma) and test that.


Evidlo said:

Ah, nevermind.  The first argument to MAV_CMD_NAV_WAYPOINT is the hold time.

Evidlo said:

Out of curiosity, how are you getting the quadcopter to stop at each waypoint?

Melvin said:

Great find Evan, works like a charm.

Reply to Discussion

RSS

© 2017   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service