Point Grey Camera + Xavier ?

I’ve got a few Point Grey Chameleon3 USB3.0 Cameras (https://www.ptgrey.com/chameleon3-usb3-vision-cameras) that I’m trying to get working on the Jetson boards. I can’t seem to get the device to even open and start streaming data to the Jetson. I’ve tried the following scenarios.

What I did:

  1. I can find my camera using lsusb and lsusb -t
  2. I downloaded and installed Spinnaker SDK from the PointGrey website:
    Version: Spinnaker 1.13.0.31 SDK - ARM64 - Ubuntu 16.04 (64-bit) — 12/04/2018 - 43.654MB
  3. I tested this on my Laptop (with the Intel variant) and my cameras work
  4. I can see my video stream using Spin View

What I tried and failed:

  1. Jetson TX2 Developer Kit + Powered USB3.0 Hub + Point Grey Chameleon 3 + Spin View
  2. Jetson TX2 Orbitty + Powered USB3.0 Hub + Point Grey Chameleon 3 + Spin View
  3. (1) and (2) without Powered USB3.0 Hub, straight into the USB3.0 port on the devkit/orbitty
  4. Jetson Xavier Developer Kit + Powered USB3.0 Hub + Point Grey Chameleon 3 + Spin View
  5. (4) without the Hub

Jetson Xavier:
I tried to not use Spin View and try compile one of the FlyCapture2 examples directly (following the instructions mentioned here: http://www.ptgrey.com/KB/10357)
But when I run FlyCapture2Test I get a segmentation fault. I tried a few more examples and they all result in a segmentation fault.

FlyCapture2 library version: 2.13.3.31
Application build date: Feb 18 2019 20:18:04

Number of cameras detected: 1

*** CAMERA INFORMATION ***
Serial number - 16369091
Camera model - Chameleon3 CM3-U3-31S4C
Camera vendor - Point Grey Research
Sensor - Sony IMX265 (1/1.8" Color CMOS)
Resolution - 2048x1536
Firmware version - 1.10.3.0
Firmware build time - Fri Nov 20 00:50:04 2015

Segmentation fault (core dumped)

Hi,
We only support USB cameras through UVC driver. If it requires additional drivers, you need to try it out or other users may share experiences.

I can see that folks used GigE pointgrey : NVIDIA Jetson TK1 + Point Grey USB3 / GigE Cameras - Overview - YouTube
Moreover, at the page https://www.ptgrey.com/tan/10699
they mention:
“This technical application note provides a summary and instructions for streaming FLIR machine vision cameras using FlyCapture2 on ARM-based embedded boards. It includes examples of some of the more commonly used embedded boards: ODROID-XU; Samsung Exynos 5250 Arndale; and NVIDIA Jetson TK1, TX1, TX2 and DRIVE PX.”

NVIDIA Jetson TX1 Getting Started
Follow NVIDIA’s Quick Start Guide file to install the 64-bit Linux 4 Tegra R24.1 package.
Note: This step overwrites your existing file system.
Install 64-bit FlyCapture2 ARM by downloading the latest FlyCapture2 64-bit ARM and follow the readme file for installation instructions.
Install the g++ compiler in order to install the FlyCapture2 SDK’s C++ samples
sudo apt-get update
sudo apt-get install build-essential

The steps above allow you to stream your USB3 camera at a maximum image size of 2 MB. To acquire images greater than 2 MB in resolution, add the following to the APPEND line:

usbcore.usbfs_memory_mb=1000

to this file:

/boot/extlinux/extlinux.conf

NVIDIA Jetson TX2 Getting Started
Follow NVIDIA’s Quick Start Guide file to install the 64-bit Linux 4 Tegra R24.1 package.
Note: This step overwrites your existing file system.
Install 64-bit FlyCapture2 ARM by downloading the latest FlyCapture2 64-bit ARM and follow the readme file for installation instructions.
The steps above allow you to stream your USB3 camera at a maximum image size of 2 MB. To acquire images greater than 2 MB in resolution, add the following to the APPEND line:

usbcore.usbfs_memory_mb=1000

to this file:

/boot/extlinux/extlinux.conf

NVIDIA DRIVE PX Getting Started
To obtain maximum bandwidth with DRIVE PX:

USB3 cameras require the latest version of a custom kernel from GitHub, as described below.
GigE cameras require a USB 3.1-to-Ethernet adapter connected directly to an on-board USB port.
For USB3 cameras:

Get the latest kernel from GitHub:

Clone source repo for mainline kernel

git clone https://github.com/torvalds/linux.git

Get list of tags to determine appropriate release (I settled on v4.7.0-rc7 for specific technical reasons).

git tag -l

Checkout specific tagged revision to local branch.

git checkout tags/<tag_name> -b <branch_name>

git checkout tags/v4.7-rc7 -b nv_custom_branch

To acquire images greater than 2 MB in resolution, modify the os_args parameter of the KERNEL_PRIMARY partition in:

vibrante-<platform|ver>-foundation/utils/scripts/bootburn/<cfg_file>

Add the following to os_args:

usbcore.usbfs_memory_mb=1000
After the kernel is built, flash the custom kernel onto the board. Because the process depends on the board and kernel version, consult the NVIDIA Vibrante Linux Development guide at /home/nvidia/PDK_Docs/ for specific instructions.
Note: You only want to re-flash the kernel, not the complete file system. To avoid flashing the complete file system, add the “-s” option (skip filesystem) to the bootburn.sh command:

“./utils/scripts/bootburn/bootburn.sh -b e2379b00a -s”

The sample in the documentation does not use the -s.

For GigE and USB3 cameras:
(Note: Connect the GigE camera to the PC with a USB-to-Ethernet adapter.)

Install the g++ compiler in order to install the FlyCapture2 SDK’s C++ samples:

sudo apt-get update
sudo apt-get install build-essential

Install 64-bit FlyCapture2 ARM by downloading the latest FlyCapture2 64-bit ARM and follow the README file for installation instructions.

you may try reaching them via https://www.ptgrey.com/support/contact-us and they will adjust the instruction, in my opinion

Thanks Andrey1984, I’ve temporarily abandoned this direction but I appreciate the help!

If you’re still interested, I was able to get a pretty consistent stream from the Chameleon3 on a powerered USB 3.0 hub through the ARM64 spinnaker build on the Jetson Xavier just by upping the memory size at
“/sys/module/usbcore/parameters/usbfs_memory_mb”
to 4096. Ridiculous, I know, but 1024 and 2048 both didn’t seem to be enough for spinview to register the Chameleon right away. Interestingly the Grasshopper3 connects at 1024 just fine.

Thanks romleiaj, I will check this out!

Sorry to bring this up again, but when you adjusted the usbfs_memory_mb parameter, were you able to do that permanently? I noticed the Xavier doesn’t have a /boot/extlinux/extlinux.conf file so I was wondering if you managed to make that change permanent?

No worries, I’ve done some more experimentation so I think my conclusion was wrong regardless. 1024 is enough for either camera, but the Chameleon required a direct connection, when it went through the USB hub it would flakily connect, hence the mistaken correlation in larger memory size.

To make that change permanent you have to flash the kernel from the host machine via command line, this thread shows the command: https://devtalk.nvidia.com/default/topic/1049581. (TL:DR, running

sudo ./flash.sh -k kernel -C "usbcore.usbfs_memory_mb=1024" -k kernel-dtb jetson-xavier mmcblk0p1

from the nvidia jetpack folder on the host machine, with the the Jetson Xavier in recovery mode and connected via USB, will change the memory bus size permanently.)

Got it working, thanks romleiaj!

Awesome! No problem.

Hey, have you come across any python library for using point grey cams with arm based systems? I couldn’t find one on the point grey or flir website.