UR3 - URScript Vs pure ROS + Moveit

Skip to first unread message

Jeppe Walther

Aug 15, 2015, 1:04:55 PM8/15/15
to swri-ros-pkg-dev


I am a master student at the Technical University of Denmark I am beginning a new project in cooperation with our Mechanical department that involves a UR3 Robot.
I am normally not a robot guy, but have dedicated most of my study to computer vision and computer graphics.

I have been testing both with the PolyScope interface and ROS + Moveit. However it seems to me that the PolyScope / URScript motion planning is more robust that the ones in Moveit.
I know that Moveit has more sophisticated features for dynamic interaction, but for the purpose of our project,  we will only need preplanned motion paths.

My questions are

1. Can I use the URScript functions llike movej, movel through through the ros_industrial::universal_robots::ur_driver, or am I restricted to joint_rotations?.

2. Would there be any problems in using ros_industrial::universal_robots::ur_driver and at the same time connection over the tcp/ip socket interfaces and send URScript commands?

Ashfaq Farooqui

Aug 15, 2015, 3:44:21 PM8/15/15
to swri-ros...@googlegroups.com
Hi Jeppe,

I have been running the UR10 with ros+moveit and URscript. I have done this by extending the current 'prog' and 'ur_driver' to run specific URscripts I need.

Regarding your second question, I think having multiple interfaces open would not work and might risk the safety of the system. By adding some safety logic around 'ur_driver' you should be able to send the URscript commands, you may need to extend 'prog' as per your requirement.

You received this message because you are subscribed to the Google Groups "swri-ros-pkg-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swri-ros-pkg-d...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Jeppe Walther

Aug 15, 2015, 4:57:59 PM8/15/15
to swri-ros-pkg-dev
Thank you .. seems that I will need to dig into the ur_driver and figure out how it works

Do you know of any other possibilities for dynamic programming of UR robots. I had a look at https://github.com/oroulet/python-urx however it do not seem to be compatible with never versions of the robot software.

Maarten de Vries

Aug 16, 2015, 8:26:35 AM8/16/15
to swri-ros...@googlegroups.com
On 15 August 2015 at 22:57, Jeppe Walther <jeppew...@gmail.com> wrote:
Thank you .. seems that I will need to dig into the ur_driver and figure out how it works

Do you know of any other possibilities for dynamic programming of UR robots. I had a look at https://github.com/oroulet/python-urx however it do not seem to be compatible with never versions of the robot software.
There ​are a number of methods you could use. You can use the ROS driver with or without moveit. As it stands however, the ROS driver only supports joint trajectories and does not expose the full functionality of the UR robots. You can add specific commands to suit your need, but you will have to stream those commands from a PC, which is less than optimal in my opinion. It will also be difficult to integrate all features of the robot, such as line tracking and force control should you want to use those.

Alternatively, you can use the ROS driver only for publishing the robot state by setting the ~prevent_programming parameter to true. It will publish joint state (and I believe some other state) but it will not upload any program or control the robot. You can then program the robot yourself with the PolyScope interface or by sending a URScript program to the robot on TCP port 30001 or 30002.

If you send your own program to the robot, you have three options for communicating vision data or other information with the robot:
  • Use the TCP
    ​API from URScript to open a connection to a remote machine.
  • Use the modbus server on the robot arm
    ​, or use the modbus client API from URScript​
  • Use the new
    ​XmlRpc API from URScript
    ​ (available from robot software version 3.1 ​
    ​I believe)​

​All of these options can provide bidirectional communication​. Personally, I don't find the TCP API very convenient to use. The downside of modbus is that it limits you to sending/receiving 16 bit values, although you can of course use multiple 16 bit values for sending larger data structures. I have never used the XmlRpc API yet, so I don't know how easy it is to use, but it seems promising. You can find more details on the exact API in the script manual [1], section "Module interfaces". Note that the commands starting with "modbus_" are modbus client commands. You can also access modbus registers already exposed by a modbus server running on the arm with the read_port_register and write_port_register commands.

If you end up writing a URScript program and you use vim as text editor, there is a vim plugin for syntax highlighting and indentation available on github [2].


Jeppe Walther

Aug 16, 2015, 5:44:50 PM8/16/15
to swri-ros-pkg-dev
Thankyou Maarten that was a really great answer. I did some more testing with python-urx and got it working with URSim. I think it would be a nice option to use python-urx to send commands and then do a one way hookup to ROS with the -prevent_programming option you mentioned. 

Felix Messmer (IPA)

Aug 17, 2015, 3:46:01 AM8/17/15
to swri-ros-pkg-dev
As my previous speakers already told you, the current ur_diver only support the follow_joint_trajectory interface (http://docs.ros.org/api/control_msgs/html/action/FollowJointTrajectory.html)
Streaming positions or velocities is currently (not yet) supported...I've been playing around to enable ros-control concepts to be used with the UR, but haven't come far yet due to lack of time.

However, if you'd like to only get joint_states from your UR and not use the driver for programming, you could also use this test scriptthat I wrote once...it listenst to the RT port and publishes joint_states...


Yalun Wen

May 19, 2017, 10:18:19 PM5/19/17
to swri-ros-pkg-dev
Wow, this is great answer. I wonder how you can manage to understand this. I just got my research topic on UR force control. 

I wonder if you could share some opinions on the ur_modern_driver, since it now could be interfaced with ROS control. I have been searching for 2 or 3 days, the ur_script might seem like a better option for force control?

Any help would be deeply appreciated.

在 2015年8月16日星期日 UTC-5上午7:26:35,maarten写道:


Feb 27, 2018, 10:28:28 PM2/27/18
to swri-ros-pkg-dev

Hi, Mitch. How are you doing so far? My research topic is also UR using force control, thus we can try to help each other (https://www.facebook.com/maryviktory - message me here). 
Which method did you use finally? I am balancing now between ROS and URX python. 

суббота, 20 мая 2017 г., 10:18:19 UTC+8 пользователь Mitch написал:
Reply all
Reply to author
0 new messages