UniversalRobots / Universal_Robots_ROS2_Driver

Universal Robots ROS2 driver supporting CB3 and e-Series
BSD 3-Clause "New" or "Revised" License
408 stars 212 forks source link

Planning precise straight line movements for UR10e with ROS2 #975

Closed shrutichakraborty closed 3 months ago

shrutichakraborty commented 5 months ago

Hi, I am using the UR10e robot with ROS2 Humble. I have to perform a couple of fine straight line motions for robotic tool changing, where all my waypoints are offsets in X,Y, Z directions. I am able to do this very simply via the teach pendant where I define speedL movements. However, I need to do this via ROS2 and as there is no cartesian planner, I had been trying the cartesian motion controller proposed by : https://github.com/fzi-forschungszentrum-informatik/cartesian_controllers and that was recommended also in the issues in this repo.

However, I have found after repeated testing that the IK solver with this repo results in random jumps and vibrations in the robots movement, and doesn't execute clean precise cartesian movement. I would like to know, instead of cartesian commands, if I record the waypoints as joint states instead, and use the scaled_joint_trajectory_controller and the FollowJointTrajectory action, will this execute more straight line motions ? I am wondering this as using the joing trajectory controller means I use the robot's internal controller and trajectory generation for the motion and I am assuming is more reliable than other planners.

If not, what is the best slution? Would using moveit be the only recommended solution for getting clean precise straight line movements?

Is there any other way to execute SpeedL commands on the robot via ROS2? Where I can ensure the path that is planned is always straight line? Its quite critical that the motions planned are straight line; we have had previous experience where after moveit planning the robot executed a full circle motion rather than move in a straight line between a point A and B, but as the applictaion here is quite delicate, any errors could damage the tools attached.

Thanks a lot!

firesurfer commented 5 months ago

You probably want to setup Moveit2 with the Pilzplanner. This planner is also available for ROS2.

fmauch commented 3 months ago

I'll close this issue as the proposed solution seems to be appropriate for the question.