Is there an easiest way to record VOXL CAM data on another device?
-
Hello, I'm new here with the VOXL CAM. I'm trying to figure out a way to record the VOXL CAM data on a Raspberry Pi 4 Rev B (Raspbian 11). Recording data to the VOXL CAM's 32 GB limited SD won't be enough for some long duration data collects we need to do.
At first, I was hoping that I could run the ROS1 Indigo nodes that came with the VOXL CAM and record the necessary topics on the Pi, but turns out installing any ROS (let alone the old ROS1 Indigo) on the Pi is proving difficult. I've used ROS2 for a long time, but never on anything but Ubuntu 20.04 and 22.04. I have much less experience with ROS1 and even less experience using a Raspberry Pi.
Do you have any experience recording VOXL CAM data outside the VOXL CAM? It doesn't need to be ROS topics, any format of data usable outside the VOXL CAM would work. I am first interested in solutions possible for a Raspberry Pi 4, but would also like to hear any other ideas for recording VOXL CAM data outside the VOXL CAM.
Thank you!
-
@KMillzOG , I don't have a specific answer because it depends on the specific use case
I think that first you need to make a list of all the data that you need to collect and in what format. This will tell you the required storage throughput (MB/s).
I do not recommend using ROS for storing large data sets with raw images because there can be a lot of overhead with message packaging / passing. The exact approach to storage of the data will depend on how much data you need to store (per second).
You have easy options like the built-in EMMC storage, the external SD card (which could be larger than 32GB. This spec says up to 2TB is supported, although i personally have not tested such large SD cards : https://docs.modalai.com/voxl-datasheets-functional-description/#storage
If you wanted faster and larger storage (SSD), your best bet is USB3 to SSD adapter, see some details here about USB3 cable : https://docs.modalai.com/voxl-as-usb-host/
Hopefully this helps! please let us know if you have additional questions.
Alex
-
@Alex-Kushleyev, thank you, I think the on-board recording capabilities will be sufficient if 2TB SD and external drives are supported.
-
@KMillzOG you can look into
voxl-logger
, which is part of our MPA framework. The logger will subscribe to the desired messages and store them in a format which can be later played back and converted to ROS if you wanted. By far the largest data that you will store will be images (as opposed to IMU data), and voxl-logger can write the images in YUV format which is more efficient than RGB (while still not changing image due to compression). YUV format is the output of the ISP pipeline and if you are working with ROS, and using RGB images, those RGB are generated from YUV. RGB takes up 2x amount of space compared to YUV.https://docs.modalai.com/voxl-logger/
https://gitlab.com/voxl-public/voxl-sdk/utilities/voxl-loggerOnce you become familiar with
voxl-logger
, you can do some tests to see how much data per second is being generated and whether the target medium (built-in EMMC, or SD card or external SSD) can sustain that bandwidth. If not, you can always adjust your scenario either by reducing frame rate of cameras or resolution. -
@Alex-Kushleyev, thank you for the additional details. My colleague mentioned he had tried a larger SD card in the VOXLCAM slot without luck. I don't think it was successfully mounted and made useable automatically like he expected. Is there some sort of formatting that needs to be performed on the SD card to prepare it for Linux on the VOXLCAM?
-
Yes you should format the SD card with
ext4
file system for best performance. You can do it either on VOXL using standard command line tools or it may be easier for you to do it on a Linux Desktop using a disk manager with a GUI.I just did a quick test and inserted a SD card into VOXL1 with Raspberry Pi OS installed on the SD card. Here is output of
dmesg
. It has mounted automatically :[ 24.125295] SELinux: initialized (dev mmcblk0p1, type vfat), uses genfs_contexts [ 24.127560] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null) [ 24.127611] SELinux: initialized (dev mmcblk0p2, type ext4), uses xattr
and
# ls /mnt/sdcard/ bin etc initrd.img.old media proc sbin tmp vmlinuz boot home lib mnt root srv usr vmlinuz.old dev initrd.img lost+found opt run sys var
also
/ # df Filesystem 1K-blocks Used Available Use% Mounted on /dev/root 2837860 1927412 894064 69% / ... ... /dev/mmcblk0p2 60253244 5259876 51913512 10% /mnt/sdcard
(this is the contents of the ext4 partition, the card is 64GB)
Please keep in mind that not all SD cards are the same, if you want good performance, please consider selecting a high quality SD card. You should do your own research, but there are many sites comparing SD card performance, like this one : https://www.cameramemoryspeed.com/reviews/micro-sd-cards/
Based on my research, Lexar SD cards are one of the best brands. For data logging you want to have the fastest sustained write speed and also I/O speed because there could be many logging operations happening per second.
-
Hey @KMillzOG ,
This doesn't help with your core issue, but I have had success running the ROS2 docker images on RaspiOS on a pi: https://docs.ros.org/en/foxy/How-To-Guides/Installing-on-Raspberry-Pi.html If you're comfortable running your software inside a Docker container, that'll solve your problem. Conveniently, you can also build a docker file for ARM or for X86, so you can run the same software on a more traditional PC or inside a CI pipeline.
I also recently noticed that there is still an officially supported Ubuntu image for the Pi. I haven't tried it, but it might be another option. If you have a spare SD card, you could install ubuntu on the spare card, then see if that works for you. Then if it doesn't work you can just go back to the old SD card.