Robotics StackExchange | Archived questions

Troubles achieving accurate and straight-line movements with a 6 DOF robotic arm in MoveIt2 using ROS 2 Foxy

I'm working with a 6 DOF robotic arm in MoveIt2 using ROS 2 Foxy. My goal is to be able to activate a switch on the wall whose pose I already know (using ZED2i vision). I also have a series of approach points at 10, 20, 30, and 40 cm perpendicular to the wall of the target. I'm having some issues in performing this task accurately and conveniently. image description

1) When making an initial approach by moving to the 40 cm position, I can't reach the point accurately. The end effector always arrives with some error. I have tried reducing tolerances, using all the OMPL planners (PRMstar gives me the best results, as it avoids unnecessary rotations and provides somewhat logical and natural movements, although it takes more time), and different KDL IK solvers. The temporary solution I found so far is to resend the same point 2 or 3 times until it actually reaches it, but it's not ideal. I think I could improve it by using Trac IK, but I haven't been able to make any port work in ROS2 Foxy.

2) I'm having trouble executing straight lines from the approach position to the final target. I have tried applying orientation constraints without success. I also attempted to use Cartesian paths, but the behavior becomes completely erratic, and the movement is performed at maximum speed (which doesn't make sense to me). Does anyone have any experience in achieving the final movement in a straight line, or at least with a fixed orientation of the end effector?

Asked by angcorcue2 on 2023-05-23 03:05:45 UTC

Comments

  1. plan() returns a value that says whether or not it succeeded 100%. Are you checking this value?

  2. Are you sure there is a joint solution which gets the eef to all the poses you are requesting without moving the base? I can't be sure, but the construction of that arm does not look like 6 DOF to me.

  3. Is one of those joints sliding (linear?). That's unusual, and I'm not sure how well IK will handle that.

Asked by Mike Scheutzow on 2023-05-23 07:45:17 UTC

That sliding joint is given the name "prismatic", and it does seem to be supported. Also question #q152591 seems relevant.

Asked by Mike Scheutzow on 2023-05-23 08:04:34 UTC

  1. Regarding this, I would like to apologize. I have been making mistakes in visualizing my position relative to the target. Although I am reaching the target with very good accuracy, I have to use PRMstar or RTTStart with planning times of 10 seconds or more to find plans that are not too strange and unintuitive.

  2. Yes, it is a 6-DOF arm: Waist, Shoulder, Elbow, Elbow Rot, Wrist, Wrist Rot. I can verify that all the points can be reached by gradually moving the joints in the visual interface of RViz without any problem.

  3. No, none of the joints are linear sliders.

I'm still unable to find a way to make a straight-line trajectory work for the end effector.

Thank you very much for your help, I truly appreciate your time!

Asked by angcorcue2 on 2023-05-23 14:38:37 UTC

Answers

I have been making mistakes in visualizing my position relative to the target. ... I am reaching the target with very good accuracy

It sounds like you resolved the pose accuracy issue on your own.

For the issue of how fast the arm executes the path, you control that using the API. You can verify what plan() did by printing the timestamp field that it populated for each waypoint in the plan.joint_trajectory.points list.

Asked by Mike Scheutzow on 2023-05-24 16:03:16 UTC

Comments