Using a Raspberry Pi 3 to automatically geotag pictures, while using a Pixhawk to fly the drone

1,321 views
Skip to first unread message

Julian Ramirez Ruiseco

unread,
Mar 15, 2016, 2:13:35 PM3/15/16
to swiftnav-discuss
Hello.
I would like some input since I have not tried to use the raspberry pi in this manner before.

1) The plan.


I am planning on using a GoPro connected by Wifi to a raspberry Pi as shown here.

http://diydrones.com/profiles/blog/show?id=705844%3ABlogPost%3A1991119&commentId=705844%3AComment%3A1992039&xg_source=activity

However, instead of tagging the photos using missionplanner. I want to tag them directly. My plan is connect the Piksi directly to BOTH the pixhawk and the Raspberry Pi.

I am going to "trigger" the take photo command using the pixhawk. At which point the raspberry pi will send a take picture command to the gopro. While the camera takes the picture, I will read the RTK data (pitch, roll, and gps coordinares) to a log file.

I will on my computer directly tag each picture with the corresponding picture gps data.


2) The questions

a) Can I connect the piksi directly to both the raspberry pi and the pixhawk?
b) Does the piksi continuously output data, or does it need to be querried?


Thanks in advance for the help.

rai gohalwar

unread,
Mar 15, 2016, 5:41:28 PM3/15/16
to swiftnav-discuss
Hi Julian,

Do you plan on using the Piksi for navigation on the Pixhawk ? 

You can connect to the Pi using the micro usb port on Piksi. Try to supply the piksi with only once source of 5v . 

How fast will you be flying ? I am worried the latency from the Pi and Wifi may decrease the accuracy of the geo-tags of the images significantly. 

A possible way is to sync the Go Pro's clock with GPS time using this tutorial . You can use the time from the images and match it with gps time from Piksi logs. I am not sure if this will work. It is just an idea I had. 

Best Rai 

Salil Goel

unread,
Mar 15, 2016, 10:01:41 PM3/15/16
to swiftnav-discuss
If you are looking to connect Piksi to both the Pi and Pixhawk at the same time, I don't think you can do. Currently I am running piksi using Pi. Earlier while testing,  i had connected Piksi to the laptop via microUSB on piksi and piksi to pixhawk via UART ports and if i remember correctly, when both pixhawk and laptop were running at the same time while connected to Pixhawk, i heard some weird noises coming out of pixhawk which didn't sound that good. I'd expect the same thing if you connect piksi to Pi and Pixhawk at the same time. However if you connect piksi to either one of Pi (using microUSB-USB) or Pixhawk (using UART), piksi works alright. I didn't go in to the details because of time constraints but probably i will look in to it when time permits.

Cheers!
Salil

Eric Hendrix

unread,
Aug 30, 2016, 10:35:16 PM8/30/16
to swiftnav-discuss
DId you ever accomplish this?

Clive Turvey

unread,
Aug 31, 2016, 11:36:04 AM8/31/16
to swiftnav-discuss
Technically it is possible to hook the Piksi to other micro-controllers, or data recorders, so let's focus what's important in the general sense so you can deal this the specifics yourself.

You have to be careful with powering from multiple sources, the RPi should just need RX, TX and GND from UARTB and get a data stream, where the Piksi and RPi are independently powered.

I've powered other data-logger boards from the Piksi 5V, and this can be convenient if the current budget fits. The Piksi can also be powered by other USB devices, even battery/charger type devices.

Moving system using GPS seem to have a very poor understanding of time, there needs to be some common understanding of time in the system, because GPS reports where it was in the past, and this is compounded by the latency in getting the solution decoded on your host. So you either need to synchronize time on the system(s) using 1PPS to understand or discipline the local clock, or use an EVENTIN to provide a GPS time-stamp of the specific instant you are interested in. Either way you need to take the time of the location, and the time of the event, and extrapolate/interpolate the two so they are coherent in the time/position domain. You'd use the rate of change in position, velocity, acceleration, etc.

The Piksi should have an EVENTIN available on the Debug Connector.


On Tuesday, August 30, 2016 at 9:35:16 PM UTC-5, Eric Hendrix wrote:
DId you ever accomplish this?

rai gohalwar

unread,
Sep 6, 2016, 1:09:58 PM9/6/16
to swiftnav-discuss
I just want to add my opinion to the thread. As far as connecting Piksi to RPI, it is very easy and functional. Clive explained that pretty well. I want to mention a few things about connecting it to the Pixhawk and RPI. If you are using your PI to trigger the images for the go-pro, you can fetch the gps data from the pixhawk. Since your pixhawk is connected to the PI to get the trigger info, you can also get the gps data. On that note, piksi data is all logged on the pixhawk and so is the trigger data. If I were you I would find the latency of your go-pro trigger system and interpolate for the trigger time +latency. 

Best

Rai Gohalwar 
Reply all
Reply to author
Forward
0 new messages