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

How to get synchronized imu data without ROS #9138

Closed
lbw0502 opened this issue Jun 1, 2021 · 6 comments
Closed

How to get synchronized imu data without ROS #9138

lbw0502 opened this issue Jun 1, 2021 · 6 comments
Labels

Comments

@lbw0502
Copy link

lbw0502 commented Jun 1, 2021

Hi,

I am using D455 to develop VIO algorithm.

if I use ROS, I can change the accel_fps, accel_fps, and set unite_imu_method as linear_interpolation in launch file to get synchronized imu data.

My question is:
If I only use realsense sdk(without ROS) to open the camera, how should I change the imu rate and get such synchronized imu data?
I didn't find it in the sdk.

Thanks for help!

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Jun 1, 2021

Hi @lbw0502 The purpose of unite_imu_method in ROS is to publish two separate IMU topics (Gyro and Accel) as a single topic called imu. Its linear interpolation condition interpolates accel messages to the gyro timestamp.

In librealsense though, Gyro and Accel are published as separate streams. Sync for gyro and accel in the SDK for the purposes of VIO is a subject that has been discussed in the past in the links below. I am not aware of a standard built-in function for doing so in librealsense though.

#3921
#5712

In regard to setting a frequency for gyro and accel separately, could you tell me whether you are using C++ or Python please so that I can provide the correct programming information. Thanks!

@lbw0502
Copy link
Author

lbw0502 commented Jun 1, 2021

Thanks for your reply!

I am using C++.

@MartyG-RealSense
Copy link
Collaborator

Thanks very much for the confirmation. The link below provides information about defining a gyro and accel stream in C++, the frequencies that are supported for gyro and accel, and a link to a full C++ IMU script.

https://support.intelrealsense.com/hc/en-us/community/posts/1500001145522/comments/1500000958142

@MartyG-RealSense
Copy link
Collaborator

Hi @lbw0502 Do you require further assistance with this case, please? Thanks!

@lbw0502
Copy link
Author

lbw0502 commented Jun 8, 2021

Hi MartyG, sorry for the late reply... I have found another way to do the synchronization. Here is the link:

https://github.com/lifelong-robotic-vision/openloris-scene-tools/blob/master/dataprocess/merge_imu_topics.py

I have solved my problem. Thanks for your help :)

@lbw0502 lbw0502 closed this as completed Jun 8, 2021
@MartyG-RealSense
Copy link
Collaborator

No problem at all @lbw0502 - it is excellent news that you found a solution, and thanks very much for sharing it with the RealSense ROS community! :)

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

No branches or pull requests

2 participants