0
$\begingroup$

Rosanswers logo

Hello everyone,

I have the following two issues to solve:

#1 I would like to control the velocity of the path execution of the UR5 robot. At the moment, I'm using the UR5 ROS-Industrial driver and MoveIt!. In the test_move.py of UR driver I've found a velocity vector, which is somehow looking like 'velocities=[0]*6'. In my application I would like to call the velocity function in C++ or Python code. Maybe someone could tell me how to use or call the velocity functions for path planning and executing.

#2 The second issue is, that I would like to record and replay a trajectory, which was calculated by the MoveIt! pathplanning. The idea behind this is to recall the existing trajectory instead of calculating it every time for a well known path. Solutions, which came into my mind are to record a bagfile for trajectory topic or to use the MongoDB. I'm not sure if this approach is the correct one. Particularly, I don't want to set up a database to record a trajectory in case of MongoDB. A single data file containing the trajectory values would be suitable for my issue.

Thanks for helping in advance. You will also find this post in the ROS-I mailinglist, but after quite some time of waiting I din't get any answers.


Originally posted by NRW_ROS on ROS Answers with karma: 13 on 2015-03-02

Post score: 1


Original comments

Comment by Carollour on 2015-10-29:
Were you able to find a solution for #2?

Comment by NRW_ROS on 2015-11-11:
Sadly not.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

I would like to control the velocity of the path execution of the UR5 robot.

Do you want to specify velocity constraints on path segments, or are you after actual velocity control (ie: control joint velocity instead of position)?

If the former: that is already supported, and should be specified in the trajectory that is send to the control_msgs/FollowJointTrajectoryAction Action server setup by the ur_driver. I just remembered: the current ur_driver does not actually use the velocity field in a JointTrajectoryPoint. Velocity (and also acceleration) are derived from the time_from_start field each JointTrajectoryPoint contains.

If the latter: the current ROS-Industrial driver for UR doesn't expose the velocity control functionality of the UR controller yet. There is however work ongoing to open up that interface for use from ROS. In the mean-time, you might want to look at alternatives, such as urx.


Actually, I want to specify the velocity on path segment like you described in your first solution. I’ve found the time_from_start in the JointTrajectoryPoint Message. But how to use and set velocity values properly?

Isn't time_from_start automatically calculated (and then recalculated in ur_driver)? Afaicr I've never had to set those fields manually. Especially not when using MoveIt. If you do need to set it by hand, then time_from_start for point n should be the time at which the previous segment should be finished. So for a distance x (whatever 'distance' means in your particular case) and velocity v, time_from_start for point n+1 should be (time_from_start for n) + x/v, if I'm not mistaken (see also Moving the arm using the Joint Trajectory Action - 1.4: The trajectory message).


Originally posted by gvdhoorn with karma: 86574 on 2015-03-02

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by NRW_ROS on 2015-03-04:
Actually, I want to specify the velocity on path segment like you described in your first solution. I’ve found the time_from_start in the JointTrajectoryPoint Message. But how to use and set velocity values properly?

Comment by NRW_ROS on 2015-03-04:
ATM Im using the MoveGroupInterface from MoveIt! and computeCartesianPath function for calculating a path. To get a trajectory I’m using robot_trajectory::RobotTrajectory and IterativeParabolicTimeParameterization to fill the trajectory with velocity values.Afterwards, Im executing the path.

Comment by homesick-nick on 2016-08-05:
Hello all, Late to the party but I'm also very interested to understand how to do velocity control. Specifically I would like to be able to execute a constant linear velocity. Changing the time from start only affects average velocity. Is there a way round this that anyone knows of? Cheers

Comment by araujokth on 2016-08-17:
Hi, did you find a solution for #1? I was wanting to do velocity control of the tip of the UR5 robot, but if I understood your question correctly, that is not possible to be done?

Comment by gvdhoorn on 2016-08-18:
The ur_modern_driver does expose a velocity interface to the UR controller via a ROS topic, but it currently only supports this in joint space. You could perhaps use the /ur_driver/URScript topic to send speedl(..) commands directly.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.