Open peter-moran opened 7 years ago
Encountered the same problem, there is no solution?
Unfortunately I haven't looked into it since it does not impact performance.
Last I looked, it seemed like it might be a problem with the formatting of the pipeline string or a brief problem at initialization.
I tried the jetson_csi_cam with the new xavier and e-consystems cuxvr130, but I also get the same error as mentioned above, and no rostopic is published. When running the gst-launch example:
$ gst-launch-1.0 v4l2src device=/dev/video
supplied from e-consystems, I can successfully view each of the 4 camera streams at /dev/video(0-3). Is there something I have missed in regards to setting up either the cscam parameters or jetson_csi_cam parameters that prevents it to work?
when running: $ roslaunch jetson_csi_cam jetson_csi_cam.launch I get: (gscam:20008): GStreamer-CRITICAL **: 10:42:12.564: gst_element_make_from_uri: assertion 'gst_uri_is_valid (uri)' failed
Any help would be much appreciated.
I am running into this issue on a TX1 and from the logs it seems to be puking on a default calibration file.
[ INFO] [1556845282.545341291]: camera calibration URL: file:///root/.ros/camera_info/csi_cam_0.yaml
[ INFO] [1556845282.545543318]: Unable to open camera calibration file [/root/.ros/camera_info/csi_cam_0.yaml]
[ WARN] [1556845282.545596182]: Camera calibration file /root/.ros/camera_info/csi_cam_0.yaml not
found.
I don't know where to find a default yaml file because I am trying to calibrate the camera right now :D
I faced the same problem on Jetson Nano with ROS Melodic and after getting this error, there were no other output in terminal and no topics were published!
Did anyone solve the problem?
I also got this error and didn't see any image topic. I solved it by replacing the definition of GSCAM_CONFIG
in jetson_csi_cam.launch
with the following lines:
<env name="GSCAM_CONFIG" value="nvarguscamerasrc sensor-id=$(arg sensor_id) ! video/x-raw(memory:NVMM),
width=(int)$(arg width), height=(int)$(arg height), format=(string)I420, framerate=(fraction)$(arg fps)/1 !
nvvidconv flip-method=2 ! video/x-raw, format=(string)BGRx ! videoconvert" />
It's basically nvarguscamerasrc
instead of nvcamerasrc
and removing the trailing video/x-raw, format=(string)BGR
.
Well, I cant really remember wether I found the reason for the error message or not. However I got a setup working in the end using some other gstreamer commands. I used jetson xavier, and 4 4k e-consystem cameras.
ons. 11. sep. 2019, 16:40 skrev Falko Schindler notifications@github.com:
I also got this error and didn't see any image topic. I solved it by replacing the definition of GSCAM_CONFIG in jetson_csi_cam.launch with the following lines:
It's basically nvarguscamerasrc instead of nvcamerasrc and removing the trailing video/x-raw, format=(string)BGR.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/peter-moran/jetson_csi_cam/issues/1?email_source=notifications&email_token=AK4MV57NCGWGZNJ5FXVIIBDQJD7NJA5CNFSM4DYCCBFKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6OXCVQ#issuecomment-530411862, or mute the thread https://github.com/notifications/unsubscribe-auth/AK4MV55HOWFPFSYIO5HTUJDQJD7NJANCNFSM4DYCCBFA .
I had success with the Jetson Nano and the Raspi Cam V2 using the following:
<env name="GSCAM_CONFIG" value="nvarguscamerasrc sensor-id=$(arg sensor_id) ! video/x-raw(memory:NVMM), width=(int)$(arg width), height=(int)$(arg height), format=(string)NV12, framerate=(fraction)$(arg fps)/1 ! nvvidconv flip-method=2 ! video/x-raw, format=(string)BGRx ! videoconvert" />
Well, I cant really remember wether I found the reason for the error message or not. However I got a setup working in the end using some other gstreamer commands. I used jetson xavier, and 4 4k e-consystem cameras. ons. 11. sep. 2019, 16:40 skrev Falko Schindler notifications@github.com: … I also got this error and didn't see any image topic. I solved it by replacing the definition of GSCAM_CONFIG in jetson_csi_cam.launch with the following lines:
It's basically nvarguscamerasrc instead of nvcamerasrc and removing the trailing video/x-raw, format=(string)BGR. — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#1?email_source=notifications&email_token=AK4MV57NCGWGZNJ5FXVIIBDQJD7NJA5CNFSM4DYCCBFKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6OXCVQ#issuecomment-530411862>, or mute the thread https://github.com/notifications/unsubscribe-auth/AK4MV55HOWFPFSYIO5HTUJDQJD7NJANCNFSM4DYCCBFA . Can you please tell me what gstreamer commands you followed becuase even i have the same hardware setup and the same error?
You can Just make a standard yaml file for your camera. The yaml file is essentially Just telling how the video stream is being scaled.
fre. 3. mai 2019, 03:16 skrev Seth King notifications@github.com:
I am running into this issue on a TX1 and from the logs it seems to be puking on a default calibration file.
[ INFO] [1556845282.545341291]: camera calibration URL: file:///root/.ros/camera_info/csi_cam_0.yaml [ INFO] [1556845282.545543318]: Unable to open camera calibration file [/root/.ros/camera_info/csi_cam_0.yaml] [ WARN] [1556845282.545596182]: Camera calibration file /root/.ros/camera_info/csi_cam_0.yaml not found.
I don't know where to find a default yaml file because I am trying to calibrate the camera right now :D
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/peter-moran/jetson_csi_cam/issues/1#issuecomment-488885682, or mute the thread https://github.com/notifications/unsubscribe-auth/AK4MV56YOKVHXUJGN5MHBTDPTOHANANCNFSM4DYCCBFA .
You can Just make a standard yaml file for your camera. The yaml file is essentially Just telling how the video stream is being scaled. fre. 3. mai 2019, 03:16 skrev Seth King notifications@github.com: … I am running into this issue on a TX1 and from the logs it seems to be puking on a default calibration file. [ INFO] [1556845282.545341291]: camera calibration URL: file:///root/.ros/camera_info/csi_cam_0.yaml [ INFO] [1556845282.545543318]: Unable to open camera calibration file [/root/.ros/camera_info/csi_cam_0.yaml] [ WARN] [1556845282.545596182]: Camera calibration file /root/.ros/camera_info/csi_cam_0.yaml not found. I don't know where to find a default yaml file because I am trying to calibrate the camera right now :D — You are receiving this because you commented. Reply to this email directly, view it on GitHub <#1 (comment)>, or mute the thread https://github.com/notifications/unsubscribe-auth/AK4MV56YOKVHXUJGN5MHBTDPTOHANANCNFSM4DYCCBFA .
I am new to yaml language. it would be very helpul if you could just share your yaml file for camera
I will just leave a example from our project on how we got it working with the e-consystems cameras.
This code is based on the code from Peter Moran, and edited to work with our system.
<launch/>
<!-- Launchfile to publish 4 (In this case just 1) camera feeds to ros topics -->
<!-- Camera driver setup-->
<node name="camerasetup" pkg="Nameofproject" type="camsetup.sh" />
<!-- Run GStreamer 1.0-->
<arg name="GST10" default="true"/>
<arg name="width" default="(int)3840" /> <!-- Image Width -->
<arg name="height" default="(int)2160" /> <!-- Image Height -->
<!-- Arguments for camera north -->
<arg name="Camera_North" default="/dev/video2"/>
<!-- The GStreamer framerate needs to be an integral fraction -->
<arg name="FPS_North" default="30/1"/>
<arg name="PUBLISH_FRAME_North" default="true"/>
<node ns="cn" name="gscam_driver_v4l" pkg="gscam" type="gscam" output="screen">
<param name="camera_name" value="default"/>
<param name="camera_info_url" value="package://gscam/examples/calibrated_parameters_north.ini"/>
<param if="$(arg GST10)" name="gscam_config" value="v4l2src device=$(arg Camera_North) ! capsfilter caps="video/x-raw, width=$(arg width),height=$(arg height)" ! videoconvert"/>
<param name="frame_id" value="/v4l_frame"/>
<param name="sync_sink" value="true"/>
</node>
<node if="$(arg PUBLISH_FRAME_North)" name="v4l_transform" pkg="tf" type="static_transform_publisher" args="1 2 3 0 -3.141 0 /world /v4l_frame 10"/>
</launch>
As you see it asks for a camera calibration .ini file in which where the calibration parameters for the camera sits.
Just make a ini file in one editor and paste the following( obviously you need to change so it fits your camera with regards to resolution, and the other parameters in the camera matrix) Ask me if you need explaination for the camera matrix The distortion, rectification, and projection is were you put the calibration parameters after you run the calibration routine.
[image]
width 3840
height 2160
[default]
camera matrix 2244.457247 0.000000 1903.497244 0.000000 2244.457247 1039.243884 0.000000 0.000000 1.000000
distortion -0.246884 0.060722 -0.001016 -0.000845 0.000000
rectification 1.000000 0.000000 0.000000 0.000000 1.000000 0.000000 0.000000 0.000000 1.000000
projection 2244.457247 0.000000 1903.497244 0.000000 0.000000 2244.457247 1039.243884 0.000000 0.000000 0.000000 1.000000 0.000000
After you get the camera working, you can run a calibration routine and update the ini file to have a "calibrated" camera.
For those working on ros melodic TX2, the correct command for the launch file is
<env name="GSCAM_CONFIG" value="nvarguscamerasrc sensor-id=$(arg sensor_id) ! video/x-raw(memory:NVMM), width=(int)$(arg width), height=(int)$(arg height), format=(string)NV12, framerate=(fraction)$(arg fps)/1 ! nvvidconv flip-method=0 ! video/x-raw, format=(string)BGRx ! videoconvert"/>
@peter-moran hi , i have sovel this bug, because i use tx2 planform, so must use nvarguscamerasrc command. and change jetson_csi_cam.lanuch file , format = (string)NV12, like this
env name="GSCAM_CONFIG" value="nvarguscamerasrc sensor-id=$(arg sensor_id) ! video/x-raw(memory:NVMM), width=(int)$(arg width), height=(int)$(arg height), format=(string)NV12, framerate=(fraction)$(arg fps)/1 ! nvvidconv flip-method=0 ! video/x-raw, format=(string)BGRx ! videoconvert"
if you want add other functions you can read help file of gst-launch-1.0
I also got this error and didn't see any image topic. I solved it by replacing the definition of
GSCAM_CONFIG
injetson_csi_cam.launch
with the following lines:<env name="GSCAM_CONFIG" value="nvarguscamerasrc sensor-id=$(arg sensor_id) ! video/x-raw(memory:NVMM), width=(int)$(arg width), height=(int)$(arg height), format=(string)I420, framerate=(fraction)$(arg fps)/1 ! nvvidconv flip-method=2 ! video/x-raw, format=(string)BGRx ! videoconvert" />
It's basically
nvarguscamerasrc
instead ofnvcamerasrc
and removing the trailingvideo/x-raw, format=(string)BGR
.
This worked well! Thank you so much.
The
gscam
node reports a failure from GStreamer on startup for all launches. Specifically, if gives the following error.However, the lauch file remains fully functional and video still appears to work. It would be ideal to prevent this error even though everything seems functional.