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

[WIP] add support for range finders via uavcan (for HEX flow module) #12738

Closed
wants to merge 1 commit into from

Conversation

DanielePettenuzzo
Copy link
Contributor

On the HEX optical flow module (pmw3901) we receive flow and gyro data in the custom flow message while the distance sensor data comes in with the default range_sensor message. This pr adds support for the default range_sensor message.

I haven't tested this on hardware yet. Will do it some time this week.

Remaining issues:

  • The max distance and min distance for the sensor is not available in the uavcan message. I haven't checked yet in the ekf but this could cause some issue. The message although has a reading_type field that looks like this:
    uint3 READING_TYPE_UNDEFINED = 0 # Range is unknown
    uint3 READING_TYPE_VALID_RANGE = 1 # Range field contains valid distance
    uint3 READING_TYPE_TOO_CLOSE = 2 # Range field contains min range for the sensor
    uint3 READING_TYPE_TOO_FAR = 3 # Range field contains max range for the sensor
    uint3 reading_type

I currently use this field to assign the signal_quality to -1 if unknown, 100 if valid range and 0 if too close or too far.

  • uavcan sensor orientation is given in roll, pitch, yaw so for now since we will use this sensor for optical flow I hardcoded it to distance_sensor_s::ROTATION_DOWNWARD_FACING but we will have to add a conversion to be compatible with any uavcan rangefinder.

@DanielePettenuzzo
Copy link
Contributor Author

FYI @dagar @RomanBapst

@dagar
Copy link
Member

dagar commented Oct 14, 2019

Can you rebase?

@stale
Copy link

stale bot commented Jan 12, 2020

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.

@stale stale bot added the stale label Jan 12, 2020
@dagar
Copy link
Member

dagar commented Jan 31, 2020

Still interested in this?

@stale
Copy link

stale bot commented Apr 30, 2020

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.

@dagar
Copy link
Member

dagar commented Jan 10, 2021

UAVCAN range finder support came in separately.

@dagar dagar closed this Jan 10, 2021
@dagar dagar deleted the pr-can-rangefinder-support branch January 10, 2021 18:46
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.

2 participants