Jetson beginner questions on UDP multicast and CAN bus

Hello,

I have never used Jetson platform and before buying one I have some questions.

I would like to use Jeston TX2 with 6 cameras, “join” the 6 video stream in only one 360° video stream and send it in UDP multicast.
I would also like to use the CAN bus to enable or disable the video stream for instance.

Is there a “easy way” to do this with a “configuration wizard” at instalation for example?

Or will I need to recompile the kernell for instance and/or develop my own software (maybe in C, or C++ or python with the use of an SDK from NVIDIA) to be able to do this?
If yes, are there any tutorials provided to do this ?

What are the licenses of the needed tools (drivers, SDK, etc…) ?

I can only give a partial answer. I’m sure others will comment.

Combining the cameras is “stitching” (I think of stitching as fitting the edges of cameras together for a larger canvas, and compositing as overlay of one image onto part of another image, e.g., camera-in-camera). This can be done, but I’m not sure the easiest way.

Six cameras will require planning for bandwidth. Are they USB? Ethernet? What resolution and format (e.g., 1920x1080p requires a lot less bandwidth than does QUHD)? What frame rate is required?

All of the tools for developing this sort of software are free on Linux. You can’t claim ownership of the tools, and if you modify someone else’s software, then you have to stick to the license terms. Building your own software to run on Linux is rarely ever a license issue even for commercial software…so long as it isn’t in kernel space (even if it is in kernel space this is mostly not a problem for code you make available for free without encumbering someone else’s code…and no, I am not an attorney). Any kind of advice would require knowing details, but if you are developing this just for yourself then you wouldn’t need to worry about any license or fees.

There are lots of code samples around for stitching. Someone may be able to offer examples.

I’m not sure what you can do with RTSP (real time streaming protocol) so far as network options, but there is already support to some extent for that just with the right command line. Someone may be able to offer examples for this as well.

For hardware, you may look at eCon. They might have software for making the 360 degrees view, and sending with RTSP or UDP may not be so complicated with gstreamer, you may find many examples searching this forum.

Thank you for your answer.

I’v already had a look on eCon solutions and I found commands for RTSP and UDP that should work with gstreamer.

For licenses , I prefer use GPL so apart the nvidia driver, I guess that the others tools are GPL.

I need 4K camera. I think I will choose CSI MIPI cameras.

Maybe instead of “stitching” (thank you linuxdev for the definition), I could use severals streams (one for each camera) if they are synchronous; and it seems that Jetson can provide synchronous streams.

But for CAN bus and GPIO command, I guess I’ll have to do some developpement, maybe in C langage, doesn’t it?

I consider C or C++ the easiest development language. C for kernel (mandatory), C++ in user space (other languages work), but that’s just my preference. GPIO can be accessed either directly in kernel space, or via “/sys” files. I haven’t developed CAN, but this should be no different on a Jetson in comparison to any desktop PC (assuming you have the drivers in place…the drivers do exist, but I’m not sure if they are there by default).

Yes, I have the same preference as you with C and C++.

The CAN can be used on Jetson if you recompile the kernel I noticed.

I just wonder if there is some functions already implemented to use the CAN and the GPIO like on a Raspberry PI with Python for instance (it’s really easy to set or read a GPIO in python on a Raspberry PI)…

on Jetson , I only found this for TX1:

Some newer kernels use libgpio (see the man page here: http://git.munts.com/libsimpleio/doc/libgpio.html), but the Jetson kernels predate this. I don’t know about RPi, but perhaps this is available on RPi. In other cases, since this hardware is designed to be power efficient, there might be a need to enable a power rail for a CAN bus. Sometimes there are features available only after adding the kernel module (and unlike a desktop PC it doesn’t come with every module made…for example, you wouldn’t care about a desktop PC video card driver since this architecture can’t use those drivers).

Hopefully someone else will have some getting started examples for GPIO and CAN.

Thanks I will have a look on the man page.

What I would like on the Jetson, it’s to know if there is a way to access easily to gpio like on a RPi.

“Easily” means different things to different people. If the RPi (and I have no experience with RPi) is using a newer kernel and libgpio, then the answer will be that the Jetson has other interfaces, but not libgpio. By far the easiest way to access is via “/sys” as a file, but this does have limitations. Even if “/sys” is not fast enough or has some limitation this is the usual place to start…making sure it works through “/sys”, and then migrating to other methods once basic function works (e.g., get the concept working, then add kernel and/or user space code to skip “/sys”).

For GPIOs, you may also check the links in this post.

Thanks I’ll have a look to this post…

What I mean by “easily” , is something like that for instance :

https://www.raspberrypi.org/documentation/usage/gpio/python/README.md

visibly, this :
https://github.com/vitiral/gpio
and this:
https://elinux.org/GPIO
are providing something that use sysfs in the “same way”.

I don’t know of any Python libraries, but I don’t use Python much. The first github URL mentions sysfs access…this is what the Jetson uses in current releases, and so this might work with a Jetson (though you would perhaps have to edit some sort of table of GPIO name to number conversion since pin numbering differs on different boards, but the sysfs mechanism will be the same).

The last URL for eLinux.org is tied to GPIOLIB, which I believe is only available in a newer kernel. So probably this would be difficult to use. On the other hand, the next JetPack release will probably be soon and will bring the base o/s up to Ubuntu 18.04. Along with this I’d expect a kernel version increment, and possibly GPIOLIB would become available.