|
Paparazzi UAS v7.1_unstable
Paparazzi is a free software Unmanned Aircraft System.
|
Pan/Tilt camera gimbal control. More...
Go to the source code of this file.
Data Structures | |
| struct | CamGimbal |
Macros | |
| #define | CAM_GIMBAL_MODE_OFF 0 |
| #define | CAM_GIMBAL_MODE_JOYSTICK 1 |
| #define | CAM_GIMBAL_MODE_ANGLES 2 |
| #define | CAM_GIMBAL_MODE_NADIR 3 |
| #define | CAM_GIMBAL_MODE_TARGET 4 |
| #define | CAM_GIMBAL_MODE_WAYPOINT 5 |
| #define | CAM_GIMBAL_MODE_AC_TARGET 6 |
| #define | CAM_GIMBAL_MODE_NB 7 |
| #define | cam_gimbal_SetMode(x) |
| #define | cam_gimbal_SetLock(x) |
| #define | cam_gimbal_SetPanCommand(x) |
| #define | cam_gimbal_SetTiltCommand(x) |
Typedefs | |
| typedef void(* | cam_angles_from_dir) (struct FloatVect3 dir, float *pan, float *tilt) |
| Function pointer to return cam angle from a specified direction. | |
Functions | |
| void | cam_gimbal_init (void) |
| Init module. | |
| void | cam_gimbal_periodic (void) |
| Periodic call (run control). | |
| void | cam_gimbal_setup_angles (struct CamGimbal *cam, float pan_max, float pan_min, float tilt_max, float tilt_min) |
| void | cam_gimbal_setup_mounting (struct CamGimbal *cam, struct FloatEulers gimbal_to_body, struct FloatVect3 gimbal_pos) |
| void | cam_gimbal_set_angles_callback (struct CamGimbal *cam, cam_angles_from_dir compute_angles) |
| void | cam_gimbal_run (struct CamGimbal *cam) |
| Run camera control. | |
| void | cam_gimbal_set_mode (struct CamGimbal *cam, uint8_t mode) |
| void | cam_gimbal_set_lock (struct CamGimbal *cam, bool lock) |
| void | cam_gimbal_set_pan_command (struct CamGimbal *cam, int16_t pan) |
| void | cam_gimbal_set_tilt_command (struct CamGimbal *cam, int16_t tilt) |
| void | cam_gimbal_set_angles_rad (struct CamGimbal *cam, float pan, float tilt) |
| void | cam_gimbal_set_angles_deg (struct CamGimbal *cam, float pan, float tilt) |
| void | cam_gimbal_set_target_pos (struct CamGimbal *cam, struct EnuCoor_f target) |
| void | cam_gimbal_set_wp_id (struct CamGimbal *cam, uint8_t wp_id) |
| void | cam_gimbal_set_ac_id (struct CamGimbal *cam, uint8_t ac_id) |
Variables | |
| struct CamGimbal | cam_gimbal |
Pan/Tilt camera gimbal control.
Definition in file cam_gimbal.h.
| struct CamGimbal |
Definition at line 55 of file cam_gimbal.h.
| Data Fields | ||
|---|---|---|
| cam_angles_from_dir | compute_angles | cam angles from looking direction callback |
| struct FloatVect3 | gimbal_pos | position of the gimbal in body NED frame [m] |
| struct FloatRMat | gimbal_to_body | rotation matrix from gimbal to body frame |
| bool | lock | lock current command |
| uint8_t | mode | gimbal control mode |
| float | pan_angle | pan angle [rad] |
| int16_t | pan_cmd | pan command [pprz] |
| int16_t | pan_joystick | pan command from joystick |
| float | pan_max | pan angle at maximum command |
| float | pan_min | pan angle at minimum command |
| uint8_t | target_ac_id | aircraft ID to track |
| struct EnuCoor_f | target_pos | target point in ENU world frame [m] |
| uint8_t | target_wp_id | waypoint ID to track |
| float | tilt_angle | tilt angle [rad] |
| int16_t | tilt_cmd | tilt command [pprz] |
| int16_t | tilt_joystick | tilt command from joystick |
| float | tilt_max | tilt angle at maximum command |
| float | tilt_min | tilt angle at minimum command |
| #define CAM_GIMBAL_MODE_AC_TARGET 6 |
Definition at line 41 of file cam_gimbal.h.
Referenced by cam_gimbal_run().
| #define CAM_GIMBAL_MODE_ANGLES 2 |
Definition at line 37 of file cam_gimbal.h.
Referenced by cam_gimbal_run().
| #define CAM_GIMBAL_MODE_JOYSTICK 1 |
Definition at line 36 of file cam_gimbal.h.
Referenced by cam_gimbal_run().
| #define CAM_GIMBAL_MODE_NADIR 3 |
Definition at line 38 of file cam_gimbal.h.
Referenced by cam_gimbal_run().
| #define CAM_GIMBAL_MODE_NB 7 |
Definition at line 42 of file cam_gimbal.h.
Referenced by cam_gimbal_set_mode().
| #define CAM_GIMBAL_MODE_OFF 0 |
Definition at line 35 of file cam_gimbal.h.
Referenced by cam_gimbal_run(), and cam_gimbal_set_mode().
| #define CAM_GIMBAL_MODE_TARGET 4 |
Definition at line 39 of file cam_gimbal.h.
Referenced by cam_gimbal_run().
| #define CAM_GIMBAL_MODE_WAYPOINT 5 |
Definition at line 40 of file cam_gimbal.h.
Referenced by cam_gimbal_run().
| #define cam_gimbal_SetLock | ( | x | ) |
Definition at line 106 of file cam_gimbal.h.
| #define cam_gimbal_SetMode | ( | x | ) |
Definition at line 105 of file cam_gimbal.h.
| #define cam_gimbal_SetPanCommand | ( | x | ) |
Definition at line 107 of file cam_gimbal.h.
| #define cam_gimbal_SetTiltCommand | ( | x | ) |
Definition at line 108 of file cam_gimbal.h.
| typedef void(* cam_angles_from_dir) (struct FloatVect3 dir, float *pan, float *tilt) |
Function pointer to return cam angle from a specified direction.
The direction is the unit vector from the camera position to the target expressed in the gimbal frame. The resulting angles depends on the type of gimbal that is used, in particular the number and order of rotations. This function is provided by the user as it is specific to each mounting. It returns the pan and tilt angles.
Definition at line 53 of file cam_gimbal.h.
|
extern |
Init module.
Definition at line 326 of file cam_gimbal.c.
References ABI_BROADCAST, cam_gimbal, CAM_GIMBAL_PAN_MAX, CAM_GIMBAL_PAN_MIN, CAM_GIMBAL_POS_X, CAM_GIMBAL_POS_Y, CAM_GIMBAL_POS_Z, cam_gimbal_set_angles_callback(), cam_gimbal_setup_angles(), cam_gimbal_setup_mounting(), CAM_GIMBAL_TILT_MAX, CAM_GIMBAL_TILT_MIN, CAM_GIMBAL_TO_BODY_PHI, CAM_GIMBAL_TO_BODY_PSI, CAM_GIMBAL_TO_BODY_THETA, default_compute_angles(), DefaultPeriodic, joystick_cb(), joystick_ev, register_periodic_telemetry(), and send_cam().
|
extern |
Periodic call (run control).
Definition at line 355 of file cam_gimbal.c.
References cam_gimbal, and cam_gimbal_run().
|
extern |
Run camera control.
Definition at line 294 of file cam_gimbal.c.
References cam_gimbal_ac_target(), cam_gimbal_angles(), cam_gimbal_joystick(), CAM_GIMBAL_MODE_AC_TARGET, CAM_GIMBAL_MODE_ANGLES, CAM_GIMBAL_MODE_JOYSTICK, CAM_GIMBAL_MODE_NADIR, CAM_GIMBAL_MODE_OFF, CAM_GIMBAL_MODE_TARGET, CAM_GIMBAL_MODE_WAYPOINT, cam_gimbal_nadir(), CAM_GIMBAL_PAN0, cam_gimbal_set_pan_command(), cam_gimbal_target(), CAM_GIMBAL_TILT0, cam_gimbal_waypoint_target(), and CamGimbal::mode.
Referenced by cam_gimbal_periodic().
Definition at line 286 of file cam_gimbal.c.
References CamGimbal::target_ac_id.
|
extern |
Definition at line 229 of file cam_gimbal.c.
References CamGimbal::compute_angles.
Referenced by cam_gimbal_init(), and gimbal_caddx_gm3_init().
|
extern |
Definition at line 266 of file cam_gimbal.c.
References CamGimbal::pan_angle, CamGimbal::pan_max, CamGimbal::pan_min, CamGimbal::tilt_angle, CamGimbal::tilt_max, and CamGimbal::tilt_min.
|
extern |
Definition at line 258 of file cam_gimbal.c.
References CamGimbal::pan_angle, CamGimbal::pan_max, CamGimbal::pan_min, CamGimbal::tilt_angle, CamGimbal::tilt_max, and CamGimbal::tilt_min.
|
extern |
Definition at line 243 of file cam_gimbal.c.
References CamGimbal::lock.
Definition at line 234 of file cam_gimbal.c.
References CAM_GIMBAL_MODE_NB, CAM_GIMBAL_MODE_OFF, CamGimbal::mode, and mode.
Definition at line 248 of file cam_gimbal.c.
References CamGimbal::pan_cmd, and TRIM_PPRZ.
Referenced by cam_gimbal_joystick(), and cam_gimbal_run().
Definition at line 274 of file cam_gimbal.c.
References target, and CamGimbal::target_pos.
Referenced by cam_gimbal_nadir(), and cam_gimbal_waypoint_target().
Definition at line 253 of file cam_gimbal.c.
References CamGimbal::tilt_cmd, and TRIM_PPRZ.
Referenced by cam_gimbal_joystick().
Definition at line 279 of file cam_gimbal.c.
References nb_waypoint, and CamGimbal::target_wp_id.
|
extern |
Definition at line 211 of file cam_gimbal.c.
References CamGimbal::pan_max, CamGimbal::pan_min, CamGimbal::tilt_max, and CamGimbal::tilt_min.
Referenced by cam_gimbal_init(), and gimbal_caddx_gm3_init().
|
extern |
Definition at line 221 of file cam_gimbal.c.
References float_rmat_of_eulers, CamGimbal::gimbal_pos, and CamGimbal::gimbal_to_body.
Referenced by cam_gimbal_init().
|
extern |
Definition at line 86 of file cam_gimbal.c.
Referenced by cam_gimbal_init(), cam_gimbal_periodic(), gimbal_caddx_gm3_init(), joystick_cb(), and send_cam().