newton.eval_mimic#
- newton.eval_mimic(model, state_in, state_out=None)[source]#
Update follower joint coordinates from their reference joints.
For each follower, this function reads every position and velocity coordinate of the reference joint, then writes the matching follower coordinates according to
Model.joint_mimic_coeffs. Independent joints are left unchanged. OnlyState.joint_qandState.joint_qdare written.If
state_outis omitted,state_inis updated in place. Otherwise, all joint coordinates are first copied fromstate_intostate_outand the followers are updated instate_out.- Parameters:
- Raises:
ValueError – If either state does not contain joint coordinate arrays.