Resolver

class mobrob_behcon.core.resolver.Resolver[source]

The class Resolver

It resolves a output for the actuators from given desires. Currently it understands desires fo following type:

  • DesCmdVel

Methods

__init__()

Construct a new 'Resolver' object.

add_desire(desire)

Add new desire to resolver

get_current_time()

Get current time in milliseconds

reset()

Reset all lists (desires and behaviours)

resetDesires()

Reset all desire lists

resolveDesire(lst_desires)

function to resolve a value from a list of similar desires

runOnce()

Run one cycle of the resolver to calculate output values and publish corresponding messages

set_behaviour_lst(behaviours)

set the new active behaviour list

Details

__init__()[source]

Construct a new ‘Resolver’ object.

Returns

returns nothing

add_desire(desire)[source]

Add new desire to resolver

Parameters

desire (Desire) – a desire to be added to the resolver

Returns

returns nothing

static get_current_time()[source]

Get current time in milliseconds

Returns

time in milliseconds

reset()[source]

Reset all lists (desires and behaviours)

resetDesires()[source]

Reset all desire lists

resolveDesire(lst_desires)[source]

function to resolve a value from a list of similar desires

Parameters

lst_desires (list[Desire]) – a list of desires (all items of the same type)

Returns

returns the resolved value (depending on type of value in desire, can also be an array)

runOnce()[source]

Run one cycle of the resolver to calculate output values and publish corresponding messages

set_behaviour_lst(behaviours)[source]

set the new active behaviour list

Parameters

lst_behaviour (list(Behaviour)) – list of behaviour which are currently active