-
Notifications
You must be signed in to change notification settings - Fork 341
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VelocityJointInterface unstable due to huge delay #55
Comments
I haven't seen this kind of behaviour before, no. |
I'm pretty sure the controllers are updated at 125Hz. As I understand by reading the code, One thing that's bothering me is the time parameter in the According to the script manual:
So, if a new However, I must say that I've tried to reduce the value to 8ms and the observed delay still seems to grow, with the added problem that the target speed reported by the controller sometimes drops down to zero (it would seem that's because there's no new I'm really running out of ideas to try, so any suggestion will be very much appreciated. One detail that might be important is that our robots are running URControl version 3.2.18744. |
MiguelPrada, Hi, I am having the same problems as you, and I am also using the same $ roslaunch ur_modern_driver ur10_ros_control.launch I just launch it and my UR10 goes crazy. I haven't been able to figure out what is going wrong. I have not been able to make any plots to detect any delays, but the situation is the same. Starting the velocity-based joint trajectory controller, the robot quickly goes unstable, and I haven't made any changes in any of the files, including "ur_hardware_interface.cpp". Now I cannot account for this weird behavior of the robot. do you think that, If I change the controller to position control, the behavior might change. I have not done it coz I am fearing something might go wrong and I don't want to damage the Robot. Can you think of any solution. Is this problem coming up with all of kind of controllers for the UR arms, or just this one. ThomasTimm, I am having an intuition that the UR-10 arms we have, they might no have been configured to receive the commands from a ROS interface. do we ave to configure anything viz the teach pendant..?? Please do update as my work is stuck. |
@aaqibkhanunis So far I'm getting better results by switching to position controllers, yes, although then I have the overshoot problem as stated in #47. The overshoot is not very big when moving at slow-ish velocities, but increasing the speed degrades performance quite a lot. You can try this by switching With respect to the velocity interface, it seems that the behaviour is best when removing the optional In any case, it really looks like this is due to some change in the UR controller, rather than some bug in the driver, don't you think @ThomasTimm? Some modified behaviour in SW version 3.2, maybe? |
@aaqibkhanunis Unlike other arms, like the Motoman, the UR doesn't need any special setup, as it only relies on URScript commands. So as long as your network is setup properly, you should be good to go. Yes, the driver's frequency is controlled by the UR's controller, as they probably doesn't agree 100% as to how long 8ms is. I was more curious about the ros_controller and what was in your urX_controller.yaml file (there are several places that should read 125hz, has this been changed while tweaking the controller/changing between position and velocity control?). Maybe try lowering this value to 120hz? When I initially developed this improved driver, me and some students of mine tested all the available URScript commands to find which could be used for external control. The way I tested it, and I would recommend that you @miguelprada do your test, is to write a simple python script that sends a new speedj command whenever it receives a status message from the robot. Make sure that the speedj value changes each time you send it (i.e. a sine-wave formed velocity profile). Then, try different values of |
I'm afraid you should be surprised then @ThomasTimm, just as I am 😉. I've run a couple of tests following your suggestion and the results are quite conclusive: the value of The two figures below show the result of commanding a sinusoidal velocity profile (red line in the figures) with Of course, it was this delay which was making the PID controlled version unstable (as shown in the original comment), just as the theory predicts. |
I quickly checked the release notes for all v3.2 releases, but can't find this mentioned anywhere. |
@gavanderhoorn Search for speedj in these release notes. You should find the following text:
The asterisk in the first bullet means these changes were introduced in SW 3.1. |
Right. Seems I missed that then. Would've been nice if that had been more prominently documented, it's quite a change from all previous behaviour. Thanks for the reference. |
Thanks for sorting this out @miguelprada ! |
My pleasure, @ThomasTimm. |
As suggested by @ThomasTimm, I'm trying to use the VelocityJointInterface in the driver instead of PositionJointInterface. However, when starting the robot with the velocity-based joint trajectory controller, the robot quickly goes unstable, even without sending any command at all (the robot should try to keep the initial position via the PID in
velocity_controllers::JointTrajectoryController
, see here). Note that I'm not using any custom code here, just launchingI modified the UR driver to broadcast more information in the joint state message (see this specific revision of
ur_hardware_interface.cpp
in my fork for details). The additional data I'm publishing is:What I observe is that there's a huge delay between the command written by the joint trajectory controller and the target velocity reported by the UR, as shown in the figure below, where the red line is the output of the controller, the light blue line is the target joint velocity as reported by the UR (i.e. what's returned by
RobotStateRT::getQdTarget()
), and the dark blue line is the actual joint velocity as reported by the UR driver (i.e. what's returned byRobotStateRT::getQdActual()
).I've tried with different controllers and lower PID gains (see here for more info), but the robot always goes unstable eventually. Additionally, the delay seems to increase as the driver runs. Lowering the PID gains makes the system go unstable more slowly, and after 40-50 seconds without any command (i.e. just holding the position) the delay between the controller command and the target speed reported by the UR grows beyond 2 seconds, as shown in the figure below.
I'm posting this here to see if anyone has had the same issue or can think of something I might be missing, since this is driving me crazy. @ThomasTimm do you actually work using the
ros_control
flavour of the driver or do you use it in the sans-ros_control
mode? Have you seen anything like this before?The text was updated successfully, but these errors were encountered: