32 #ifndef RANGE_FORCEFIELD_RECIEVE_ID
33 #define RANGE_FORCEFIELD_RECIEVE_ID ABI_BROADCAST
36 #ifndef RANGE_FORCEFIELD_INNER_LIMIT
37 #define RANGE_FORCEFIELD_INNER_LIMIT 1.0f
41 #ifndef RANGE_FORCEFIELD_OUTER_LIMIT
42 #define RANGE_FORCEFIELD_OUTER_LIMIT 1.4f
46 #ifndef RANGE_FORCEFIELD_MIN_VEL
47 #define RANGE_FORCEFIELD_MIN_VEL 0.0f
51 #ifndef RANGE_FORCEFIELD_MAX_VEL
52 #define RANGE_FORCEFIELD_MAX_VEL 0.5f
61 static void store_min_dist(
float pos,
float *nearest_pos,
float range);
69 body_to_sensors_eulers.
phi = 0;
70 body_to_sensors_eulers.
theta = azimuth;
71 body_to_sensors_eulers.
psi = bearing;
124 struct FloatVect3 obs_loc, range_vec = {range, 0, 0};
148 if (range < 0.001f) {
169 if (fabsf(pos) >= range / 2.f)
172 if (pos > 0.f && pos < *nearest_pos)
175 }
else if (pos < 0.f && pos > *nearest_pos)
Main include for ABI (AirBorneInterface).
Event structure to store callbacks in a linked list.
#define RANGE_FORCEFIELD_ID
#define float_rmat_of_eulers
void float_rmat_transp_vmult(struct FloatVect3 *vb, struct FloatRMat *m_b2a, struct FloatVect3 *va)
rotate 3D vector by transposed rotation matrix.
PRINT_CONFIG_VAR(ONELOOP_ANDI_FILT_CUTOFF)
void range_forcefield_init(void)
struct range_forcefield_param_t range_forcefield_param
void range_forcefield_periodic(void)
#define RANGE_FORCEFIELD_OUTER_LIMIT
#define RANGE_FORCEFIELD_RECIEVE_ID
#define RANGE_FORCEFIELD_MAX_VEL
static struct FloatVect3 ff_nearest_obs_pos
#define RANGE_FORCEFIELD_INNER_LIMIT
void range_forcefield_update(float range, struct FloatEulers *body_to_sensor_eulers)
static void obstacle_cb(uint8_t sender_id, float range, float azimuth, float bearing)
static float compute_ff_vel(float range)
static void store_min_dist(float pos, float *nearest_pos, float range)
#define RANGE_FORCEFIELD_MIN_VEL
static abi_event obstacle_ev
static struct FloatVect3 ff_nearest_obs_neg
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.