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

Publish Gimbaled LRF distance through mavlink camera protocol #28068

Open
dirksavage88 opened this issue Sep 10, 2024 · 2 comments
Open

Publish Gimbaled LRF distance through mavlink camera protocol #28068

dirksavage88 opened this issue Sep 10, 2024 · 2 comments

Comments

@dirksavage88
Copy link

Feature Request

Publish Gimbaled LRF distance through mavlink, instead of just the backend mount message

Is your feature request related to a problem? Please describe.
Currently the gimbal LRF distances for the viewpro and SIYI are published via an ardupilot specific mount message, see

rangefinder_dist : rangefinder_dist,

However this implementation just passively publishes the distance values, whereas these range values can be consumed by some (LightwareLidar is one such gimbal LRF) mavlink-enabled gimbal/camera payloads to focus on a POI and would be a valid use case for these LRF values given the mavlink camera protocol v2.

Describe the solution you'd like
Instead of only publishing a custom mount message specific to ardupilot, publish via MAV_CMD_SET_CAMERA_FOCUS with focus type set to range and the value in meters from the POI

Describe alternatives you've considered
modifying the current implementation to publish gimbal LRF values to MAV_CMD_TRACKING_GEO_STATUS, however the camera protocol/manager would have to be actively tracking to send distance values for focusing?

Platform
[ x ] All
[ ] AntennaTracker
[ ] Copter
[ ] Plane
[ ] Rover
[ ] Submarine

Additional context
Willing to contribute to push this forward, but I am new to ardupilot contributions.

@rmackay9
Copy link
Contributor

Hi @dirksavage88,

Thanks for the enhancement request. Technically it's easy to add the rangefinder distance to a mavlink message, the issue is that I don't think we really have a good message at the moment. MAV_CMD_SET_CAMERA_FOCUS and MAV_CMD_TRACKING_GEO_STATUS are both commands so those probably aren't appropriate.

It's probably best if we raise an issue on the MAVLink issues list and get input from @hamishwillee and others.

@hamishwillee
Copy link
Contributor

I don't understand where the information is coming from or going to, but rangefinders are expected to publish information using https://mavlink.io/en/messages/common.html#DISTANCE_SENSOR . Posting an issue as Randy suggests is a good idea (if this doesn't do what you want) so that I can share more broadly among mavlink users.

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

No branches or pull requests

3 participants