Discs#

#include "navground/sim/state_estimations/sensor_discs.h"
struct DiscsStateEstimation : public navground::sim::Sensor#

Perceive a fixed number of nearest neighbors and obstacles.

Empty places are filled with zeros

Registered properties:

Public Functions

inline explicit DiscsStateEstimation(ng_float_t range = default_range, unsigned number = default_number, ng_float_t max_radius = default_max_radius, ng_float_t max_speed = default_max_speed, bool include_valid = default_include_valid, bool use_nearest_point = default_use_nearest_point, unsigned max_id = default_max_id, const std::string &name = "")#

Constructs a new instance.

Parameters:
  • range[in] The range of view

  • number[in] Number of discs

  • max_radius[in] Maximal neighbor radius

  • max_speed[in] Maximal neighbor speed

  • include_valid[in] Whether to include validity

  • use_nearest_point[in] Whether to use nearest point as position

  • max_id[in] Maximal neighbor id

  • 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_number(int value)#

Sets the number of discs.

Parameters:

value[in] The new value

inline int get_number() const#

Gets the number of discs.

Returns:

The number of discs.

inline void set_max_radius(ng_float_t value)#

Sets the maximal neighbor radius.

Parameters:

value[in] The new value

inline ng_float_t get_max_radius() const#

Gets the maximal neighbor radius.

Returns:

The maximal radius.

inline void set_max_speed(ng_float_t value)#

Sets the maximal neighbor speed.

Parameters:

value[in] The new value

inline ng_float_t get_max_speed() const#

Gets the maximal neighbor speed.

Returns:

The maximal speed.

inline void set_include_valid(bool value)#

Sets whether to include validity.

Parameters:

value[in] The new value

inline bool get_include_valid() const#

Gets whether to include validity.

Returns:

Whether to include validity.

inline void set_use_nearest_point(bool value)#

Sets whether to use the nearest or the center as position.

Parameters:

value[in] The new value

inline bool get_use_nearest_point() const#

Gets whether to use the nearest or the center as position.

Returns:

Whether to use nearest point as position.

inline void set_max_id(int value)#

Sets the maximal possible id.

        Set to zero to not include ids.
Parameters:

value[in] The new value

inline int get_max_id() const#

Gets the maximal possible id.

Returns:

The maximal id.

Public Static Attributes

static const ng_float_t default_range = 1#

The default range

static const ng_float_t default_number = 1#

The default start angle

static const ng_float_t default_max_radius = 0#

The default maximal neighbor radius (zero means that it will include radii)

static const ng_float_t default_max_speed = 0#

The default maximal neighbor speed (zero means that it will not include velocities)

static const bool default_include_valid = true#

The default for whether to include validity

static const bool default_use_nearest_point = true#

The default for whether to use nearest point as position

static const unsigned default_max_id = 0#

The default maximal id (zero means that it will not include ids)