get_Waypoints is_current value


#1

Hello!

When getting waypoints, I was expecting to get the is_current value set to true on the waypoint that the drone is en route to. For example let’s say I have 4 waypoints. The drone just passes waypoint 2, I would like to know that the drone is en route to waypoint 3, when getting the waypoints for the drone.

Is this thing possible currently? Or is this a feature request?

Basically I’m interested in what is the waypoint the drone is currently flying towards - from the list of the waypoints.

I’m using the RESTful API and currently is_current is false on all waypoints.

Thanks,
Alex.


#2

You are correct. We don’t update the is_current flag of waypoints.
Instead I would request you to use this API:

name: /<namespace>/mavros/mission/waypoint_achieved
type: std_msgs::UInt8

This is a rostopic, and you would have to subscribe to it. The data published by the topic is the waypoint number which has been achieved in the current mission.


#3

Thanks for the reply.

Is this accesible via rest API? - I assume using the same URL: http://{IP}/flytsim/mavros/mission/waypoint_achieved

I will test it. Thank you for the reply.


#4

Yes. It is available as REST API, but instead would request you to use Websocket API for this.

It is similar to fetching Local Position as defined over here. You just have to change the ‘data structure’.


#5

ok, thanks for the help


#6

One more question, after this you can close this thread:

Are there other /mission topics that we can subscribe to?
Is there documentation for them? I didn’t find the waypoint_achieved endpoint here: http://api.flytbase.com/

Thanks


#7

Yes. Unfortunately, we could not add all such APIs into our documentation.

It would be easier for me to respond if you post your requirements.
To get the list of rostopics available, you can run this command in terminal:

rostopic list

Similarly, to get the list of services:

rosservice list


#8

ok, thanks, you can close the thread


#11