personalrobotics / ada_ros2

ROS2 Hardware Interface and Description for the ADA Robot
BSD 3-Clause "New" or "Revised" License
2 stars 1 forks source link

Move to Pick IK to Avoid Singularities in MoveIt Servo #25

Closed amalnanavati closed 11 months ago

amalnanavati commented 11 months ago

Description

As documented in this blog post, using IK as opposed to the inverse jacobian during cartesian control can help the robot avoid singularities. That blog post indicates that bio_ik might be a good choice, however a later post indicates that pick_ik is a better implementation than bio_ik. Hence, we go with pick_ik.

This PR replaces MoveIt's standard kinematic solver for ADA, which was formerly KDL, with PickIK. It then passes the kinematics parameter to MoveIt Servo, making MoveIt Servo use IK instead of the inverse jacobian. It also tunes the singularity parameters of MoveIt Servo slightly to better avoid singularities.

Note that in practice, although PickIK makes it less likely for the robot to fall into singularities, it still can, and in those cases manual joint control (which is often un-intuitive) is the only way out.

Testing

Run MoveIt Servo as documented in the README. Try to get into singularities, and verify that it is harder to do so than before. (To experience what it was like before, comment out the kinematics plugin in demo.launch.py)