Closed mitsui29 closed 2 months ago
Hi, @mitsui29. Thanks for bringing this up!
You are correct in that the cost term in Eq. (8) should be the 2-norm and not the 2-norm squared. Likewise, there should not be a square in Eqs. (17), (18), (19), and (20e).
However, the code is correctly implemented because we choose the CBF as the distance, not the distance squared: https://github.com/HybridRobotics/cbf/blob/d3412d229cd957a215b2ca562ca505fc4a4a33f8/control/dcbf_optimizer.py#L133-L138 https://github.com/HybridRobotics/cbf/blob/d3412d229cd957a215b2ca562ca505fc4a4a33f8/models/geometry_utils.py#L111
Also, the optimal solutions of the dual problem Eq. (10) and the dual of Eq. (8) with 2-norm squared are related. We explicitly make this transformation in the code: https://github.com/HybridRobotics/cbf/blob/d3412d229cd957a215b2ca562ca505fc4a4a33f8/models/geometry_utils.py#L113-L114
Please let us know if you have any follow-up questions.
Dear Dr. Thirugnanam @AkshayThiru,
Thanks for your reply!This is exactly what I was confused about and your reply cleared it up for me. I still have some questions about this work:
I’m looking forward to your response. Thanks a lot! Mitsui
Hi, @mitsui29.
(mat_A, vec_b)
in the global frame) from the global frame to the robot frame. In the robot frame, the obstacle polytope is given by mat_A @ (robot_R @ z + robot_T) <= vec_b
, where z
is in robot frame. So, the obstacle in the body frame is given by the polytope (mat_A @ robot_R, vec_b - mat_A @ robot_T)
.Dear Dr. Thirugnanam @AkshayThiru, Thanks a lot!
Mitsui
Hi, @junzengx14 @AkshayThiru, Great works! I have questions about the dual-reformulation eq.10 and constraint ||λA|| ≤ 1. I derived the formula step by step from eq.8. But there's still an extra item -1/4 λ_i^T A_i^T A_i λ_i and no cone-costraint ||λA|| ≤ 1. I checked the convex_optimization from Stephen Boyd. In the chapter 8.2.2 we can find very similar dual formulation which is based on the norm2 distance(not the case in the paper mentioned, square distance form). So, could you please explain for this? Thanks a lot!
Mitsui