Everything that has to be stored not only temporarily in BOLeRo is located
in bolero.representation
.
The purpose of this library is learning behaviors. Behaviors typically
implement the interface Behavior
. It is
important to know that there are some conventions regarding the inputs and
outputs of the generic behavior interface:
DMPBehavior
generates a set of positions,
velocities and accelerations in Cartesian space or in joint angle space and
then they expect to get back the same information from a sensor that
measures the actual positions, velocities and accelerations. However, that
does not have to be the case for other kind of behaviors.pppvvvaaa
. The reason is that it is easy to
extract e.g. the position vector with a slice from the output vector.The following table gives an overview of the behaviors that are provided by BOLeRo.
Behavior name | Usecase | Inputs | Outputs | Parameters |
---|---|---|---|---|
Constant | anything | anything | constant | none |
Random | anything | anything | random | none |
Linear | anything | anything | linear combination of the inputs | weights of the linear mapping |
Dummy | function optimization | parameters | will be used as output | allows direct optimization of the objective function |
Dynamical Movement Primitive | trajectories in joint space or Cartesian space | positions, velocities, accelerations | positions, velocities, accelerations | weights of the internal function approximator |
Sequence of DMPs | trajectories in joint space | positions, velocities, accelerations | positions, velocities, accelerations | weights of the internal function approximators and subgoals |
A ConstantBehavior
always produces a constant output that cannot
be changed. It can be used as a behavior baseline.
A RandomBehavior
always produces a random output that is completely
random and normal distributed. It can be used as a behavior baseline.
A LinearBehavior
generates a linear mapping \(y = W x\) from
an input vector \(x\) (with an additional bias component that is always 1)
to an output vector \(y\).
A DummyBehavior
always produces the output that has been given as
parameters from the optimizer. It can be used in cases where no behavior is
required actually, e.g. for plain function optimization or where the behavior
is encoded in the environment.
Dynamical movement primitives represent trajectories DMPBehavior
, e.g.
in joint space. They can generalize over several meta-parameters (goal,
velocity at the goal, execution time) and can be learned from demonstrations.
A variant of DMPs that works in Cartesian space is
CartesianDMPBehavior
.
bolero.representation.CartesianDMPBehavior
¶We can learn a sequence of DMPs. In the class DMPSequence
allows us to
optimize the DMP weights and the subgoals of the DMPs.