bolero.representation
.DMPBehavior¶bolero.representation.
DMPBehavior
(execution_time=1.0, dt=0.01, n_features=50, configuration_file=None)[source]¶Dynamical Movement Primitive.
Can be used to optimize the weights of a DMP with a black box optimizer. This is a wrapper for the optional DMP module of bolero. Only the weights of the DMP will be optimized. To optimize meta-parameters like the goal or the goal velocity, you have to implement your own wrapper. This can be a subclass of this wrapper that only overrides the methods that provide access to the parameters.
An object can be created either by passing a configuration file or the specification of a DMP. A DMP configuration file describes all parameters of the DMP model and it is not recommended to generate it manually.
Parameters: |
|
---|
can_step
()[source]¶Returns if step() can be called again.
Note that calling step() after this function returns False will not result in an error. The velocity and acceleration will be set to 0 and we hold the last position instead.
Returns: |
|
---|
get_args
()¶Get parameters for this estimator.
Returns: |
|
---|
get_outputs
(outputs)[source]¶Get outputs of the last step.
Parameters: |
|
---|
get_params
()[source]¶Get current weights.
Returns: |
|
---|
imitate
(X, Xd=None, Xdd=None, alpha=0.0, allow_final_velocity=True)[source]¶Learn weights of the DMP from demonstrations.
Parameters: |
|
---|
init
(n_inputs, n_outputs)[source]¶Initialize the behavior.
Parameters: |
|
---|
load_config
(filename)[source]¶Load DMP configuration.
Parameters: |
|
---|
save
(dmp, filename)¶Save DMP model.
Parameters: |
|
---|
save_config
(filename)[source]¶Save DMP configuration.
Parameters: |
|
---|
set_inputs
(inputs)[source]¶Set input for the next step.
In case the start position (x0) has not been set as a meta-parameter we take the first position as x0.
Parameters: |
|
---|
set_meta_parameters
(keys, meta_parameters)[source]¶Set DMP meta parameters.
Permitted meta-parameters:
Parameters: |
|
---|