MCZhi/DIPP

Potential bug in bicycle dynamics

Closed this issue · 2 comments

Hi,

First of all, thank you for sharing your code and the great work.

I have a question regarding the following line in the bicycle_model function:

d_theta = v.detach() * delta / L # use delta to approximate tan(delta)

Is it intentional that you detach v here, or is this a bug? If it is intended, could you please explain why you detach the velocity?

Best,
Chris

MCZhi commented

Hi @diehlornodeal, thank you for your interest in the project and for reaching out with your question.

The use of detach() on the velocity v was intentional because the earlier version of Theseus was quite slow, and detaching the speed was found to help speed up the solver without compromising performance. However, now that the solver speed of Theseus has been substantially improved, detaching v may not be necessary anymore. I have accordingly removed the detach() operation.

Hi @MCZhi, thank you for the quick response. I close this issue.