MPPI opt

slove(wrap_mpc)

  • input: goal,current_state,seed(int_act)
  • output: act_seq(optimiazed),act

optimize(wrap_base)

  • decide which optimizer to use

optimize(opt_base)

  • opt_tensor: [n_problems, action_horizon, d_action]

_optimize(opt_base)

  • abstractmethod

_optimize(particle_opt__base)

  • decide whether use cuda graph

_run_opt_iters(particle_opt_base)

  • update act_seq alone timeline

  • genertate trajectory

  • update distribution

    generate_rollouts

    • sample actions from init action
    • rollout_fn->traj
      1. act—(forward)—state
      2. cost_seq

    _cal_val

    • calculate cost and value cost