I am trying to make the ANAFI drone fly an autonomous trajectory (example: z coordinate = sin(x-coordinate)).
To do this, I want to know the current physical location of the drone in real time, so that I can use the MoveBy command.
Can any one please discuss if:
We can read the drone’s state in some absolute frame (position and attitude) in real time?
If yes, can you please post a code snippet that shows this ?
I know it is possible to do it with the --datalog feature in Sphinx. See the code about tlm-data-loggerhere.
NB: You can get it in real time albeit being a command-line tool, you get a “stream” of data that has to be parsed in order to use it later. It is based in the SDK so you should be able to prototype some snippet to get it directly into your workflow
Moreover, you may also get it through Olympe, but I know no way to do it. If you find anything, please share it!
Very good --datalog feature. I was able to work, but could not access from another computer that is connected to the Sphinx control network. What would be the reason?
@pjnet: I worked with the position state changed command. But This does not work well for indoor flights.
Example: I noted the (lat, lon, alt) when my ANAFI took off. I then commanded my drone to ‘moveby’ 1 m forward and then measured the (lat, lon, and alt). These values were exactly the same. – At least in my case. As far as the interval goes, I was reading the data in a while loop, so my state would be updated every time instant.
@espetro: I think the tlm logger is exactly what I want, but as you mentioned, this is for the Sphinx. environment. Is there a similar environment to read the data from a physical drone ?