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

Motion Estimation #3053

Merged
merged 14 commits into from
Jan 30, 2019
Merged

Motion Estimation #3053

merged 14 commits into from
Jan 30, 2019

Conversation

AnnaRomanov
Copy link
Contributor

@AnnaRomanov AnnaRomanov commented Jan 13, 2019

Example of calculating camera's rotation angle using IMU data, and visualizing the result using a camera 3D model.

Based on work by @GruffyPuffy.

@dorodnic dorodnic added the d435i label Jan 13, 2019
@GruffyPuffy
Copy link

Hi there!
Thanks for the reference to this.

A thought...I do not understand the need for the multiplication with 0.5 in process_gyro(). I do not need to do this in my sample. Maybe you have something strange in the time stamps? Or are you missing frames/using wrong frames? I have not compiled your code and tested it however. Seems strange that you need it however.

In my test I used another method for getting the accel angles (cos instead of atan2). I have thought of testing that before, nice to see that you did that for me. :)

Another thing, would it be possible for you to add the mesh file to git, i.e. "d435.obj" that you used to generate the d435.h? That would be nice for us to use in other projects/samples as well.

@dorodnic
Copy link
Contributor

Sure, I'll upload the obj files tomorrow. They are based our official CAD models from realsense.intel.com, but I did some post-processing in Blender to get the vertex count down to something embeddable, so I hope you will find it useful.
I'll let @AnnaRomanov comment on the other questions, she did quite a lot of testing on the subject.

@GruffyPuffy
Copy link

Sure, I'll upload the obj files tomorrow. They are based our official CAD models from realsense.intel.com, but I did some post-processing in Blender to get the vertex count down to something embeddable, so I hope you will find it useful.

Thanks! I had totally missed that you have released STEP-files of the cameras...I will check them out as well!

@AnnaRomanov
Copy link
Contributor Author

A thought...I do not understand the need for the multiplication with 0.5 in process_gyro(). I do not need to do this in my sample. Maybe you have something strange in the time stamps? Or are you missing frames/using wrong frames? I have not compiled your code and tested it however. Seems strange that you need it however.

Hi @GruffyPuffy, while testing the code and adjusting the angles I noticed that multiplying by 0.5 gives the accurate movement of the physical camera. I haven't researched it enough to say why exactly it is needed but I can take a closer look when I get the chance.

@GruffyPuffy
Copy link

Hi @GruffyPuffy, while testing the code and adjusting the angles I noticed that multiplying by 0.5 gives the accurate movement of the physical camera. I haven't researched it enough to say why exactly it is needed but I can take a closer look when I get the chance.

Hi @AnnaRomanov,
To me it seems like there is an error in either the underlying code (i.e. driver) or in your code. I would recommend this to be solved as you are merging this into the librealsense code. As an owner of the device, I would like to assume that samples in this repository are correct and give a good and accurate sample of how to use the library/device. If we see magic constants like that something is wrong, it does not return correct data (rad/s).

I did not see this in my test code so I would suspect something is wrong in your sample (I might have missed it however...so do not count on it!). If there are trouble in the library (and/or firmware) I think that we should issue a ticket for it here. These values really should return the expected angle velocity (rad/s) and it is important that it works to be able to use it in a real application.

@ev-mp ev-mp mentioned this pull request Jan 20, 2019
@AnnaRomanov
Copy link
Contributor Author

Hi @GruffyPuffy, after checking it once again with the camera I see that you are correct and there is no need for the multiplying. It was there due to a previous bug and I forgot to remove it, my apologies. I updated the code to the correct version now. Thank you for pointing this out!

@dorodnic
Copy link
Contributor

Let's rebase on top of 2.18 and use d435.h under common/ to reduce footprint

@dorodnic dorodnic merged commit 566fef1 into IntelRealSense:development Jan 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants