ros-industrial-consortium / descartes

ROS-Industrial Special Project: Cartesian Path Planner
Apache License 2.0
127 stars 92 forks source link

Issue with Niryo One robot #251

Closed zakimohzani closed 3 years ago

zakimohzani commented 3 years ago

Hello guys,

Could you provide hints on how to debug this Niryo robot + IKFast + Descartes? I've marked the trajectory required within this video and it fails 50% of the time https://www.youtube.com/watch?v=7D3o2uG-hKA . The x-axis should follow the trajectory.

I've check the controller errors and they're 0 throughout the time. What else could be the cause of this?

I've also listed the problem + code here: https://answers.ros.org/question/372891/need-suggestions-in-debugging-descartes-niryo-see-video/ and so far I've not gotten any answers.

Thank you.

zakimohzani commented 3 years ago

I've tested IKFast based with a moveit demo_launch and there's no issue there. It plans and executes just fine.

zakimohzani commented 3 years ago

So in the quest of debugging this, I made 5 points as shown in this picture and used makeCartesianPoint() instead of makeTolerancedCartesianPoint();

Screenshot at 2021-03-04 10:19:51

And this resulted in the following: [ INFO] [1614824132.161127618]: Subscriber found, publishing markers. [ WARN] [1614824132.176168011]: Failed for find ANY joint poses, returning [ WARN] [1614824132.176305053]: Failed for find ANY joint poses, returning [ERROR] [1614824132.176374952]: calculateJointSolutions: IK failed for input trajectory point with ID = ID5 [ERROR] [1614824132.176519813]: calculateJointSolutions: IK failed for input trajectory point with ID = ID1 [ERROR] [1614824132.181752566]: Could not solve for a valid path

I'm not sure where is this interaction happening. Within Descartes or IKFast? Anyhow, I now plan to check if Moveit (+OMPL) can get to point to the 5th point.

zakimohzani commented 3 years ago
  1. Changed IKFast back to the default KDL.
  2. Descartes was complaining about the first point (X-axis pointing up) so I removed it. Now, we have 4 points as shown in the figure below.
  3. Works now. It can reach the last point (the end-effector points down).

Screenshot at 2021-03-04 13:32:49

Now, why did descartes+IKFast complain about not finding the last point (lowest point)? Did IKFast report an area without a solution? How can I visualise what IKFast is doing?

zakimohzani commented 3 years ago

Turns out the default precision used in IKFast only resulted in 90% coverage of all solutions. I could only bump it by increasing precision. That resulted in 97% coverage.

I'm not closing this topic yet until I reach 100% but I think maybe its more used under the Niryo / IKFast repos. Will close it when I can actually close it.

zakimohzani commented 3 years ago

Managed to skip this issue altogether with TrakIK. Will revisit if it's not fast enough but by then we'd use another robot.