Formula Student Autonomous Systems
The code for the main driverless system
Loading...
Searching...
No Matches
GroundGrid Class Reference

Class to represent a ground height grid for ground proximity checks. More...

#include <ground_grid.hpp>

Collaboration diagram for GroundGrid:
Collaboration graph

Public Member Functions

 GroundGrid ()=default
 
 GroundGrid (const double range, const double angle, const double radius, const double start_augmentation, const double radius_augmentation, const double fov)
 Constructor for GroundGrid.
 
float get_ground_height (const float x, const float y) const
 Get the ground height at a specific (x, y) location.
 
void set_ground_height (const float x, const float y, const float height)
 Set the ground height at a specific (x, y) location.
 
void reset_grid ()
 Reset the ground grid to initial state.
 

Private Attributes

double range_
 
GridGeometry grid_geometry_
 
std::vector< std::vector< float > > grid_
 

Detailed Description

Class to represent a ground height grid for ground proximity checks.

Definition at line 16 of file ground_grid.hpp.

Constructor & Destructor Documentation

◆ GroundGrid() [1/2]

GroundGrid::GroundGrid ( )
default

◆ GroundGrid() [2/2]

GroundGrid::GroundGrid ( const double  range,
const double  angle,
const double  radius,
const double  start_augmentation,
const double  radius_augmentation,
const double  fov 
)

Constructor for GroundGrid.

Parameters
rangeMaximum range of the grid
angleAngular resolution
radiusBase radial bin size
start_augmentationDistance at which augmentation starts
radius_augmentationBin size increase per bin
fovField of view

Definition at line 3 of file ground_grid.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ get_ground_height()

float GroundGrid::get_ground_height ( const float  x,
const float  y 
) const

Get the ground height at a specific (x, y) location.

Parameters
xX coordinate
yY coordinate
Returns
Ground height (float), or NaN if no data

Definition at line 12 of file ground_grid.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ reset_grid()

void GroundGrid::reset_grid ( )

Reset the ground grid to initial state.

Definition at line 43 of file ground_grid.cpp.

Here is the caller graph for this function:

◆ set_ground_height()

void GroundGrid::set_ground_height ( const float  x,
const float  y,
const float  height 
)

Set the ground height at a specific (x, y) location.

Parameters
xX coordinate
yY coordinate
heightGround height to set

Definition at line 25 of file ground_grid.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ grid_

std::vector<std::vector<float> > GroundGrid::grid_
private

Definition at line 57 of file ground_grid.hpp.

◆ grid_geometry_

GridGeometry GroundGrid::grid_geometry_
private

Definition at line 56 of file ground_grid.hpp.

◆ range_

double GroundGrid::range_
private

Definition at line 55 of file ground_grid.hpp.


The documentation for this class was generated from the following files: