leggedrobotics / ocs2

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

DDP controller does not generate a stable rollout. #10

Closed mustang66ytz closed 2 years ago

mustang66ytz commented 3 years ago

Describe the bug what(): DDP controller does not generate a stable rollout.

To Reproduce Steps to reproduce the behavior: I basically modified the mobile manipulator example by changing the UR robotics arm to a Kinova robotics arm, and I have ignored the constraints from the self collision

Expected behavior The mobile manipulator with kinova arm should converge its end-effector to the interactive marker.

Screenshots If applicable, add screenshots to help explain your problem. ocs2_ddp_unstable_rollout

https://user-images.githubusercontent.com/24708005/128676863-50c78ee3-6e80-4ade-9a1f-bcbcf6e2281e.mp4

I would like to understand from the algorithmic aspect why this error occurs, thanks for any suggestions or guidance!

farbod-farshidian commented 3 years ago

We have extended the mobile manipulator example to many different commercially available robotic arms. This feature is under review and will be merged soon. I will post on this issue once the feature is incorporated.

dHonerkamp commented 2 years ago

Hi, I'm facing a similar issue trying to integrate the PR2 robot. Do you maybe have an update on the integration of these arms @farbod-farshidian ? It would be very useful to see some more examples.

A second question I am facing is how to incorporate joint limits for a new robot? I could not find any example of this for the existing robots. While the mobile manipulator docs mentions it, it only implements joint velocity limits. Do I add this with an additional StateConstraint?

farbod-farshidian commented 2 years ago

A second question I am facing is how to incorporate joint limits for a new robot? I could not find any example of this for the existing robots. While the mobile manipulator docs mentions it, it only implements joint velocity limits. Do I add this with an additional StateConstraint?

It would be best if you do this through a StateConstraint. You can then add this as a soft constraint with DoubleSidedPenalty.

Mayankm96 commented 2 years ago

We have now updated the mobile manipulator example with joint position constraints as well as more robotic examples. These include the Franka Panda arm, the Kinova Jaco2, PR2, and Clearpath Ridgeback with the UR5 arm on it. Please check the documentation on how to run these:

https://leggedrobotics.github.io/ocs2/robotic_examples.html#mobile-manipulator

As a heads up, since we don't have these robotic platforms, we have not tested them outside of the dummy simulation node. We happily welcome contributions to it! :)