tud-airlab / mppi_torch

15 stars 3 forks source link

Did the halton-spline mode work #4

Open kkkkkaiai opened 3 months ago

kkkkkaiai commented 3 months ago

Dear author,

Hello! I have a question for the part of "halton-spline", the code in mppi.py is shown as below.

elif self.mppi_mode == 'halton-spline':
    # shift command 1 time step
    saved_action = self.mean_action[-1]
    self.mean_action = torch.roll(self.mean_action, -1, dims=0)
    self.mean_action[-1] = saved_action
    cost_total = self._compute_total_cost_batch_halton()

    action = torch.clone(self.mean_action)

In this part, the final 'action' is given by the mean of 'saved_action', and it only has a 'shift' operation and no other operations.

Is the method work, could you please explain this part. Thanks for your help.

Best wishes

cpezzato commented 1 month ago

Hi @kkkkkaiai, sorry for the late reply. In case of halton spline sampling, the self.mean_action is updated in _update_distribution.