Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Same gstreamer pipeline working in ROS Noetic does not work in ROS 2 Humble: Could not get gstreamer sample #96

Open
KnechtNoobrecht opened this issue Feb 12, 2024 · 0 comments

Comments

@KnechtNoobrecht
Copy link

I am trying to get gscam working on ROS2 Humble. I am using a Jetson Nano Developer Kit.
I got it working on ROS1 Noetic on the same device with the same gstreamer pipeline, however in ROS2 Humble and gscam2 i get the following error: [ERROR] [1707708248.525200179] [gscam_publisher]: Could not get gstreamer sample.
My procedure is:

  1. source /opt/ros/humble/setup.bash
  2. export GSCAM_CONFIG="nvarguscamerasrc sensor-id=0 ! video/x-raw(memory:NVMM),width=3264, height=2464,format=(string)NV12,framerate=21/1 ! nvvidconv flip-method=0 ! video/x-raw, format=(string)BGRx ! videoconvert ! video/x-raw, format=(string)BGR"
  3. ros2 run gscam gscam_node

Full Log:

[INFO] [1707707982.817263335] [gscam_publisher]: Using gstreamer config from env: "nvarguscamerasrc sensor-id=0 ! video/x-raw(memory:NVMM),width=3264, height=2464,format=(string)NV12,framerate=21/1 ! nvvidconv flip-method=0 !  video/x-raw, format=(string)BGRx ! videoconvert ! video/x-raw, format=(string)BGR"
[INFO] [1707707982.817826362] [gscam_publisher]: using default calibration URL
[INFO] [1707707982.817882352] [gscam_publisher]: camera calibration URL: file:///home/aresuser/.ros/camera_info/camera.yaml
[ERROR] [1707707982.818019854] [camera_calibration_parsers]: Unable to open camera calibration file [/home/aresuser/.ros/camera_info/camera.yaml]
[WARN] [1707707982.818056886] [gscam_publisher]: Camera calibration file /home/aresuser/.ros/camera_info/camera.yaml not found
[INFO] [1707707982.818112563] [gscam_publisher]: Loaded camera calibration from 
[WARN] [1707707982.818196939] [gscam_publisher]: No camera frame_id set, using frame "camera_frame".
[INFO] [1707707983.201164994] [gscam_publisher]: Time offset: 1707707567.276752
[INFO] [1707707983.223313561] [gscam_publisher]: Publishing stream...
[INFO] [1707707983.223688460] [gscam_publisher]: Started stream.
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected...
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 3264 x 2464 FR = 21.000000 fps Duration = 47619048 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 3264 x 1848 FR = 28.000001 fps Duration = 35714284 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1920 x 1080 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1640 x 1232 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1280 x 720 FR = 59.999999 fps Duration = 16666667 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1280 x 720 FR = 120.000005 fps Duration = 8333333 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: Running with following settings:
   Camera index = 0 
   Camera mode  = 0 
   Output Stream W = 3264 H = 2464 
   seconds to Run    = 0 
   Frame Rate = 21.000000 
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
CONSUMER: Done Success

[ERROR] [1707708065.645519328] [gscam_publisher]: Could not get gstreamer sample.
[INFO] [1707708065.699136877] [gscam_publisher]: Stopping gstreamer pipeline...
GST_ARGUS: Cleaning up


(Argus) Error Timeout:  (propagating from src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 137)
(Argus) Error Timeout:  (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 91)
(Argus) Error Timeout:  (propagating from src/rpc/socket/client/ClientSocketManager.cpp, function send(), line 137)
(Argus) Error Timeout:  (propagating from src/rpc/socket/client/SocketClientDispatch.cpp, function dispatch(), line 91)
GST_ARGUS: Done Success
[INFO] [1707708136.177702361] [gscam_publisher]: GStreamer stream stopped!
[INFO] [1707708136.177866380] [gscam_publisher]: Cleaning up stream and exiting...

Like i mentioned, the same procedure works on the same device with ROS1 Noetic.
The reason why i want to use ROS2 is because i originally wanted to use isaac_ros_argus_camera for hardware acceleration but this does not work either, but because of another reason.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant