This class defines a modulated social margin that may be added to the safety margin around Neighbor for behaviors that uses the GeometricState. The social margin is assigned to the neighbor’s Neighbor::id and it is modulated by the neighbor current distance.
A modulation that quadratically interpolates between 0 and the input margin, returning the input margin above upper_distance. The slope is 0 at distance 0.
Social margin#
This class defines a modulated social margin that may be added to the safety margin around Neighbor for behaviors that uses the GeometricState. The social margin is assigned to the neighbor’s Neighbor::id and it is modulated by the neighbor current distance.
Public Functions
Constructs a new instance.
value – [in] The default value of social margins
Gets the modulation.
The modulation.
Sets the modulation.
value – [in] The desired modulation
Get the value, ignoring type and distance.
The social margin
Set the default value, ignoring type.
value – [in] The desired social margin
Get the value for a specific type, ignoring distance.
type – [in] The neighbor type
The social margin
Set the value for the specified type.
type – [in] The neighbor type
value – [in] The desired social margin
Get the value for a specific type and distance.
type – [in] The neighbor type
distance – [in] The neighbor distance
The modulated social margin
Gets the stored [non-modulated] value for the specific type.
type – [in] The neighbor type
The stored social margin
Gets the default value.
The default social margin.
Gets the stored [non-modulated] values for the specific types.
A map of type -> social margin.
Gets the maximal possible value across all types.
The maximal value.
A modulation that leaves the margin unchanged.
A modulation that linearly interpolate between 0 and the input margin, returning the input margin above
upper_distance
Public Functions
Constructs a new instance.
upper_distance – [in] The upper distance
A logistic modulation.
Abstract modulation: maps a pair (margin, distance) to a margin.
Subclassed by navground::core::SocialMargin::ConstantModulation, navground::core::SocialMargin::LinearModulation, navground::core::SocialMargin::LogisticModulation, navground::core::SocialMargin::QuadraticModulation, navground::core::SocialMargin::ZeroModulation
A modulation that quadratically interpolates between 0 and the input margin, returning the input margin above
upper_distance
. The slope is 0 at distance 0.A modulation that always return 0.