Setting Global Time disable seems failed at D455
Hi, I tried to turn off Global Time option by setting zero to No.53 option, like this:
rs2_option option_type = static_cast<rs2_option>(53);
for (int i = 0; i < (int)sensors.size(); ++i) {
rs2::option_range range = sensors[i].get_option_range(option_type);
float current_value = get_sensor_option(sensors[i], option_type);
int result = set_sensor_option(sensors[i], option_type, 0.0);
std::this_thread::sleep_for(std::chrono::seconds(1));
float check_value = get_sensor_option(sensors[i], option_type);
if (check_value == 0.0) {
flag = true;
}
I did that after each pipeline for RGB/Depth and Gyro/Accel started. It certainly worked for RGB/Depth, but didn't for Gyro/Accel.
I've already checked the option value was zero for each sensor.
The condition difference between RGB/Depth and Gyro/Accel is the Gyro/Accel is running under callback function.
This is how I take timestamps for IMU.
set_callback_imu([&](const rs2::frame& frame) {
// Cast the frame that arrived to motion frame
auto motion = frame.as<rs2::motion_frame>();
// If casting succeeded and the arrived frame is from gyro stream
if (motion && motion.get_profile().stream_type() == RS2_STREAM_GYRO && motion.get_profile().format() == RS2_FORMAT_MOTION_XYZ32F)
{
// Get the timestamp of the current frame
double ts_gyro = motion.get_timestamp();
}
That code seems showing adjusted timestamp to host.
I'd like an helpful suggestion to cope with this issue.
Thanks.
-
Hi Tsubota Kazuhiro Global Time should be disabled for individual sensors, as advised at the link below.
https://github.com/IntelRealSense/librealsense/issues/6195#issuecomment-610199258
Here is an example of C++ code for disabling global time on the motion sensor:
https://github.com/IntelRealSense/librealsense/issues/6424#issuecomment-631589256
-
Hi MartyG.Yes, I set all 3 sensors(0:Stereo,1:RGB,3:IMU) to be disable GlobalTime option as I posted on top of this post.
But only IMU continue to show Global time.
I'm afraid IMU runing on pipeline's callback function might be relating to this issue.
I'd like your suggestion to solve this issue.
Thanks. -
Aside from the link below that describes IMU frame behaviour when using pipeline callback, I do not have any other advice on this particular subject unfortunately.
https://github.com/IntelRealSense/librealsense/issues/5291#issuecomment-563436161
-
Hi MartyG Thank you for the aditional info.
I'll try to use frameset to get proper time stamps.
Thanks. -
Hi MartyG I found 2 pipelines interrupt to do proper Globaltime off. Then I tried to combine 2 pipelines into 1, but the problem I found was wait_for_frame() wasn't able to work under the pipeline configuration with callback. SDK's exceptional message said so.
So, I gave up using Global time off.
Thanks.
Please sign in to leave a comment.
Comments
6 comments