Replies: 8 comments
-
Hi @EcustBoy. This looks like you have a zero jacobian matrix, which possible means that you have some cost weights set to zero, or that your error is zero at that point. Do you have some code to reproduce this error? |
Beta Was this translation helpful? Give feedback.
-
Thanks for your reply~ I later debugged step by step, as you said, found that when some specific cost term were sparse (exists some zero value or even all zero value), such error would be reproduced. Then I try the following several methods: (1) directly remove the specific sparse cost term, and make sure the rest cost terms are dense(no zero value) (2) redesign the specific sparse cost term to dense form(no zero value) And I found method (1) still doesn't solve the problem, the same error still exists, while method (2) can solve it. so my problems are:
I'll thanks much for your more advice ~ |
Beta Was this translation helpful? Give feedback.
-
After your changes in 1), are you getting exactly the same error? Or is it a singular matrix, but not necessarily zero? |
Beta Was this translation helpful? Give feedback.
-
Thanks for your quick reply~
|
Beta Was this translation helpful? Give feedback.
-
Is it possible for you to share a script that reproduces this error? There can be many reasons why this error occurs, it's hard to offer advice w/o knowing more details about your use case. |
Beta Was this translation helpful? Give feedback.
-
Hi @EcustBoy. Any updates on this? Can we close this issue? |
Beta Was this translation helpful? Give feedback.
-
Hi author~ I change the original variable from vehicle trajectory position to vehicle control (i.e. accelaration and steering rate), so the original cost function formation also changed, and I guess it helps avoid jacobian matrix to be irreversible. now it seems my motion planner runs normally now during training. But actually I don't know exactly the theoretical explanation for such case :-) Finally I also wanna know whether the theseus optimizer design specific trick to avoid such case? (e.g. add some tiny units matrix to original jacobian matrix) Thank you very much for your patient reply~~ can you take time to answer my above doubts or give some suggestions finally? then the issue can be closed I think~ |
Beta Was this translation helpful? Give feedback.
-
Hi @EcustBoy. Were you using our motion planning code when you started getting this error? Sorry I can't offer an explanation yet, since I don't have the full details of what you were doing. With regards to the optimizer, you can use LevenbergMarquardt which adds some damping terms to the hessian approximation to account for ill-conditioned systems. The valid Let me know if you have any other questions. |
Beta Was this translation helpful? Give feedback.
-
❓ Questions and Help
Hi author~ I try to use theseus in my motion planner model, and I design some type of cost based on th.AutoDiffCostFunction, and add them to objective, but when I start run it, during gradient backward step, the following type of error will occur:
There was an error while running the linear optimizer. Original error message: torch.linalg.cholesky: For batch 0: U(X,X) is zero, singular U.. Backward pass will not work. To obtain the best solution seen before the error, run with torch.no_grad()
(X means number unfixed number, e.g. 2)
I wanna what's the possible reason
Beta Was this translation helpful? Give feedback.
All reactions