Logging time tagged video stills with sensor data

I note that there is a raspbery pi command ‘raspistill -o cam.jpg’ that will capture video stills.
[2592x1944] resolution.

Does anybody now how to set a up a logging system that will do the following on a dive automatically

  1. Call raspistill -o filename.jpg’
  2. Do this at a predefined interval say every 5 seconds
  3. Log a time tag along with time synced sensor data (IMU Data).

I found a paper on the internet that is using the BlueRov2 to this with the output shown below.
[ I have been anable to contact the author to find out how it was achieved.]

{
3 ”timestamp”: 1504782803806,
4 ”image”: ”Image000033.jpg”,
5 ”imu data”: [
6 ”RAW IMU {time usec :3387046337, xacc :142, yacc : −22, zacc : −996, xgyro : 5,
ygyro : 27, zgyro : 2, xmag :−78, ymag :−230, zmag :−549}”,
7 ”SCALED IMU2 {time boot ms :3387046, xacc :123, yacc :−32, zacc :−999, xgyro :
4, ygyro : 0, zgyro : −70, xmag :0, ymag : 0, zmag : 0}”,
8 ”SCALED PRESSURE {time boot ms :3387046, press abs :1095.18615723, press di↵ :
79.0070266724, temperature :5727}”,
9 ”SCALED PRESSURE2 {time boot ms :3387046, press abs :1277.70275879,
press di↵ :264.452728271, temperature :1905}”
10 ]
11 },
12 {
13 ”timestamp”: 1504782803779,
14 ”image”: ”Image000034.jpg”,
15 ”imu data”: [
16 ”SERVO OUTPUT RAW {time usec :3387086678, port :0, servo1 raw :1525,
servo2 raw :1474, servo3 raw :1525, servo4 raw : 1474, servo5 raw : 1509,
servo6 raw : 1499, servo7 raw : 1100, servo8 raw : 1800, servo9 raw : 0,
servo10 raw : 0, servo11 raw : 0, servo12 raw : 0, servo13 raw : 0, servo14 raw
: 0, servo15 raw : 0, servo16 raw : 0}”,
17 ”RC CHANNELS RAW {time boot ms :3387086, port :0, chan1 raw :1500,
chan2 raw :1500, chan3 raw :1500, chan4 raw :1500, chan5 raw :1420, chan6 raw :
1500, chan7 raw : 1500, chan8 raw : 1800, rssi : 0}”,
18 ”ATTITUDE {time boot ms :3387086, roll :0.0108106117696, pitch :
0.0513137206435, yaw : 2.21572089195, rollspeed : 0.00796211417764, pitchspeed :
0.0290557350963, yawspeed :0.00267279311083}”,
19 ]
20 },
21

Can you provide a link to the paper? The video stream will be interrupted when you take a picture, unless you use a separate camera.

Jacob

page 47 for the section on BlueRov2 setup.

I am using this for a computer vision project (not SLAM) so not an issue if I lose video occasionally.
The best way is if I could assign a button the controller to take a video still.

There are some spare wires on the umbilical that I could possibly use as well I guess

Jacob

Actually all i need to do is log on the sub i dont need this sent up the umbilical. Could download post dive.

So simple python script would do the video stills.

I guess my question is the time tagging. Is the sensor logging using the raspi pis clock ?

Is it possible to grab a fix of the sensor data via a python script at the same time as the video still is taken

Yes, it is possible to log the data to the pi, or grab the data yourself in your own script. Check out MAVProxy, pymavlink, and this post.

Thanks Jacob