Paparazzi UAS v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
Loading...
Searching...
No Matches
rover_obstacles.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2025 Alejandro Rochas <alrochas@ucm.es>
3 *
4 * This file is part of paparazzi.
5 *
6 * paparazzi is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2, or (at your option)
9 * any later version.
10 *
11 * paparazzi is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with paparazzi; see the file COPYING. If not, write to
18 * the Free Software Foundation, 59 Temple Place - Suite 330,
19 * Boston, MA 02111-1307, USA.
20 *
21 */
22
29#ifndef ROVER_OBSTACLES_H
30#define ROVER_OBSTACLES_H
31
32
33#ifndef N_COL_GRID
34#define N_COL_GRID 100
35#endif
36
37#ifndef N_ROW_GRID
38#define N_ROW_GRID 100
39#endif
40
41#include "std.h"
42
43
44typedef struct{
45 int8_t LT; // Threshold for occupied/cells (log-odds)
46 float threshold; // Threshold for occupied/free cells
47 float occ; // Occupied cells probability
48 float free; // Free cells probability
49 uint8_t decay; // Decay Probability (log-odds)
51
52
53typedef struct{
55 float xmin;
56 float xmax;
57 float ymin;
58 float ymax;
59 float home[2];
60 float dx;
61 float dy;
66
68
69#define GRID_BLOCK_SIZE 4
70extern uint8_t grid_block_size; // This is only used in CBF
71
72
73extern void init_grid(uint8_t pa, uint8_t pb);
75extern void obtain_cell_xy(float px, float py, int *cell_x, int *cell_y);
76
77extern void fill_cell(float px, float py);
78extern void fill_bayesian_cell(float px, float py);
79extern void fill_free_cells(float lidar, float angle);
80
81extern void decay_map(void);
82extern void update_line_bayes(int x0, int y0, int x1, int y1);
83extern void update_cell(int x, int y, int new_value);
84extern void compute_cell_bayes(int x, int y, bool is_occupied);
85extern void check_probs(void);
86
87
88#endif // ROVER_OBSTACLES_H
uint16_t foo
Definition main_demo5.c:58
bayesian_map map
void obtain_cell_xy(float px, float py, int *cell_x, int *cell_y)
void fill_bayesian_cell(float px, float py)
world_grid obstacle_grid
void check_probs(void)
void init_grid_4(uint8_t wp1, uint8_t wp2, uint8_t wp3, uint8_t wp4)
#define N_COL_GRID
void fill_free_cells(float lidar, float angle)
void update_cell(int x, int y, int new_value)
void decay_map(void)
void compute_cell_bayes(int x, int y, bool is_occupied)
#define N_ROW_GRID
uint8_t grid_block_size
void init_grid(uint8_t pa, uint8_t pb)
void fill_cell(float px, float py)
uint16_t now_row
void update_line_bayes(int x0, int y0, int x1, int y1)
unsigned short uint16_t
Typedef defining 16 bit unsigned short type.
unsigned char uint8_t
Typedef defining 8 bit unsigned char type.
signed char int8_t
Typedef defining 8 bit char type.