GSCAM and ROS

Hello,
I want to use the e-CAM30_HEXCUTX2 - Six Synchronized Full HD Cameras for NVIDIA® Jetson TX1/TX2 from e-consystems with the TX2, ROS and GSCAM.

If i start the rosnode GSCAM i will get the following Error:

rosrun gscam gscam
[ INFO] [1516388101.658974923]: Using gstreamer config from env: “v4l2src device=/dev/video0 ! “video/x-raw, format=(string)UYVY, width=(int)1024, height=(int)768” ! nvvidconv ! “video/x-raw(memory:NVMM), format=(string)I420, width=(int)2304, height=(int)1296” ! nvoverlaysink overlay-w=1920 overlay-h=1080 sync=false”
[ INFO] [1516388101.666329832]: using default calibration URL
[ INFO] [1516388101.666433798]: camera calibration URL: file:///home/nvidia/.ros/camera_info/camera.yaml
[ INFO] [1516388101.666564418]: Unable to open camera calibration file [/home/nvidia/.ros/camera_info/camera.yaml]
[ WARN] [1516388101.666620161]: Camera calibration file /home/nvidia/.ros/camera_info/camera.yaml not found.
[ INFO] [1516388101.666668896]: Loaded camera calibration from

(gscam:4694): GStreamer-CRITICAL **: gst_element_make_from_uri: assertion ‘gst_uri_is_valid (uri)’ failed

(gscam:4694): GStreamer-CRITICAL **: gst_element_make_from_uri: assertion ‘gst_uri_is_valid (uri)’ failed
[FATAL] [1516388101.716796853]: GStreamer: cannot link launchpipe → sink
[FATAL] [1516388101.716973872]: Failed to initialize gscam stream!

If I run the same configuration via gst_launcher it will work:

gst-launch-1.0 v4l2src device=/dev/video0 ! “video/x-raw, format=(string)UYVY, width=(int)2304, height=(int)1296” ! nvvidconv ! “video/x-raw(memory:NVMM), format=(string)I420, width=(int)2304, height=(int)1296” ! nvoverlaysink overlay-w=1920 overlay-h=1080 sync=false

Any suggestion how can I solve this issue?

hello hartl_d,

i have no experience to use camera with GSCAM.
there should be GSCAM commands issues since you’re able to access camera with gst-launch-1.0.

looks like your application is loading calibration files from URL and it got failed.
please review your code to disable that for another trying.
thanks

[ INFO] [1516388101.666329832]: using default calibration URL
[ INFO] [1516388101.666433798]: camera calibration URL: file:///home/nvidia/.ros/camera_info/camera.yaml
[ INFO] [1516388101.666564418]: Unable to open camera calibration file [/home/nvidia/.ros/camera_info/camera.yaml]
[ WARN] [1516388101.666620161]: Camera calibration file /home/nvidia/.ros/camera_info/camera.yaml not found.

(gscam:4694): GStreamer-CRITICAL **: gst_element_make_from_uri: assertion 'gst_uri_is_valid (uri)' failed

(gscam:4694): GStreamer-CRITICAL **: gst_element_make_from_uri: assertion 'gst_uri_is_valid (uri)' failed

Hi hart,

This is just a warning message and not fatal. Hence it can be ignored.

This is the actual problem here.

Notice the width and height configured in this pipeline. This is a correct gstreamer pipeline and hence it works:

Thanks to your log messages, we notice that the gstreamer environment is not properly configured. You are trying to stream 1024x768 from the camera which is not supported.

Try to set the gstreamer environment correctly so that an actually supported resolution is configured. i.e 2304x1296. That will solve your errors.

Hello,I’ve tried with the new environment, but I also get the error message:

rosrun gscam gscam
[ INFO] [1516909670.145412962]: Using gstreamer config from env: “v4l2src device=/dev/video0 ! “video/x-raw, format=(string)UYVY, width=(int)2304, height=(int)1296” ! nvvidconv ! “video/x-raw(memory:NVMM), format=(string)I420, width=(int)2304, height=(int)1296” ! nvoverlaysink overlay-w=1920 overlay-h=1080 sync=false”
[ INFO] [1516909670.156850516]: using default calibration URL
[ INFO] [1516909670.156964306]: camera calibration URL: file:///home/nvidia/.ros/camera_info/camera.yaml
[ INFO] [1516909670.157109648]: Unable to open camera calibration file [/home/nvidia/.ros/camera_info/camera.yaml]
[ WARN] [1516909670.157226894]: Camera calibration file /home/nvidia/.ros/camera_info/camera.yaml not found.
[ INFO] [1516909670.157280653]: Loaded camera calibration from
[ WARN] [1516909670.158772210]: No camera frame_id set, using frame “/camera_frame”.

(gscam:2142): GStreamer-CRITICAL **: gst_element_make_from_uri: assertion ‘gst_uri_is_valid (uri)’ failed

(gscam:2142): GStreamer-CRITICAL **: gst_element_make_from_uri: assertion ‘gst_uri_is_valid (uri)’ failed
[FATAL] [1516909670.225839647]: GStreamer: cannot link launchpipe → sink
[FATAL] [1516909670.226036827]: Failed to initialize gscam stream!

Hello, hartl_d.

i have same error and i have tried with correct gstreamer pipeline in ‘gst-launch 1.0 --pipeline’.
but, in gscam environment, i get error message.

have you find any solution?

Hi hart,

There is another mistake in your gstreamer environment. You are not supposed to mention the sink plugin in your exported environment. i.e nvoverlaysink.

Also, the end of the exported gstreamer pipe should be able to output RGB data. This is a requirement for gscam to work successfully. Please try to take care of that as well. I do not have a working pipeline with me right now to provide you.

Thanks for the answer, but what is an valid sink plugin?

Any idea or a good tutorial?

Hi!
Your gstreamer pipeline is already containing sink element at the end of pipes:

nvoverlaysink overlay-w=1920 overlay-h=1080 sync=false

GSCAM is also sink element (appsink), so you have to remove nvoverlaysink.

Also gscam accepts only video/x-raw,format=RGB or image/jpeg, so you need to rewrite pipeline.

Try running gscam with following config:

v4l2src device=/dev/video0 ! "video/x-raw, format=(string)UYVY, width=(int)1024, height=(int)768" ! videoconvert ! "video/x-raw,format=(string)RGB"

Hello, I too am trying to configure the e-CAM30_HEXCUTX2 - Six Synchronized Full HD Cameras for NVIDIA® Jetson TX1/TX2 from e-consystems with the TX2, ROS and GSCAM. Has this error been solved?

hello mitch_galea_11,

since you’re using camera boards from e-con Systems.
please also contact with Jetson Preferred Partners for solutions.
thanks