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

Port PR #153 (add support for onboard orientation estimation) to ROS2 #168

Merged
merged 3 commits into from
Nov 17, 2023

Conversation

mintar
Copy link
Contributor

@mintar mintar commented Nov 10, 2023

No description provided.

@mintar
Copy link
Contributor Author

mintar commented Nov 10, 2023

Still work in progress. I don't have a MOT109, so I can't test this PR.

@mklpiening
Copy link
Contributor

I just tested the pr on ros2 humble woth a MOT0109.
There is still a typo in the phidgets_spatial spatial-launch.py. After using the "params" dict for the node parameters instead of "do_params" in line 57, it works well and I get the internally estimated orientation when enabling the "use_orientation" option.

Thus, this PR can be merged from my side.

@mintar mintar marked this pull request as ready for review November 17, 2023 17:06
@mintar mintar merged commit 7530920 into ros-drivers:rolling Nov 17, 2023
@mintar mintar deleted the port-pr153-ros2 branch November 17, 2023 17:28
@mintar
Copy link
Contributor Author

mintar commented Nov 17, 2023

Thanks for testing! I've fixed up the code with your suggestion and merged the PR.

@samerhanoun
Copy link

Hi Martin,
Tested your latest merged code (that you merged 5 days ago for both phidgets_spatial and phidgets_api) using a PhidgetSpatial Preceision 3/3/3 MOT0110_0 on ROS2 Humble. Launching using use_orientation: true via spatial-launch.py, the code fails to set the magnetometer gain. Please see attached phots.

Regards,
Samer
20231122_155003
launch spatial-launch py with 'use_orientation'_ True

mintar added a commit to mintar/phidgets_drivers that referenced this pull request 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
(ros-drivers#168 (comment)).

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

mintar commented Nov 24, 2023

I've just pushed a PR (#169) that should fix your problem. Please test and report back.

mintar added a commit to mintar/phidgets_drivers that referenced this pull request 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
(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.

mintar added a commit that referenced this pull request Nov 27, 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.
mintar added a commit that referenced this pull request Nov 27, 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.
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