Class OccupancyGrid

Nested Relationships

Nested Types

Inheritance Relationships

Base Type

  • public beluga::BaseOccupancyGrid2< OccupancyGrid >

Class Documentation

class OccupancyGrid : public beluga::BaseOccupancyGrid2<OccupancyGrid>

Thin wrapper type for 2D nav_msgs/OccupancyGrid messages.

Public Functions

inline explicit OccupancyGrid(beluga_ros::msg::OccupancyGridConstSharedPtr grid)

Constructor.

Parameters:

grid – Occupancy grid message.

inline const Sophus::SE2d &origin() const

Get the occupancy grid origin in the occupancy grid frame.

inline std::size_t size() const

Get the size of the occupancy grid (width() times height()).

inline const auto &data() const

Get a reference to the underlying data storeage (ie. a row-major array).

inline std::size_t width() const

Get the width of the occupancy grid.

inline std::size_t height() const

Get the height of the occupancy grid.

inline double resolution() const

Get the resolution of the occupancy grid discretization, in meters.

Public Static Functions

static inline auto value_traits()

Get the traits for occupancy grid value interpretation.

struct ValueTraits

Traits for occupancy grid value interpretation.

Assumes a standard ROS trinary interpretation.

Public Static Functions

static inline bool is_free(std::int8_t value)

Check if the given value corresponds to that of a free cell.

static inline bool is_unknown(std::int8_t value)

Check if the given value corresponds to that of a cell of unknown occupancy.

static inline bool is_occupied(std::int8_t value)

Check if the given value corresponds to that of an occupied cell.

Public Static Attributes

static constexpr std::int8_t kFreeValue = 0

Free value in the standard ROS trinary interpretation.

static constexpr std::int8_t kUnknownValue = -1

Unknown value in the standard ROS trinary interpretation.

static constexpr std::int8_t kOccupiedValue = 100

Occupied value in the standard ROS trinary interpretation.