Skip to main content

Resetting

In both the Javascript and Python interfaces, the Solver class has a reset method that allows the user to reset the state of the solver given new objective, weights and a new robot state. In this case, the robot state only needs to supply the joints and origin field, as shown in the initialization example.

ParameterTypeOptionalDescription
stateStatenoThe new state will replace the original one in the next cycle of calculation
weightslook-up table of float value indexed by string keynoThe new weights will replace the original one in the next cycle of calculation
solver.reset(
// A new state with origin and joint properties
{
origin:{
translation:[0,0,0],
rotation:[1,0,0,0]
},
joints:{
panda_joint1:0.0,
panda_joint2:0.0,
...
}
},
// Weights
{
myObjective:0.5
}
)