Boundary#

#include "navground/sim/state_estimations/sensor_boundary.h"
struct BoundarySensor : public navground::sim::Sensor#

Returns the distance to a rectangular boundary.

Registered properties:

Public Functions

inline explicit BoundarySensor(ng_float_t range = default_range, ng_float_t min_x = low, ng_float_t max_x = high, ng_float_t min_y = low, ng_float_t max_y = high, const std::string &name = "")#

Constructs a new instance.

Parameters:
  • range[in] The range of view

  • min_x[in] The minimal x coordinate

  • max_x[in] The maximal x coordinate

  • min_y[in] The minimal y coordinate

  • max_y[in] The maximal y coordinate

  • name[in] The name to use as a prefix

inline void set_range(ng_float_t value)#

Sets the range of view.

Parameters:

value[in] The new value

inline ng_float_t get_range() const#

Gets the range of view.

Returns:

The range of view.

inline void set_min_x(ng_float_t value)#

Sets the minimum x.

Parameters:

value[in] The value

inline ng_float_t get_min_x() const#

Gets the minimum x.

Returns:

The minimum x.

inline void set_max_x(ng_float_t value)#

Sets the maximum x.

Parameters:

value[in] The value

inline ng_float_t get_max_x() const#

Gets the maximum x.

Returns:

The maximum x.

inline void set_min_y(ng_float_t value)#

Sets the minimum y.

Parameters:

value[in] The value

inline ng_float_t get_min_y() const#

Gets the minimum y.

Returns:

The minimum y.

inline void set_max_y(ng_float_t value)#

Sets the maximum y.

Parameters:

value[in] The value

inline ng_float_t get_max_y() const#

Gets the maximum y.

Returns:

The maximum y.

Public Static Attributes

static const ng_float_t default_range = 1#

The default range

static const ng_float_t low = -std::numeric_limits<ng_float_t>::infinity()#

Default lower bound

static const ng_float_t high = std::numeric_limits<ng_float_t>::infinity()#

Default upper bound