kay
For remote control or visual servo application, I’d like to stream the target position every 10-50 milliseconds from my Linux PC, and each update would only change the destination around 1-100 millimeter. By doing this, I’d like to create a smooth motion. I want to realize both in Cartesian space control and in Joint space control, but let’s discuss Cartesian space first.
My problem is that the robot movement is very jittery. I’m using RTDE (real-time data exchange) and running the same urp file which you can find here: https://www.universal-robots.com/how-tos-and-faqs/how-to/ur-how-tos/real-time-data-exchange-rtde-guide-22229/
The motion I tried to create was simple: just moving up 200 millimeters toward +Z direction, then moving down 200 millimeters toward -Z direction. I was sending the target update (absolute target position in robot’s Base Frame) every 50 msec, and I was changing 10 millimeters for every update. However, the movement was very jittery or the repetition of small “start and stop” movement. The original urp file uses “MoveL” command, so I tried to tune the parameters (by changing from “Stop at this point” to “Blend with radius”), but it didn’t work.
When I implemented the similar functionality on ABB, I could use EGM (Externally Guided Motion), which you can stream the point, and the robot follows the point it gets every update. Alternatively, when I implemented for DensoWave or Mitsubishi, I could use “Cancel” or “Skip” command for each “Move” command to override the old target. I’m wondering if there are any commands/options that I can use for Universal Robots.
Are there any ways/commands to realize above smooth real-time target-update movement?
Fadi_Raid
Hi , I am trying to control UR5 robot in real-time. I am sending servoj commands to port 30003 RTDE using the default setup and the robot freezes after the first movement.Br0t said:Hoi guys, i had the same problem for quite some time and solved it by uploading a program to the robot and sending new poses via RTDE. Here's the github: https://github.com/Mandelbr0t/UniversalRobot-RealtimeControl
Can you please guide me on how to use the program you provided in the link and upload it to the robot?
Fadi_Raid
Hi Matthew, thanks for the replymatthewd92 said:Are you using port 30003 or 30004? 30003 is not the RTDE port.
Yes my bad it is not RTDE it is port 30003 real-time. Now the robot moves from point to point but the movement is still jittery.
I heard of the of ROS driver here that can be installed into the robot to make the movement smooth, yet I don't know how to install it.
Following this discussion here it is mentioned that it can be used to make the movement smoother when sending position in real-time and you can use Python or C without getting into ROS completely.
I am using an old UR5 with CB2 running 1.8.4035.
matthewd92
I will have to leave the ROS question to someone more knowledgeable than myself about ROS.
Fadi_Raid
Br0t said:@Fadi_Raid have you checked the comments here https://github.com/Mandelbr0t/UniversalRobot-Realtime-Control/blob/f86136e321fac6921f6876ad0141dc9ef597c226/URBasic/urScriptExt.py#L340Im not sure which port is the correct one and you might have to update the code to the UR Firmware version you are using. But im sure that if you manage to upload the program and send new inputs to the input registers the code should work. Servoj gave me the same problem you are describing.First call init_realtime_control (upload the UR program) and then call set_realtime_pose (update the registers for each pose) repeatedly.The code is tested with UR5 and Firmware 3.2 and 3.4.Good Luck!
Thanks for replying.
I am using C++ since I am controlling the robot using stereo camera and C++ offers better performance. Can I use this library while sending socket commands in C++?
I managed to get better results by having 2 threads one for capturing and other for sending instructions to the robot. However, a slight jitter is still there. I would like to try you library but I am still unaware on how to load it into the robot. My firmware is quite old, version 1.8.25319.
Thank you again