![]() |
Paparazzi UAS v7.0_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 |
Typedefs | |
typedef void(* | cam_angles_from_dir) (struct FloatVect3 dir, float *pan, float *tilt) |
Function pointer to return cam angle from a specified direction. | |
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.
#define CAM_GIMBAL_MODE_ANGLES 2 |
Definition at line 37 of file cam_gimbal.h.
#define CAM_GIMBAL_MODE_JOYSTICK 1 |
Definition at line 36 of file cam_gimbal.h.
#define CAM_GIMBAL_MODE_NADIR 3 |
Definition at line 38 of file cam_gimbal.h.
#define CAM_GIMBAL_MODE_NB 7 |
Definition at line 42 of file cam_gimbal.h.
#define CAM_GIMBAL_MODE_OFF 0 |
Definition at line 35 of file cam_gimbal.h.
#define CAM_GIMBAL_MODE_TARGET 4 |
Definition at line 39 of file cam_gimbal.h.
#define CAM_GIMBAL_MODE_WAYPOINT 5 |
Definition at line 40 of file cam_gimbal.h.
#define cam_gimbal_SetLock | ( | x | ) | cam_gimbal_set_lock(&cam_gimbal, x) |
Definition at line 106 of file cam_gimbal.h.
#define cam_gimbal_SetMode | ( | x | ) | cam_gimbal_set_mode(&cam_gimbal,x) |
Definition at line 105 of file cam_gimbal.h.
#define cam_gimbal_SetPanCommand | ( | x | ) | cam_gimbal_set_pan_command(&cam_gimbal, x) |
Definition at line 107 of file cam_gimbal.h.
#define cam_gimbal_SetTiltCommand | ( | x | ) | cam_gimbal_set_pan_command(&cam_gimbal, x) |
Definition at line 108 of file cam_gimbal.h.
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.
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, foo, joystick_cb(), joystick_ev, register_periodic_telemetry(), and send_cam().
Periodic call (run control)
Definition at line 355 of file cam_gimbal.c.
References cam_gimbal, cam_gimbal_run(), foo, CamGimbal::pan_cmd, and CamGimbal::tilt_cmd.
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 foo.
Referenced by cam_gimbal_periodic().
Definition at line 286 of file cam_gimbal.c.
References foo.
|
extern |
Definition at line 229 of file cam_gimbal.c.
References foo.
Referenced by cam_gimbal_init(), and gimbal_caddx_gm3_init().
Definition at line 266 of file cam_gimbal.c.
References foo.
Definition at line 258 of file cam_gimbal.c.
References foo.
Definition at line 243 of file cam_gimbal.c.
References foo.
Definition at line 234 of file cam_gimbal.c.
References CAM_GIMBAL_MODE_NB, CAM_GIMBAL_MODE_OFF, foo, and mode.
Definition at line 248 of file cam_gimbal.c.
References foo, and TRIM_PPRZ.
Referenced by cam_gimbal_joystick(), and cam_gimbal_run().
Definition at line 274 of file cam_gimbal.c.
Referenced by cam_gimbal_nadir(), and cam_gimbal_waypoint_target().
Definition at line 253 of file cam_gimbal.c.
References foo, and TRIM_PPRZ.
Referenced by cam_gimbal_joystick().
Definition at line 279 of file cam_gimbal.c.
References foo, and nb_waypoint.
|
extern |
Definition at line 211 of file cam_gimbal.c.
References foo.
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, and foo.
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().