How to connect DAVIS-346 with raspberry pi as external trigger input?

481 views
Skip to first unread message

weihua shao

unread,
Sep 6, 2021, 5:40:30 AM9/6/21
to davis-users

Hello,

I have a DAVIS-346 and a raspberry pi 4, and I want to use raspberry pi to generate an external trigger signal to the camera through the SYNC SINGAL_IN. Raspberry pi has GPIO and uses the DuPont thread. What should I do about wire connection or if there is someway on wire transfer. The output voltage of raspberry pi is 3.3V. Also, what should I do with the CLOCK_IN if I want to have hardware synchronization?  

Luca Longinotti

unread,
Sep 7, 2021, 12:20:26 PM9/7/21
to davis...@googlegroups.com
To answer your questions:
1) GND should go to the RPi's ground, VDD to its 3.3V, SIGNAL_IN to one
of the GPIOs.
2) No specific requirements, cable should be unshielded.
3) Since the RPi's GPIOs are 3.3V, and you supply the VDD_IN as 3.3V,
no further transformation is required. Fundamentally you can buy a
compatible sync cable and cut it, then just attach the correct wires
(three out of four) to the header pins on the RPi.
4) CLOCK_IN is used for synchronizing the timestamp value between
multiple cameras, it is not needed for external trigger input.

Hope this helps, have a nice day!
--
Luca Longinotti (llongi)

Head of Embedded Platforms
iniVation AG - https://inivation.com/
Zurich, Switzerland
Office: +41 44 500 32 14

weihua shao

unread,
Sep 7, 2021, 11:24:11 PM9/7/21
to davis-users

Cheers, it really helps! Thank you so much. Also, I have a question about the operating environment, 

please give me some kind advice at your earliest convenience.

 

I have tried to install Ubuntu mate 20.04 for rasp on raspberry pi 4 and configured the dv-runtime operating environment, 

then I use the SystemD service to drive the event camera (DAVIS-346) for data capture according to the guide 

(https://inivation.gitlab.io/dv/dv-docs/docs/getting-started/#raspberry-pi), but it does not work. 

I have checked that the driver of the camera has been installed normally in the USB device list, 

but the data capture is not normally performed, also I can not find any error log information from /var/log/dv-runtime.log, 

so I want to ask what is the problem and please tell me how I can solve this problem.

 

Best regards,

Weihua

Luca Longinotti

unread,
Sep 8, 2021, 8:59:40 AM9/8/21
to davis...@googlegroups.com
The most likely issue is permissions; by default the dv-runtime SystemD
service runs as the user 'dv-runtime' in group 'dv-runtime', so you
also need to select a recording location where that user can write. By
default, /var/lib/dv-runtime/ is created and its permissions set
correctly, and this should then be picked up as the HOME directory for
the 'dv-runtime' user and used as the default recording location.

You can edit the dv-runtime.service file and run it as another
user/group if needed, for example to run as a graphical-desktop-enabled
user.

If the camera cannot be selected at all and the issue is in the capture
module, then the problem is usually udev-rules, and you'll mostly
likely have to reboot once for the new rules to be loaded.

weihua shao

unread,
Sep 16, 2021, 12:30:16 AM9/16/21
to davis-users
(Sorry, I used the reply to the author that others may not see my questions, 
I am not quite familiar with the operations of the forum, so I will type here again.)

Thanks a lot for your kind suggestions,  this time I have another questions about 
time synchronization and dv-gui, please give me some kind advice at your earliest convenience.

I have connected my event camera (DAVIS346 Mono) to a Raspberry Pi 4B board, 
which is running Ubuntu Mate 20.04 for Raspberry Pi Operating System. 
And I have configured the running environment of rpg_dvs_ros, 
the data acquisition and visualization is successfully achieved by running dvs_renderer of
 rpg_dvs_ros package. 

1、 If I have an external trigger signal input to the event camera while doing the event data capture, 
how can I synchronously record each trigger moment ( with timestamps) of the external trigger signal?
2、 Since my event camera is connected to the Raspberry Pi 4B board(arm64), 
dv-gui can not be used. If dv-gui can be used, I can design the specific working mode of the camera by
 adding and deleting modules (such as Capture, Accumulator, Noise filter) in the graphical interface. 
But these are not available on the Raspberry Pi. So, when I try to use the dv software to control the 
event camera for data capture of events, images, external trigger signal information on Raspberry Pi, 
are there some sample projects which achieved the similar functions that can be referred to? 
And can you please provide me with the source code of these sample projects?
Thanks in advance.

Best regards,

Weihua

Luca Longinotti

unread,
Sep 16, 2021, 8:39:31 AM9/16/21
to davis...@googlegroups.com
1. the community ros driver does not support trigger data type.
You could add some code to handle it yourself in the DAVIS driver.cpp,
around:
https://github.com/uzh-rpg/rpg_dvs_ros/blob/master/davis_ros_driver/src/driver.cpp#L663
you'd have to handle the case of "type == SPECIAL_EVENT" and then look
at the SpecialEventPacket and extract the triggers.

2. You can start the dv-runtime on the Pi so it is accessible from
outside and then connect the dv-gui from your local PC desktop, see:
https://inivation.gitlab.io/dv/dv-docs/docs/getting-started/#launching-dv-runtime-with-a-remote-gui

weihua shao

unread,
Sep 22, 2021, 10:38:23 PM9/22/21
to davis-users

Sincere thanks for your timely and professional reply. Here is a problem that I met in data processing, 

please give me some kind advice at your earliest convenience.

 

I used DV-GUI to control the event camera for data collection and saved the data to aedat4 file. 

The event data, trigger data, IMU data and frame data were synchronously saved and analyzed through DV-Python. 

I found that all the magnetometer data in IMU data are [0, 0, 0]. That was found in the analysis of several data sequences. 

I would like to ask what maybe the reason for this? Is it a bug with DV SDK? Thank you very much.


Have a nice day!

 

Weihua

Luca Longinotti

unread,
Sep 23, 2021, 8:41:13 AM9/23/21
to davis...@googlegroups.com
Hello, what you are seeing is correct.
The IMU data-type supports any IMU, including 9-axis ones (accel, gyro,
compass).
The IMUs we mount on our cameras are 6-axis ones (accel and gyro only).
So the magnetometer part of the data-type will be zero.
Reply all
Reply to author
Forward
0 new messages