Acquire data remotely using DAVIS346+Raspberry Pi 4 -> dv_control doc?

279 views
Skip to first unread message

jonah.s...@gmail.com

unread,
Mar 8, 2021, 1:27:25 AM3/8/21
to dv-users
Hello!

I would like to acquire data remotely from two DAVIS346 sensors using a Raspberry Pi 4 running dv-runtime. How could I go about this assuming I can establish a good network connection to the Raspberry Pi 4 from a computer that can run dv-gui? Reading your docs about remote acquisition, there is reference to dv-control which I assume can configure the dv environment when running dv headless. Is there a manual or doc for dv-control?

Any help is appreciated!

Jonah

Luca Longinotti

unread,
Mar 10, 2021, 11:54:43 AM3/10/21
to jonah.s...@gmail.com, dv-u...@googlegroups.com
Hello, there is no doc for dv-control, it's a simple command-line
interface that connects to the dv-runtime and allows you to get/set
single configuration parameters (the same as in the XML files
fundamentally).
It's meant for specific advanced use-cases and debugging mainly.

For users of embedded devices, we recommend setting up the SystemD
service for dv-runtime on the device and then using the GUI to connect
and setup your system, it will then continue running as you specified,
since the SystemD service will take care of saving/restoring
configuration on shutdown/boot.
As any system services, that only works reliably on orderly shutdown,
so don't just unplug the power. :-)
Details on this are here:
https://inivation.gitlab.io/dv/dv-docs/docs/getting-started/#launching-dv-runtime-with-a-remote-gui

Hope this helps, have a nice week!

-----Original Message-----
From: jonah.s...@gmail.com <jonah.s...@gmail.com>
To: dv-users <dv-u...@googlegroups.com>
Subject: [dv-users] Acquire data remotely using DAVIS346+Raspberry Pi 4
-> dv_control doc?
Date: Sun, 07 Mar 2021 22:27:25 -0800

jonah.s...@gmail.com

unread,
Mar 10, 2021, 12:11:56 PM3/10/21
to dv-users
Luca, 

Thanks for the heads up! I will continue as prompted with SystemD to boot dv-runtime and control via a remote GUI. Loosely related, is dv-runtime compatible with Raspberry Pi OS or rather only Ubuntu? 

Jonah 

Luca Longinotti

unread,
Mar 10, 2021, 12:47:50 PM3/10/21
to dv-u...@googlegroups.com
Since Ubuntu now fully supports Raspberry Pi hardware:
https://ubuntu.com/raspberry-pi
We only officially support it via our Ubuntu packages.
You can certainly compile it yourself on Raspbian, but we highly
recommend using Ubuntu as it has newer versions of a lot of software
and is generally just easier to maintain.

jonah.s...@gmail.com

unread,
Jun 9, 2021, 7:30:53 PM6/9/21
to dv-users
Hi Luca, 

I was able to start dv.runtime-service upon boot on the remote Pi and am able to visualize data in a dv-gui instance on my laptop. Some follow-up questions, please forgive me for any over simplifications or ignorance:

1. Under the hood, what is happening on the remote dv-runtime? Is the Pi  instance responsible capturing data from the sensor and sending to the remote laptop on the port?
2. When creating a project structure and saving to an .xml, is that configured all on the Pi or on the machine running the dv-gui?
3. If I were to create a custom module that would process events, would I compile said module on the Pi and point to the instance similar to this tutorial (https://inivation.gitlab.io/dv/dv-docs/docs/first-module/)? Or would I follow the flow on the laptop?
4. I eventually would like to process events in DV and use the custom module to trigger an action near the Pi (TTL, etc). Is that possible within the DV framework? Would I use the trigger output object (https://inivation.gitlab.io/dv/dv-docs/docs/io-api/#events-imu-trigger) ?

Thank you again for all the help thus far!

Jonah

Luca Longinotti

unread,
Jun 14, 2021, 4:57:55 PM6/14/21
to dv-u...@googlegroups.com
Hi, glad you got it working.
To answer your questions:

1) Yes, the runtime running on the Pi is getting the data from the
camera via USB and then sending it out to your laptop via a DV TCP
Output Server module. When you create a visualizer in the GUI, it adds
such a module on the Pi automatically and connects to it. You can also
add them manually, see the dv-python examples for that:
https://gitlab.com/inivation/dv/dv-python#configure-dv

2) The configuration is saved locally to your machine, but is deployed
to the remote Pi when you select it. It will remain deployed there and
should automatically resume if you reboot the Pi (careful, if you kill
the Pi by just unplugging its power DV-runtime won't be able to
gracefully shutdown and save its configuration, in which case it will
resume from either an empty state or the last successfully saved
state).

3) The easiest way is to compile on the Pi as per instructions there.
If you want to be able to test everything locally on your PC and then
cross-compile to deploy on the Pi that is also possible:
https://inivation.gitlab.io/dv/dv-docs/docs/qtcreator-crosscompilation/
But just having your module in some git repo and then just 'git pull &&
compile' on the Pi is by far the easiest way to set this up.

4) That's possible. You wouldn't use the Trigger data type, that's
mainly meant to 'represent' possible triggers from the camera. To
actually do something on the Pi, such as set one of its GPIOs, you
would simply include the relevant Pi-GPIO libraries in your custom
module and do the action there, something like:

>> if (events_per_second > 1M) rpi_gpio_set(44, true);

Hope this helps, have a great week!
--
Luca Longinotti (llongi)

Software Engineer
iniVation AG - https://inivation.com/
Zurich, Switzerland
Office: +41 44 500 32 14

Support - https://inivation.com/support/

Zachry T

unread,
Jul 8, 2021, 3:57:20 PM7/8/21
to dv-users

Jonah,

 

I am trying to remotely acquire data with the DAVIS346 and a Raspberry Pi 4. I have configured the dv-runtime.service with the 0.0.0.0:4040 IP.  The problem that I am having is connecting the remote computer to the DAVIS346.  In the GUI I tried a remote connect using the 0.0.0.0:4040 IP and it fails to connect.  I was wondering if there was something special with connecting between the Pi and the laptop?  Are you running Linux on both machines? Did you have to configure the IPs in a certain way?

jonah.s...@gmail.com

unread,
Jul 8, 2021, 5:02:13 PM7/8/21
to dv-users
Hi Zachary, 

That sounds like it would be an invalid IP. Currently, I am have a Mac running the DV-GUI and Ubuntu Server 20.04 on the Pi. Can you successfully ping the Pi from the command line (ping <Pi IP address>) ? If not, you have not established connectivity with it. 

In my setup, I am doing a point to point connection via Ethernet and configuring both IP manually. My ethernet on my laptop self-assigns an IP. I then configured the IP address claimed by the Pi on the ethernet device using the netplan interface (https://vitux.com/how-to-configure-networking-with-netplan-on-ubuntu/) and set the IP to be one above my laptop's. I then followed the headless instructions verbatim and was able to interface with the remote devices (i have two DAVIS346 connected to the Pi). 

Hope this helps!

Jonah

Zachry T

unread,
Jul 8, 2021, 5:16:34 PM7/8/21
to dv-users
Thanks for the follow up. Looks like I didn't have TCP enabled.
Reply all
Reply to author
Forward
0 new messages