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

setting "RS2_OPTION_ENABLE_MOTION_CORRECTION" off after D435i imu calibration #5176

Closed
jaehwan-pi opened this issue Nov 4, 2019 · 3 comments

Comments

@jaehwan-pi
Copy link

  • Before opening a new issue, we wanted to provide you with some useful suggestions (Click "Preview" above for a better view):

  • All users are welcomed to report bugs, ask questions, suggest or request enhancements and generally feel free to open new issue, even if they haven't followed any of the suggestions above :)


Required Info
Camera Model { D435i }
Firmware Version 05.11.06.250)
Operating System & Version Ubuntu 16.04
Kernel Version (Linux Only) (e.g. 4.14.13)
Platform PC
SDK Version 2.29.0
Language {C }
Segment AR

Issue Description

Hi, I'm trying to set an option "RS2_OPTION_ENABLE_MOTION_CORRECTION" OFF after D435i imu calibration.

In my code, I'm trying to do something like below.

std::vectorrs2::pipeline pipelines;
rs2::context ctx; // Create librealsense context for managing devices
cv::Mat intrinsic = cv::Mat::zeros(3,3, CV_64F);
cv::Mat distCoeffs = cv::Mat::zeros(1,4, CV_64F);
for (auto&& dev : ctx.query_devices())
{
rs2::pipeline pipe(ctx);
rs2::config cfg;
cfg.enable_device(dev.get_info(RS2_CAMERA_INFO_SERIAL_NUMBER));
std::string devName= dev.get_info(RS2_CAMERA_INFO_NAME);

    if(!devName.compare("Intel RealSense D435I"))
    {
        std::cout<<dev.get_info(RS2_CAMERA_INFO_NAME) << " detected." << std::endl;
        cfg.enable_stream(RS2_STREAM_COLOR, 848, 480, RS2_FORMAT_BGR8, 30);
        cfg.enable_stream(RS2_STREAM_ACCEL, RS2_FORMAT_MOTION_XYZ32F, 250);
        cfg.enable_stream(RS2_STREAM_GYRO, RS2_FORMAT_MOTION_XYZ32F, 400);

        auto sensor = dev.query_sensors().front();
        sensor.set_option(RS2_OPTION_ENABLE_MOTION_CORRECTION, 0);

    }
    rs2::pipeline_profile profiles = pipe.start(cfg, callback);
    pipelines.emplace_back(pipe);

}

However the set_option function gives me the error message like below.

RealSense error calling rs2_set_option(options:0x27af010, option:Enable Motion Correction, value:0):
object doesn't support option #29

How can I set this option correctly?

@RealSenseCustomerSupport
Copy link
Collaborator


Hi @jaehwan-pi,

You can refer to rs-sensor-control sample app to see how to configure the IMU option.
However, I can see another issue to control this. Will further check internally.

@RealSenseCustomerSupport
Copy link
Collaborator


Hi @jaehwan-pi

I've had a look at the latest releases of our librealsense as well as latest FW for the D435i and am not coming across the issue that you presented. The "RS2_OPTION_ENABLE_MOTION_CORRECTION" is a SW setting. Can you outline any further specifics to your situation or let us know if you're still seeing the problem?

Thanks

@jaehwan-pi
Copy link
Author

Thank you for the comment. Actually I raised this issue to deal the issue #5177. So if the issue #5177 is solved, this issue is no longer needed. I will close this issue, so please provide further information on #5177 if possible. Thank you.

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

2 participants