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

AP_Mount: Support for pointing mount to circle center #23627

Merged
merged 1 commit into from May 8, 2023

Conversation

khanasif786
Copy link
Contributor

No description provided.

Copy link
Contributor

@peterbarker peterbarker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this differ in target vs "at next waypoint"? I think the target waypoint is the circle center when circling...

ArduCopter/mode_circle.cpp Show resolved Hide resolved
ArduCopter/mode_circle.cpp Outdated Show resolved Hide resolved
@khanasif786
Copy link
Contributor Author

khanasif786 commented Apr 27, 2023

@peterbarker

Does this differ in target vs "at next waypoint"? I think the target waypoint is the circle center when circling...

Could you please explain this one more.

Copy link
Contributor

@rmackay9 rmackay9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @khanasif786,

Thanks for this. I don't think we need to add the new MAV_MOUNT_MODE_CIRCLE_CENTER. Instead I think mode_circle.cpp should just call copter.camera_mount.set_roi_target() and pass in the center of the circle.

The only issue I think is that some users may not want to point the camera at the center of the circle so we should add a CIRCLE_OPTIONS parameter that allows enabling/disabling this feature. Also my guess is that we should point the camera at the terrain alt of zero at the center of the circle. So the camera mount should point at the ground at the center of the circle.

@amilcarlucas
Copy link
Contributor

Even better whould be to allow configuring the height. Think about antenna tower inspection :)

@khanasif786
Copy link
Contributor Author

@amilcarlucas. It will need a separate parameter to specify the height. However if more configuration is required then users can directly set the ROI using mavlink commands.

@khanasif786
Copy link
Contributor Author

khanasif786 commented Apr 29, 2023

@rmackay9 . At this point what do you think?, There are 3 possibilities:

  1. We stick with current implementation and point parallel to the copter
  2. We point to the 0 altitude
  3. We have a separate parameter to specify the mount target height in circle mode

@rmackay9
Copy link
Contributor

@khanasif786,

I think we only need to handle the most common use case because, as you say, if the user wants to do something more complicated they can use the existing gimbal control commands including DO_SET_ROI. I think the most common use case will be users circling and filming something that is on the ground.

.. so I think adding a CIRCLE_OPTIONS parameter which enables/disables pointing the gimbal at the center would be best and the altitude should be 0m above the terrain.

@khanasif786 khanasif786 reopened this May 7, 2023
@khanasif786 khanasif786 requested a review from rmackay9 May 7, 2023 07:44
@rmackay9 rmackay9 merged commit 27d96eb into ArduPilot:master May 8, 2023
81 checks passed
@rmackay9
Copy link
Contributor

rmackay9 commented May 8, 2023

Looking good, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WikiNeeded needs wiki update
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants