bolero.representation
.CartesianDMPBehavior¶bolero.representation.
CartesianDMPBehavior
(execution_time=1.0, dt=0.01, n_features=50, configuration_file=None)[source]¶Cartesian Space Dynamical Movement Primitive.
Can be used to optimize the weights of a Cartesian Space DMP with a black box optimizer. This is a wrapper for the optional DMP module of bolero. Only the weights of the Cartesian Space 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 Cartesian Space DMP. A Cartesian Space DMP configuration file describes all parameters of the DMP model and it is not recommended to generate it manually.
Note that it is possible to change the trajectory significantly by setting the start and goal. However, do not expect to be able to convert the DMP between coordinate frames by setting only the start and goal. Because the position and the orientation parts are handled separately, this will result in completely different trajectories.
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, 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.
Parameters: |
|
---|
set_meta_parameters
(keys, meta_parameters)[source]¶Set DMP meta parameters.
Permitted meta-parameters:
Parameters: |
|
---|