ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Real-time data transmission of zed camera using gscam

asked 2020-05-04 07:29:19 -0500

jah05 gravatar image

I am trying to use gscam. So I tried running the gscam examples. It was successful.

export GSCAM_CONFIG="v4l2src device=/dev/video0 ! videotestsrc ! video/x-raw-rgb, framerate=25/1, width=640, height=360 ! videoconvert"

rosrun gscam gscam

[ INFO] [1588592926.560630877]: using default calibration URL
[ INFO] [1588592926.560654005]: camera calibration URL: file:///home/arc/.ros/camera_info/camera.yaml
[ INFO] [1588592926.560683702]: Unable to open camera calibration file [/home/arc/.ros/camera_info/camera.yaml]
[ WARN] [1588592926.560695586]: Camera calibration file /home/arc/.ros/camera_info/camera.yaml not found.
[ INFO] [1588592926.560703821]: Loaded camera calibration from 
(gscam:19469): GStreamer-WARNING **: 0.10-style raw video caps are being created. Should be video/x-raw,format=(string).. now.
[ INFO] [1588592926.571268497]: Time offset: 1588573268.746
[ INFO] [1588592926.719011864]: Publishing stream...
[ INFO] [1588592926.719099043]: Started stream.

But i want to send zed real time video data to rtp using gscam. I tried converting the gstreamer code to gscam below but got an error. What should I do? Nice and smart guys, please help me! please!

gst-launch-1.0 -v v4l2src device=/dev/video0 ! video/x-raw, width=640, height=480 ! videoconvert ! x264enc ! rtph264pay ! udpsink host=127.0.0.1 port=5000

export GSCAM_CONFIG="v4l2src device=/dev/video0 ! video/x-raw, width=640, heigth=480 ! videoconvert ! x264enc ! rtph264pay ! udpsink host=127.0.0.1 port=5000"

rosrun gscam gscam

[ INFO] [1588594149.358786280]: Using gstreamer config from env: "v4l2src device=/dev/video0 ! video/x-raw, width=640, heigth=480 ! videoconvert ! x264enc ! rtph264pay ! udpsink host=127.0.0.1 port=5000"
[ INFO] [1588594149.360962939]: using default calibration URL
[ INFO] [1588594149.360990656]: camera calibration URL: file:///home/arc/.ros/camera_info/camera.yaml
[ INFO] [1588594149.361024030]: Unable to open camera calibration file [/home/arc/.ros/camera_info/camera.yaml]
[ WARN] [1588594149.361037377]: Camera calibration file /home/arc/.ros/camera_info/camera.yaml not found.
[ INFO] [1588594149.361047702]: Loaded camera calibration from 
**
ERROR:/home/arc/catkin_ws/src/gscam/src/gscam.cpp:167:bool gscam::GSCam::init_stream(): assertion failed: (outpad)
Aborted (core dumped)
edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2020-07-27 09:13:22 -0500

prefpkg21 gravatar image

The resolution you set isn’t supported by the ZED. You can use the v4l-utils package to see which formats the driver supports. Generally it outputs double the width of traditional formats because it stitches the left and right cameras together. So 2160x720 verses 1080x720

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2020-05-04 07:24:41 -0500

Seen: 407 times

Last updated: Jul 27 '20