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

Only set magnetometer gain if param is set #169

Merged
merged 1 commit into from
Nov 27, 2023

Conversation

mintar
Copy link
Contributor

@mintar mintar commented Nov 24, 2023

This is required because the function PhidgetSpatial_setAlgorithmMagnetometerGain is present in the Phidgets Spatial MOT0109 API (https://www.phidgets.com/?prodid=1204#Tab_API), but was removed in the MOT0110 API (https://www.phidgets.com/?prodid=1205#Tab_API). This caused an exception to be thrown on the MOT0110 (#168 (comment)).

This commit allows not setting the parameter on the MOT0110 and onwards, thereby avoiding the function call and the exception.

This is required because the function
`PhidgetSpatial_setAlgorithmMagnetometerGain` is present in the Phidgets
Spatial MOT0109 API (https://www.phidgets.com/?prodid=1204#Tab_API), but
was removed in the MOT0110 API
(https://www.phidgets.com/?prodid=1205#Tab_API). This caused an
exception to be thrown on the MOT0110
(ros-drivers#168 (comment)).

This commit allows not setting the parameter on the MOT0110 and onwards,
thereby avoiding the function call and the exception.
@samerhanoun
Copy link

Works now. Orientation data is in agreement with imu_filter_madgwick.
launch
topic list
topic echo
compare phidgets_drivers with madgwick

Happy to test any further fixes if needed, for now we have the orientation data which we needed. Thanks for your help.

@mintar mintar merged commit 9d91fe2 into ros-drivers:rolling Nov 27, 2023
5 checks passed
@mintar mintar deleted the fix_magnetometer_gain branch November 27, 2023 13:47
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

Successfully merging this pull request may close these issues.

3 participants