BehaviourGroup

class mobrob_behcon.behaviours.behaviourgroup.BehaviourGroup(name)[source]

The class BehaviourGroup

Attributes

name

Name of behaviourgroup

resolver

resolver

percept_space

percept_space

Methods

__init__(name)

constructor

activate_exclusive()

Activate this behaviourgroup, so set all behaviours in this behaviourgroup as active so that resolver can trigger them

add(behaviour, priority)

function to add an behaviour to behaviourgroup

deactivate()

deactivate the behaviour group

set_error(code)

Set error state of this behaviourgroup.

set_percept_space(percept_space)

Set the reference to percept_space

set_resolver(resolver)

Set the reference to resolver

set_success(code)

Set success state of this behaviourgroup.

Details

__init__(name)[source]

constructor

Parameters

name (string) – name of behaviourgroup

activate_exclusive()[source]

Activate this behaviourgroup, so set all behaviours in this behaviourgroup as active so that resolver can trigger them

add(behaviour, priority)[source]

function to add an behaviour to behaviourgroup

Parameters
  • behaviour (inherited class of Behaviour) – reference to behaviour

  • priority (int) – priority of behaviour in this behaviourgroup [0-100]

deactivate()[source]

deactivate the behaviour group

set_error(code)[source]

Set error state of this behaviourgroup. With the error code some more information about the error can be given.

Parameters

code (int, optional) – error code, defaults to 0

set_percept_space(percept_space)[source]

Set the reference to percept_space

Parameters

percept_space (PerceptualSpace) – relevant percept_space object

set_resolver(resolver)[source]

Set the reference to resolver

Parameters

resolver (Resolver) – relevant resolver object

set_success(code)[source]

Set success state of this behaviourgroup. With the success code some more information about the success can be given.

Parameters

code (int, optional) – success code, defaults to 0