Difference between the collision_constraint_config
and collision_cost_config
#103
-
I'm checking the car seat example. My question is what is the difference between the collision cost and collision constraint?
As I understand, when the distance between the generated path and an object in the environment is less than the safety margin this path will be given a cost depend on the coeff. The goal is to get a path with the lowest cost. How does it works for the constraint? If the distance between the generated path and an object in the environment is less than the safety margin this path is not acceptable? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
If you only set the collision as a cost it is not guaranteed to be collision-free the solver will just try to minimize it as best it can. If it is a constraint the solver will fail if any contact is within the safety margin. Now you may be wondering they why would you add it as a cost. In some complicated environments running the solver first with a collision as cost followed by running it again as a constraint performs better. Where if you added it as a constraint to start it may just fail because the initial state is in the infeasible region. I have also had good luck adding collision as both a cost and constraint with different safety margin distances. |
Beta Was this translation helpful? Give feedback.
If you only set the collision as a cost it is not guaranteed to be collision-free the solver will just try to minimize it as best it can. If it is a constraint the solver will fail if any contact is within the safety margin. Now you may be wondering they why would you add it as a cost. In some complicated environments running the solver first with a collision as cost followed by running it again as a constraint performs better. Where if you added it as a constraint to start it may just fail because the initial state is in the infeasible region. I have also had good luck adding collision as both a cost and constraint with different safety margin distances.