ArduPilot / MissionPlanner

Mission Planner Ground Control Station for ArduPilot (c# .net)
http://ardupilot.org/planner/
GNU General Public License v3.0
1.69k stars 2.33k forks source link

Question about "point camera here" mission planner function #2089

Open roque-canales opened 5 years ago

roque-canales commented 5 years ago

Hello,

Could you please help me to found what commande is send by mission planner to MAV when we click on "point camera here" ?

Thank you for your help.

rmackay9 commented 5 years ago

I think it is a DO_SET_ROI or DO_SET_ROI_LOCATION command sent within a COMMAND_LONG. Hope that helps.

roque-canales commented 5 years ago

Hello Randy,

Thank you so much.

I'm looking for the easiest way to make the drone point the camera to another drone (connected together through mavlink) automatically.

what do you advise me to do?

rmackay9 commented 5 years ago

@roque-canales, we've actually been thinking of adding this to follow mode. I don't know if you're happy to have the drone follow the other drone as well as point it's camera at the leader... but in any case, somewhere in the code we would need to call

copter.camera_mount.set_roi_target(roi_location);

Where "roi_location" is a Location structure with the lat, lon and altitude of the target.

If it were added to Follow mode, I'd probably:

linkevinlin1 commented 4 years ago

Hi,

I would like to ask a related question. Sorry for hijacking the topic.

We would like to control the camera through a companion computer. The computer is connected to Pixhawk through USB port. Our intended way of communication is to issue "Point camera here" command from mission planner -> Pixhawk -> computer -> camera. However, the computer failed to get DO_SET_ROI from COMMAND_LONG, while I'm able to get camera trigger command from COMMAND_LONG. Is there anything special I need to set up because of the gimbal?

Thanks.