leggedrobotics / ocs2

Optimal Control for Switched Systems
https://leggedrobotics.github.io/ocs2
BSD 3-Clause "New" or "Revised" License
874 stars 225 forks source link

External collision (obstacle) avoidance implementation #39

Closed akmandor closed 2 years ago

akmandor commented 2 years ago

Is there any available (in ROS Noetic) obstacle avoidance implementation that I can run as an example? I know that leggedrobotics/perceptive_mpc has that feature but it is not compiling in ROS Noetic and it seems like it is outdated after the recent updates on OCS2. I would appreciate if you can guide me on the implementation or point to any branch or repository that has the feature within the OCS2 framework.

rubengrandia commented 2 years ago

I don't think we have any public example of that at the moment. In principle this just becomes an inequality constraint on the distance between the robot and the obstacle (possible obtained from a signed distance field), which we typically implement as a soft contraint.

farbod-farshidian commented 2 years ago

We plan to open-source the method we recently introduced in this paper.

The self-collision pipeline is already available and used in the ocs2_mobile_manipulator examples. For environment avoidance, the automatic sphere decomposition of the robot is already online (ocs2_sphere_approximation). The missing parts are our interface to an SDF map and the function that defines a constraint based on this sphere approximation and the given SDF map.

akmandor commented 2 years ago

Have you released the code yet publicly?

c-salmi commented 1 year ago

Hi, I would also be interested in how to make ocs2_mobile_manipulator avoid collisions based on the sphere approximation of an SDF map.