Duo3D Stereo Camera (MLX) on JTX1

Here are Duo3D’s install instructions for their ARM package, which works with the JTK1: https://duo3d.com/docs/articles/install-arm

When running their ./RunMe.sh script, I kept seeing the error

“gcc: error: unrecognized command line option ‘-mgeneral-regs-only’”

which would prevent me from compiling the kernel (using command “make -j4”) that I downloaded using the URL http://developer.download.nvidia.com/embedded/L4T/r23_Release_v2.0/source/kernel_src.tbz2

I then followed dusty_nv’s suggestion in this thread (https://devtalk.nvidia.com/default/topic/897280/jetson-tx1/jetson-tx1-with-l4t-23-1-doesn-t-support-native-aarch64-binaries-/post/4732697/#4732697) to install the arm64 version of gcc-4.8, but then when I try “make -j4”, I get the error

“/bin/sh: 1: gcc: not found”

Does anyone know how I can compile this kernel from the command line?

Thanks!

Stereolabs Zed works:
https://www.stereolabs.com/

StereoLab works as well:

But it’d be nice to have the Duo for stereo vision also.

See:
https://devtalk.nvidia.com/default/topic/906942

Cross-compile is the easiest thing to do (there is an upcoming purely 64-bit release of L4T in the near future, at which time native compile will probably become the easiest method for kernel build).

Hello pkshah,

As i mentioned in a previous post (not sure if you saw this) I also have the Jetson TX1, Duo MLX, R200, ZED and Kinect v2. Anyway, so far my experiences with the Duo MLX (spoiler, no output on jetson, but I think I am close, apart from having maybe BRICKED my jetson…):

Simply running the ./RunMe script no longer works. Maybe I’ll update it once I get a complete workflow, but for starters the ovbious:

As you mentioned; Getting kernel sources has changed version… not r21. http://developer.download.nvidia.com/embedded/L4T/r23_Release_v2.0/source/kernel_src.tbz2

As you mentioned:
Gcc fails to build kernel:

gcc: error: unrecognized command line option ‘-mgeneral-regs-only’

This comes from gcc only supporting 32bit, but the kernel needs to be compiled in 64bit: as Linuxdev mentioned: 906942

Options: cross compile or add gcc 64b, try cross compile:

Need both a 64b and 32b compiler… Follow instructions here

Need to add a flag to make file (source):

  1. KBUILD_CFLAGS_KERNEL := -fomit-frame-pointer

Need to edit L328 of nvmap_init.c:

drivers/video/tegra/nvmap/nvmap_init.c:328:6: error: ‘err’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
-- int err;
++ int err = -1;

This compiled (kernel and driver). However the Duo still refused to be recognized on the Duo software on jetson. lsusb shows it, but no ID. However this was an attempt WITHOUT modifying the xhci-mem.c file. Now that I wanted to try that… my jetson (unrelated) is maybe bricked. I was however able to load their kernel module.

Hope this helps

pkshah:

I have tested this, loaded the kernel module and can sadly state that it does NOT work… I have emailed CL asking for support on the matter.

We have just completed the support for DUO MLX on Jetson TX1. The official release with detailed instructions will be posted in the next few days.

For complete instructions on now to make DUO MLX work on Jetson TX1 please go to: https://duo3d.com/docs/articles/install-arm#NVIDIAJetsonTX1

Hello,

Can confirm that this works. It looks as if I was very close to having it working… damn! The only thing I changed to allow functionality was instead of commenting out the part about 512, changing it to 1024 made the difference!

Also can confirm that cross-compiling the duo.ko module works just as well. Just compile it under the same environment as your kernel and modify the make file with:

export CROSS_COMPILE:=/opt/linaro/gcc-linaro-5.3-2016.02-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-
export ARCH:=arm64
KERNELDIR ?= /home/linux/TX1/Linux_for_Tegra_tx1/sources/kernel_source

Works a charm… now the next issue: Dense3D seems to be a 100% CPU application. Will probably have to turn to openCV to employ the GPU…?

Output of sudo ./tegrastats

RAM 1002/3854MB (lfb 512x4MB) SWAP 0/0MB (cached 0MB) <b>cpu [93%,95%,95%,92%]@1734</b> EMC 9%@1600 AVP 0%@408 VDE 0 <b>GR3D 6%@998</b> EDP limit 1734

PS: I am an absolute ROS novice, but I will be attempting to write a wrapper similar to that, that exists for the ZED (LINKS)

UPDATE: found this existing package first… https://github.com/l0g1x/DUO-Camera-ROS
UPDATE 2: Tried the above. Was lacking for my liking. Created REMOVED, View below I’d appreciate if others with a duo got in touch and / or contributed to make this better.

From using the Duo I have found: Depending on what FOV your lenses have you may have some issues. The default calibration app doesn’t support fisheye calibration. They are working to release an updated version. In the mean time you can use openCV (http://docs.opencv.org/master/db/d58/group__calib3d__fisheye.html#gsc.tab=0 ) to perform the calibration and save the yaml files.

Take a look at my wrapper I am developing: https://github.com/nznobody/duo_wrapper

This is a work in progress and will probably be updated very often at the moment. Note that it does include the duo dlls/libs but as of NOW they are the beta version 1.0.60.10 (with fisheye), EXCEPT for the arm ones, which are still 1.0.50.26. You should ensure you place what ever library version you want to use in the appropriate folders.

I will hopefully by the end of today enable a ROS node layer too (updated from my previous one). Please feel free to contribute / comment.

Hi @RNZNobody,

I am in a similar situation and wrote my own standalone camera frame grabber for the Duo3D. I was wondering if you are also having issue with the USB buffering creating artifact lines in the images. I have been in contact with DUO3D support (alex) about this and they directed me towards an updated version of their driver/SDK/Firmware but this didn’t really fix the issue… Now I haven’t heard from them in a few days and I can’t seem to get through on the phone either…

Does anyone have a fix for this?

Thanks!

Marc

Hi @MarcGy,

Yes I have the same issues. However they are not excessive VIDEO. How bad are yours?

Also as mentioned I would greatly appreciate collaboration on the interface module. You will find that it should be easy to work with and works on Windows and Jetson. For example I have options to use the built in duo calibration with openCV’s rectification running on the GPU. On the TX1 this has a significant performance boost. To quantify, with max freq on CPU and GPU, this goes from 25% of all CPU cores and 5% of GPU when getting pre-rectified images form DUOLib to only 11% of all cores and 9% of GPU when getting rectified and performing this on the GPU.
There is also basic ROS support that is functional. Including IMU (work in progress).

I’d be interested to hear from you on that!

Regards,

We have released the official duo driver for ROS. Please visit http://wiki.ros.org/duo3d-driver for more information. The fisheye calibration model is now fully supported by the latest v1.0.80.20 version of DUO SDK.