intel-aero / meta-intel-aero

Yocto layer to support Intel Aero platform
https://github.com/intel-aero/meta-intel-aero
GNU General Public License v2.0
218 stars 119 forks source link

how to access GPS or waypoint data directly in intel aero? #370

Open ambikaverma opened 5 years ago

ambikaverma commented 5 years ago

Hi

I want to start running a python script only when the uav is close to a waypoint (which I can track by comparing the target gps location with current gps data).

Any recommendations for what I can use to access this data directly on intel aero (while still running QGC and not using ubuntu on itel aero)?

Thanks!

lucasdemarchi commented 5 years ago

I don't fully understand what you want to do, but it seems like you want to have a script running and comparing the GPS positions. When it reaches a certain mission waypoint you trigger an action that's basically firing your dedicated script.

There's a mavlink message from the flight stack notifying you when it considers the waypoint "done". You can use that instead of comparing the GPS coordinates, too.

ambikaverma commented 5 years ago

Yup that is exactly what I want to do. Sorry if I wasn't clear.

Could you tell me what mavlink message is it? Are you referring to this message - http://mavlink.org/messages/common#MISSION_ITEM_REACHED

And to monitor the message which port should I be reading from/ listening to?

lucasdemarchi commented 5 years ago

yes. that one.... See the example on mavlink-router to use TCP port 5760 and make sure to start your service on boot.

ambikaverma commented 5 years ago

Thanks I was able to test the tcp example - https://github.com/intel/mavlink-router/blob/master/examples/heartbeat-print-tcp.py

Could you point out why I need to start this on boot? if i start this tcp script afterwards it still gives me the current data right (from what I saw)? also, to start this on boot I will have to create a systemd service right? similar to the aero-optical-flow service?

ajeyaajeya commented 5 years ago

I have the same question as the previous one.