20 #include "Eigen/Dense" 23 namespace perception {
40 if (data_.size() != rhs.
data_.size()) {
41 data_.resize(rhs.
data_.size());
45 for (int32_t i = 0; i < rows_; ++i) {
46 nodes_[i] = data_.data() + i * cols_;
52 void Init(int32_t rows, int32_t cols) {
57 size_ = rows_ * cols_;
60 for (
int i = 0; i < rows_; ++i) {
61 nodes_[i] = data_.data() + i * cols_;
71 return (r >= 0 && r < rows_ && c >= 0 && c < cols_);
89 int32_t
rows()
const {
return rows_; }
92 int32_t
cols()
const {
return cols_; }
95 int32_t
size()
const {
return size_; }
GroundNode * operator[](int32_t r)
Definition: ground_struct.h:76
int32_t size() const
Definition: ground_struct.h:95
GroundGrid(const GroundGrid &rhs)
Definition: ground_struct.h:35
int32_t cols_
Definition: ground_struct.h:101
bool IsInGrid(int32_t r, int32_t c)
Definition: ground_struct.h:70
PlanningContext is the runtime context in planning. It is persistent across multiple frames...
Definition: atomic_hash_map.h:25
float confidence
Definition: ground_struct.h:28
int32_t rows() const
Definition: ground_struct.h:89
void Reset()
Definition: ground_struct.h:66
const GroundNode * operator[](int32_t r) const
Definition: ground_struct.h:80
const GroundNode * DataPtr() const
Definition: ground_struct.h:86
Definition: ground_struct.h:26
int32_t size_
Definition: ground_struct.h:102
Definition: ground_struct.h:31
GroundGrid & operator=(const GroundGrid &rhs)
Definition: ground_struct.h:36
GroundNode * DataPtr()
Definition: ground_struct.h:83
Eigen::Vector4f params
Definition: ground_struct.h:27
void Init(int32_t rows, int32_t cols)
Definition: ground_struct.h:52
int32_t cols() const
Definition: ground_struct.h:92
int32_t rows_
Definition: ground_struct.h:100
std::vector< GroundNode > data_
Definition: ground_struct.h:98
std::vector< GroundNode * > nodes_
Definition: ground_struct.h:99