Universal Robots Forum

Ur5 constant motion

Continuing the discussion from Choosing the right controller:

Hi,I have two questions.

I want to use the vel_joint_traj_controllerr to control ur5 constant motion (the end link keep one speed).I send a string points with constant vel but i cannot get constant motion. what can i do, i need change the pid values or …?

I try use the joint_group_vel_controller to control ur5 constant motion,but when i start this control,the ur5 urdf model falls in gazebo. I can not solve this problem

I need your help, thank you very much!

This question would better be asked on ROS answers, as I think, there aren’t too many ROS users in this particular community.

I’ll try to answer your question to the best of my knowledge, anyway…

The trajectory controllers define a trajectory by a set of setpoints consisting of joint positions, velocities, accelerations, jerks and a time. Let’s leave out acceleration and jerks for a moment, as they aren’t used by most controllers, anyway.

If we look at it in one dimension (one joint), a trajectory could look like the graph below. We have a trajectory containing of 4 waypoints:

  1. At time 0 we want to be at theta=1 with a (known, but not readable from the graph) velocity > 0
  2. At time 1 we want to be at theta=2 with velocity 0
  3. At time 2 we want to be at theta=1 with a (known, but not readable from the graph) velocity < 0
  4. At time 7 we want to be at theta=0 with velocity 0

The trajectory controller generates a spline connecting all of those waypoints. It is important to note that the velocities specified inside the trajectory specify the velocity in that waypoint, meaning the slope of the graph in that particular waypoint. (the acceleration being the curvature, and so on).

So, in this particular trajectory the joint will never have a constant velocity of that particular joint, as that’s the nature of how the spline interpolation of trajectories work.

So, if you’d like to have a joint moving at a specified, constant velocity, the velocity_controllers/JointGroupVelocityController would indeed be your friend. However, I think this is not defined inside the gazebo simulation controller specification, so you’d have to define it yourself.

As you are probably unloading the running controller and try to spawn an undefined controller, the gazebo model doesn’t have any active controller anymore and thus falls apart.

You could probably specify a velocity_controllers/JointGroupVelocityController inside your simulation’s controllers config similar to the joint_group_vel_controller inside the ur_robot_driver's controllers.yaml file

Thank you very much!
About vel_joint_traj_controller.I know interpolation model for ensuring trajectory continuous. I only want constant end_link speed, the constant model also is a trajectory continuous model.

About velocity_controllers/JointGroupVelocityController, I had done as your said in gazebo controllers.yaml file:

joint_group_vel_controller:
type: velocity_controllers/JointGroupVelocityController
joints:

  • shoulder_pan_joint

  • shoulder_lift_joint

  • elbow_joint

  • wrist_1_joint

  • wrist_2_joint

  • wrist_3_joint

    I try to use JointGroupVelocityController on real robot, the robot not fall down. But, the real robot can not get set speed, when we set the end velocity is 0.1, the real robot will run on 0.15 and when we set 0.5, real robot maybe is 0.09 (we set the demonstrator speed is 100%).