Behavior Group#
Behavior group holds a list of behaviors for which they compute control commands at once.
Calculates the commands for all behaviors at once.
Commands should (but not strictly required) be feasible.
This method is called each time the behavior at the first index requires a command.
Users must override this method to define a
BehaviorGroup
.- Parameters:
time_step – The time step
- Returns:
The commands.
- Type:
The members of the group.
- Type:
The size of the group
Members of a behavior group delegate the computation of their control commands to the group.
Warning
Users must call
Behavior.prepare()
before the first call toBehavior.compute_cmd()
to setup the group and callBehavior.close()
after the last call to tear it down.Gets the key associated to the group.
Users can specialize this method when defining a new group/member pair. The default implementation returns 0, i.e., it groups all behaviors together.
- Returns:
The hash key.
Returns all groups.
Users must specialize this method when defining a new group/member pair.
- Returns:
All groups.
Makes a group.
Users must specialize this method when defining a new group/member pair.
- Returns:
The new group