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
Get quaternion from InertialUnit
#2424
Conversation
…/cyberbotics/webots into feature-inertial-unit-quaternion
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. It looks very good to me. A few minor change requests.
Co-authored-by: Olivier Michel <Olivier.Michel@cyberbotics.com>
Co-authored-by: Olivier Michel <Olivier.Michel@cyberbotics.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
@@ -13,6 +13,7 @@ Released on December XXth, 2020. | |||
- Added a new [`wb_supervisor_node_get_contact_point_node`](supervisor.md#wb_supervisor_node_get_contact_point_node) [Supervisor](supervisor.md) API function to get the node reference associated to a given contact point ([#2228](https://github.com/cyberbotics/webots/pull/2228)). | |||
- Added two new functions to the [Camera](camera.md) API called [`wb_camera_get_exposure`](camera.md#wb_camera_get_exposure) and [`wb_camera_set_exposure`](camera.md#wb_camera_set_exposure) to retrieve and change the [Camera](camera.md) exposure ([#2363](https://github.com/cyberbotics/webots/pull/2363)). | |||
- Added a new functionality in the [Recognition](recognition.md) node and [Camera](camera.md) API for generating segmented ground truth images ([#2199](https://github.com/cyberbotics/webots/pull/2199)). | |||
- **Added a new [`wb_inertial_unit_get_quaternion`](inertialunit.md#wb_inertial_unit_get_quaternion) [InertialUnit](inertialunit.md) API function to get the orientation measurement represented as a quaternion ([#2424](https://github.com/cyberbotics/webots/pull/2424)).** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this entry is written in bold?
Does it break compatibility with previous version? if not it should not be in bold to be consistent with the rest of the ChangeLog.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, and we should also mention here in bold that a function was removed and another one was added (lookup table and noise).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems this comment has still not been solved, and in addition, the removal of the lookupTable
field should be mentioned too.
@@ -21,7 +21,7 @@ InertialUnit { | |||
field SFFloat radarCrossSection 0.0 # radar cross section of this solid | |||
field MFColor recognitionColors [] # colors returned for this Solid by Cameras with a Recognition node | |||
#fields specific to the InertialUnit node: | |||
field MFVec3f lookupTable [] # empty: no interpolation |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Usually, the field is actually kept in the '*.wrl' file (at the end) with the 'deprecatedField' keyword instead of 'field' so that a deprecation warning is automatically generated if needed. See for example: https://github.com/cyberbotics/webots/blob/master/resources/nodes/Camera.wrl#L46
I am taking care of fixing the remaining issues here. |
This PR adds support to the
InertialUnit
node that allows retrieval of quaternions. This allows us to avoid gimbal-lock and to be closer to the real sensor implementation. It also fixes orientation in ROS.Physical Sensor Example
I used an MPU6050 sensor (driver implementation) as an example:
Non-related fixes
Documentation
https://cyberbotics.com/doc/reference/inertialunit?version=feature-inertial-unit-quaternion
ROS Objective
The ROS layer should be changed, so RVIz and Webots orientation match if the coordinate system is ENU:
Related Issues
cyberbotics/webots_ros#37
cyberbotics/webots_ros#38
Tasks
noise
parameter