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:

list[navground.core.Behavior]

The members of the group.

Type:

int

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 to Behavior.compute_cmd() to setup the group and call Behavior.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