libuvc_ros icon indicating copy to clipboard operation
libuvc_ros copied to clipboard

No time stamp

Open robotsoft opened this issue 7 years ago • 3 comments

There is no time stamp in /image_raw/header when I run rosrun libuvc_camera camera_node. I'm using Orbbec Astra Pro camera in Ubuntu16.04 and ROS Kinectic.

Here is one of example of /image_raw/header.

seq: 35 stamp: secs: 0 nsecs: 0 frame_id: camera

robotsoft avatar Oct 06 '17 18:10 robotsoft

the timestamp is simply copied from uvc_driver (https://github.com/ros-drivers/libuvc_ros/blob/master/libuvc_camera/src/camera_driver.cpp#L165 ) , and if that is zero, then it libuvc driver failed to grab capture time, may be better to ask at https://github.com/ktossell/libuvc

k-okada avatar Oct 07 '17 09:10 k-okada

same issue here, I replaced the timestamp initialization by ros::Time::now() as it was breaking my application. See here: https://github.com/doisyg/libuvc_ros/blob/14f8929498531bf3820d1d107bae52737ee27934/libuvc_camera/src/camera_driver.cpp#L165 I will be interested to follow a proper fix from libuvc

doisyg avatar Nov 10 '17 13:11 doisyg

@doisyg, sorry for late replay, I found that libuvc never set timestamp(https://github.com/ktossell/libuvc/blob/master/src/stream.c#L1100) so I think it is libuvc_ros work to set timestamp

I have created the pull request here -> https://github.com/ros-drivers/libuvc_ros/pull/46

k-okada avatar Apr 09 '18 17:04 k-okada