Ask Your Question
1

What does a ROS driver do vs. Python library for robot arm?

asked 2020-12-12 12:54:17 -0600

galaxee gravatar image

updated 2020-12-12 13:03:15 -0600

Hi! Sorry for the basic question, I'm new to ROS and just having trouble with all the different concepts.

https://github.com/SintefManufacturin... This library provides Python access to a UR arm.

https://github.com/UniversalRobots/Un... This library provides a ROS driver for a UR arm.

Why do you need the driver? It seems like everyone uses the driver, but why can't you just use the library? What's the difference? Is it just to have access to MoveIt?

edit retag flag offensive close merge delete

Comments

Please note: UniversalRobots/Universal_Robots_ROS_Driver is the location of the official UR ROS driver.

The repository you link to is a WIP to port that driver to ROS 2.

gvdhoorn gravatar image gvdhoorn  ( 2020-12-12 13:01:00 -0600 )edit

You're right, just edited my question!

galaxee gravatar image galaxee  ( 2020-12-12 13:03:48 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2020-12-12 13:19:34 -0600

gvdhoorn gravatar image

updated 2020-12-12 14:24:23 -0600

What does a ROS driver do vs. Python library for robot arm?

The main difference between a plain Python library and a ROS driver is: the former is a plain Python library, while the latter is a ROS driver (yes, that's a copy-paste).

A ROS driver is a ROS node that communicates "with hardware". To do this, it essentially has "two sides":

  1. a side that knows how to encode and decode data coming from the hardware device, and
  2. a side that offers a ROS API which other ROS nodes can use to talk to it (ie: topics, services and actions)

the real task of a driver is then to glue these two sides together and perform the translation between domain concepts the robot controller understands/works with and those in use in ROS.

A plain Python library does not do this. It will likely contain part 1, as otherwise it wouldn't be able to communicate with your robot controller. But part 2 is what makes a ROS driver a ROS driver, and it's very unlikely a random Python package comes with a ROS API (it's not a ROS node after all).

In your specific case: python-urx is a Python package which allows remote control of UR robots, but it does not have a ROS API (so other ROS nodes cannot "talk" to it out-of-the-box). You could certainly use python-urx to write a ROS driver (there probably are drivers for UR controllers which do this). But then you'd essentially use python-urx for side 1, and would have to add side 2 yourself.

Why do you need the driver? It seems like everyone uses the driver, but why can't you just use the library?

The answer to this depends on what you want to do: if you'd like to use other ROS nodes to control your robot, using a driver might be much more convenient, as it will take care of transforming data coming from and going to the robot controller for you. It can execute trajectories for you -- coming from MoveIt for instance, but that's not a requirement -- and publishes data such as JointStates, IO and other information in ROS message format. In addition it offers ROS services which you can invoke.

Couldn't you do this with the plain Python library? Of course. But it would mean having to implement all of this yourself.

So you could certainly "just use the library", it would just mean you'd be re-doing a lot of the work the developers of UniversalRobots/Universal_Robots_ROS_Driver have already done.

Whether that makes it worthwhile to use the driver for you, we cannot say. That would be something only you can decide.

edit flag offensive delete link more

Comments

Thank you for the detailed explanation, this is so helpful!

galaxee gravatar image galaxee  ( 2020-12-12 13:44:11 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2020-12-12 12:54:17 -0600

Seen: 225 times

Last updated: Dec 12 '20