NimbRo ROS Soccer Package
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
behaviourcontrol Namespace Reference

This namespace defines everything that is required for the Behaviour Control Framework. More...

Classes

class  Behaviour
 Implements a single behaviour. More...
 
class  ActuatorManager
 Implements a manager of a particular group of actuators. More...
 
class  ActuatorBase
 Implements a single actuator. More...
 
class  Actuator
 Implements a single actuator of a given data type. More...
 
class  Sensor
 Implements a single sensor of a given data type. More...
 
class  BehaviourLayer
 Implements a single behaviour layer. More...
 
class  BehaviourManager
 Implements a single behaviour manager. More...
 
class  SensorManager
 Implements a manager of a particular group of sensors. More...
 
class  SensorBase
 Implements a single sensor. More...
 

Typedefs

Sensor Typedefs

More synonyms have been included than you will normally ever need. Additional commonly-used typedefs (that have extra dependencies) can be added in the user's code. For example:

typedef Sensor<std::int64_t> SensorInt64 // Needs <cstdint>
typedef Sensor<std::uint64_t> SensorUInt64 // Needs <cstdint>
typedef Sensor<Eigen::Vector2f> SensorVec2f // Needs <Eigen/Core>
typedef Sensor<Eigen::Vector3f> SensorVec3f // Needs <Eigen/Core>
typedef Sensor<Eigen::Vector2d> SensorVec2d // Needs <Eigen/Core>
typedef Sensor<Eigen::Vector3d> SensorVec3d // Needs <Eigen/Core>
typedef Sensor< bool > SensorBool
 An sensor of data type bool
 
typedef Sensor< int > SensorInt
 An sensor of data type int
 
typedef Sensor< unsigned int > SensorUInt
 An sensor of data type unsigned int
 
typedef Sensor< long > SensorLong
 An sensor of data type long
 
typedef Sensor< unsigned long > SensorULong
 An sensor of data type unsigned long
 
typedef Sensor< long long > SensorLLong
 An sensor of data type long long
 
typedef Sensor< unsigned long
long > 
SensorULLong
 An sensor of data type unsigned long long
 
typedef Sensor< float > SensorFloat
 An sensor of data type float
 
typedef Sensor< double > SensorDouble
 An sensor of data type double
 
typedef Sensor< long double > SensorLDouble
 An sensor of data type long double
 
Actuator Typedefs

More synonyms have been included than you will normally ever need. Additional commonly-used typedefs (that have extra dependencies) can be added in the user's code. For example:

typedef Actuator<std::int64_t> ActuatorInt64 // Needs <cstdint>
typedef Actuator<std::uint64_t> ActuatorUInt64 // Needs <cstdint>
typedef Actuator<Eigen::Vector2f> ActuatorVec2f // Needs <Eigen/Core>
typedef Actuator<Eigen::Vector3f> ActuatorVec3f // Needs <Eigen/Core>
typedef Actuator<Eigen::Vector2d> ActuatorVec2d // Needs <Eigen/Core>
typedef Actuator<Eigen::Vector3d> ActuatorVec3d // Needs <Eigen/Core>
typedef Actuator< bool > ActuatorBool
 An actuator of data type bool
 
typedef Actuator< int > ActuatorInt
 An actuator of data type int
 
typedef Actuator< unsigned int > ActuatorUInt
 An actuator of data type unsigned int
 
typedef Actuator< long > ActuatorLong
 An actuator of data type long
 
typedef Actuator< unsigned long > ActuatorULong
 An actuator of data type unsigned long
 
typedef Actuator< long long > ActuatorLLong
 An actuator of data type long long
 
typedef Actuator< unsigned
long long > 
ActuatorULLong
 An actuator of data type unsigned long long
 
typedef Actuator< float > ActuatorFloat
 An actuator of data type float
 
typedef Actuator< double > ActuatorDouble
 An actuator of data type double
 
typedef Actuator< long double > ActuatorLDouble
 An actuator of data type long double
 
Miscellaneous Typedefs
typedef std::size_t index_t
 Used to represent an array or vector index (must be an unsigned type)
 
typedef float level_t
 Used to represent an activation level (raw activation levels should always be in the range [0,1])
 
typedef int ret_t
 Used to represent an error code/function return value.
 

Enumerations

enum  FuncReturnID {
  RET_OK = 0, RET_MISC_FAILURE, RET_NULL_POINTER, RET_PREVIOUS_FATAL_ERROR,
  RET_ALREADY_INITIALISED, RET_BIND_FAILED_NS, RET_BIND_FAILED_ANF, RET_BIND_FAILED_ASI,
  RET_INHIBITION_CYCLE
}
 Used to specify return values and error codes of certain behaviour control framework functions. More...
 

Functions

template<class T >
void addIfUnique (std::vector< T > &V, T &value)
 Add an element to a std::vector if an equivalent element (A == B) is not already in there. More...
 

Variables

const std::string nullString = ""
 Used to avoid the need for null string literals throughout the code.
 
const level_t LVL_ACTIVE = 1.0
 Used to signal that a behaviour wishes to be fully activated.
 
const level_t LVL_INACTIVE = 0.0
 Used to signal that a behaviour wishes to be fully deactivated.
 
const bool AGGREGATABLE = true
 Used in the Actuator constructor to explicitly specify an aggregatable actuator.
 
const bool NOT_AGGREGATABLE = false
 Used in the Actuator constructor to specify a non-aggregatable actuator.
 

Detailed Description

This namespace defines everything that is required for the Behaviour Control Framework.

Enumeration Type Documentation

Used to specify return values and error codes of certain behaviour control framework functions.

Enumerator
RET_OK 

Signals successful execution of a function, with no error conditions encountered.

RET_MISC_FAILURE 

Signals an unknown or unspecified error.

RET_NULL_POINTER 

Signals that an unexpected null pointer was encountered (usually as a function parameter)

RET_PREVIOUS_FATAL_ERROR 

Signals that an action was attempted despite a pre-existing fatal error condition.

RET_ALREADY_INITIALISED 

Signals that a duplicate call of a once-only initialisation function was attempted.

RET_BIND_FAILED_NS 

Signals that an attempt to bind a sensor to an actuator failed because of a null sensor signal name.

RET_BIND_FAILED_ANF 

Signals that an attempt to bind a sensor to an actuator failed because no actuator of a suitable name was found.

RET_BIND_FAILED_ASI 

Signals that an attempt to bind a sensor to an actuator failed because of an actuator/sensor data type incompatibility.

RET_INHIBITION_CYCLE 

Signals that a cycle was detected in the behaviour inhibition definitions of a layer.

Function Documentation

template<class T >
void behaviourcontrol::addIfUnique ( std::vector< T > &  V,
T &  value 
)

Add an element to a std::vector if an equivalent element (A == B) is not already in there.

This helper function is used internally by the BehaviourLayer class while resolving the inhibition structure.

Parameters
VThe std::vector to append a value to.
valueThe value to append.