pangtao22 / planning_through_contact

MIT License
41 stars 7 forks source link

impc: Support smoothing in rollout and forward dynamics #73

Open hjsuh94 opened 1 year ago

hjsuh94 commented 1 year ago

Currently, the way that irs_mpc_params.rollout_forward_dynamics_mode is implemented is a big bugged.

When we pass ForwardDynamics.SocpMp, ForwardDynamics.QpMp to irs_mpc, it would do fine. However, if we pass one of the smoothing modes such as ForwardDynamicsMode.kLogIcecream, it complains that kappa is set to nan because we never initialize it. (Probably same for randomized smoothing)

I think the reason is that we set a separate parameter for rollout (sim_p_rollout) since the original impc does rollout over true dynamics. But when we input the smoothing modes we never update the parameters of sim_p_rollout.

Will be submitting a fix soon.

pangtao22 commented 1 year ago

If we continue to develop this repo, we need some unit tests to keep the notebook examples running correctly.