Controll velocity of a robotarms end effector while following a trajectory?

asked 2018-10-11 05:24:49 -0600

Kluun gravatar image

Hello everyone,

The system i am using is ROS kinetic and Ubuntu 16.04.

I am working with a robotarm that need to follow a trajectory at a constant set velocity. While testing the program i notice that the robotarms velocity is different for each point. My program is using 'computeCartesianPath' to calculate the path from multiple point. The distant between each point is different (the point come out and automatic generated file).

Is there a way possible to control the end effector speed of the robotarm and how is it done?

edit retag flag offensive close merge delete

Comments

I have the same issue. Have you solved this?

DieterWuytens gravatar imageDieterWuytens ( 2019-03-19 11:32:24 -0600 )edit

I sort of solved it. What i did was to decrease the step size (eef_step) of the computeCartesianPath so de distance between points of trajectory are always the same distance. After that i calculated the time the robot needs to take to go from on point to the next, with the required velocity. The next step is to changes the generated trajectory time and joint velocity values. I created a new trajectory, but that is not necessary.

For the time part of the trajectory you need to constantly add the calculated time by the time_from_start value of the trajectory frame. Do not just file in the calculated time, but added it with the time of the previous point.

Kluun gravatar imageKluun ( 2019-03-21 04:26:07 -0600 )edit

For the joint velocity you need to calculated the velocity of each joint for that point. To calculate is you can use the velocity formula (distance moved / time). With distance moved is equal to the joint position difference between the current en previous point and time is equal to calculated time. THE FIRST AND LAST POINT HAVE A VELOCITY OF 0.

Kluun gravatar imageKluun ( 2019-03-21 04:26:54 -0600 )edit

It is not perfect but it worked. I would advice to look into Descartes. This package has somthing like this build in.

Kluun gravatar imageKluun ( 2019-03-21 04:27:49 -0600 )edit

@Kluun: if you feel up for it, you might consider wrapping your algorithm into a reusable library. If you do that, others could benefit as well.

Eventually you might even consider creating a MoveIt compatible time parameterisation plugin, which would make using this with MoveIt straightforward.

gvdhoorn gravatar imagegvdhoorn ( 2019-03-21 05:43:59 -0600 )edit