Skip to content
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

ROS 2 Support #244

Closed
davetcoleman opened this issue Dec 5, 2018 · 28 comments
Closed

ROS 2 Support #244

davetcoleman opened this issue Dec 5, 2018 · 28 comments

Comments

@davetcoleman
Copy link

davetcoleman commented Dec 5, 2018

I'm surprised to be the first to bring up this topic, but let's start the discussion on what a UR driver for ROS2 would look like. I ask because of my own initiatives for a MoveIt2 that would require a compatible robot driver.

What a search turned up for me:

  • Erle Robotics seems to have a demo but it appears they never released it (probably because they are developing their own robot hardware now). @rkojcev
  • At ROSCon 2017 a ROS2 demo used the UR5, but it used a simple Python library called urx that I do not believe has nearly the same feature set as the ur_modern_driver. In particular, that demo just used movel and translate_tool. @Kukanani

Is anyone else working on this?

A related effort is a very early proof of concept of ros2_control, though it is not a port.

@Kukanani
Copy link

Kukanani commented Dec 5, 2018

Thanks for starting the conversation. Just to clarify, for my application, I actually made a ros2 fork of urx: https://github.com/Kukanani/python-urx. It was ultimately a set of hacks to get (some, any) manipulator to work with ROS2. As you mentioned, I think that this package is both better supported and has more features than urx.

@gavanderhoorn
Copy link
Member

gavanderhoorn commented Dec 5, 2018

I'm not aware of any ROS 2 ports of this driver.

In any case: a meaningful port would depend on Actions being available, so that would be something to look into after the release of ROS2 CC.

A related effort is a very early proof of concept of ros_control2, though it is not a port.

Yes, the ros_control parts would obviously require something like ros_control to be available. I'm not aware of any porting efforts there either (although there is definitely quite some interest from various parties).

@rkojcev
Copy link

rkojcev commented Dec 10, 2018

@davetcoleman we did an initial port of this UR driver to ROS 2 almost 2 years ago but in that time ROS 2 was still in alpha ( I believe) and it did not have all the nice functionalities such as actions that ROS 1 had. After that we neglected that project, and focused on releasing our own solution.

@davetcoleman
Copy link
Author

An update from the ROS Industrial Consortium meeting in Germany today: Universal is releasing official UR drivers! But for ROS 1, likely landing late Spring 2019. They plan on making ROS 2 drivers in the future, but they cited most of their customers were still on ROS 1 so that was their first goal.

@gavanderhoorn
Copy link
Member

gavanderhoorn commented Dec 12, 2018

To be more precise: as is always a good idea, the driver will be "thin" (and the robot interfacing parts are kept mostly separate from the ROS API business logic), so most of the interface parts should be relatively easily portable to ROS 2. Once it makes sense.

@planetceres
Copy link

This conversation is a few months old -- has any progress been made on ROS2 drivers? What criteria still needs to be met in order for ROS2 drivers to "make sense"?

@gavanderhoorn
Copy link
Member

This conversation is a few months old -- has any progress been made on ROS2 drivers? What criteria still needs to be met in order for ROS2 drivers to "make sense"?

re: "make sense": this was not a comment on a ROS 2 version of ur_modern_driver, but on the design and approach taken for the new driver.

As to ROS 2 support for ur_modern_driver: now that actions have finally (sort of) landed in Crystal, it starts to become viable to look into ROS 2 support.

@atyshka
Copy link

atyshka commented Mar 12, 2019

@davetcoleman, now that spring 2019 is upon us, any updates on the official ROS 1 driver?

@davetcoleman
Copy link
Author

To be clear, I'm not a spokesperson for UR. I was only sharing news I heard at a ROS Industrial conference from a UR representative. I've no updates

@Prier
Copy link

Prier commented May 4, 2019

In case your interested I have recently published a new C++ interface that uses the RTDE interface of the UR for sending and receiving data. The interface can also be used with python through bindings. The interface is meant to be usable with various robot frameworks, which is why the receive and control interface relies only on STL datatypes. One can choose to convert to STL types or simply rewrite the control and receive interfaces to the desired datatypes to avoid any overhead. The plan is to make a more complete ROS1 / ROS2 interface based on this project.

You can find it here:
https://gitlab.com/sdurobotics/ur_rtde

Documentation with examples and API resides at:
https://sdurobotics.gitlab.io/ur_rtde/

@gavanderhoorn
Copy link
Member

@Prier: thanks for making your work OSS.

The current effort for the UR-backed driver includes something similar, so perhaps seeing where the overlap could be used to benefit both would be interesting. That would be up to UR though.

@Prier
Copy link

Prier commented May 5, 2019

@gavanderhoorn Yes I have also been briefly in contact with a person at UR and it would be great if their can use some of it for the new ROS interface.

@atyshka
Copy link

atyshka commented May 6, 2019

@Prier @gavanderhoorn Any specifics from UR as to what to expect from this driver vs the current implementations? Also tentative release schedule?

@Prier
Copy link

Prier commented May 6, 2019

@atyshka you can see the presentation they gave here: https://static1.squarespace.com/static/51df34b1e4b08840dcfd2841/t/5c4090b470a6adde64a153c2/1547735256433/2018.12.12_Anders_Billesoe_Beck.pdf but gavanderhoorn might know more than me :)

@gavanderhoorn
Copy link
Member

All the publicly available information on the new driver may be found in the presentation (slides and video) that Anders Billesø Beck gave at the ROS-Industrial conference in Stuttgart in December '18.

@Prier linked the slides.

@schornakj
Copy link

I think a straight port of the current driver to ROS2 would be very useful -- I'd immediately benefit from having it for my projects, and I'm sure others would too. It sounds like the official UR-backed driver won't support ROS2 for some time.

I took a look through this driver's ROS code and the amount of work doesn't seem hugely intractable, especially if the scope of work is initially limited to only the functionality brought up by ur_common.launch. Most of the changes to compiled code would be in ur_ros_wrapper.cpp.

  • Reformulating the FollowJointTrajectory action server to use ROS2 actions (much less of an obstacle now that Dashing is released).
  • Changing the RosWrapper class so it extends the ROS2 base node class.
  • Switching to ROS2-style parameter lookups.
  • Translating the launch files to ROS2 .launch.py's.
  • Tweaking the ur_modern_driver package's CMakeLists.txt and package.xml to be compatible with both ROS versions.
  • Porting the ur_msgs package to be compatible with both ROS versions.

Is there anything critical or blocking that I've missed?

Porting ur_hardware_interface.cpp and the alternative control strategies is a whole other can of worms, which I wouldn't mind putting off for the time being. In particular it looks like it would require porting the ur_description package: since it's heavily reliant on xacro (which isn't officially supported in ROS2) I'm not sure about the best way to proceed there.

@gavanderhoorn
Copy link
Member

gavanderhoorn commented Jun 17, 2019

@ipa-hsd / @ipa-led


Tweaking the ur_modern_driver package's CMakeLists.txt and package.xml to be compatible with both ROS versions.

personally I would not necessarily like this too much.

It tends to get real messy.

@gavanderhoorn
Copy link
Member

@ipa-hsd & @ipa-led: I thought you might have some input here, seeing as you've already worked on a ur_modern_driver port.

@hsd-dev
Copy link

hsd-dev commented Jun 18, 2019

Thanks @gavanderhoorn for pointing this out. We did a ur_modern_driver port to ROS2.0 for the ROS2/DDS tech workshop. We had some issues while trying to send trajectories from MoveIt! but works fine if we directly send a FollowJointTrajectoryAction goal from a python script. We need some testing to fix this. (to test it with MoveIt!, we released action_bridge)

Currently the status as per @schornakj's list is:

  • Reformulating the FollowJointTrajectory action server to use ROS2 actions (much less of an obstacle now that Dashing is released). (We used Crystal, should update to Dashing)
  • Changing the RosWrapper class so it extends the ROS2 base node class.
  • Switching to ROS2-style parameter lookups. (currently hard-coded)
  • Translating the launch files to ROS2 .launch.py's. (half way through)
  • Tweaking the ur_modern_driver package's CMakeLists.txt and package.xml to be compatible with ROS2.
  • Porting the ur_msgs package to be compatible with both ROS versions.
  • Change the base branch from master to kinetic-devel.
  • Use robot_state_publisher's ROS2 version.
  • Fix sending trajectories from MoveIt!
  • Try Ros2 ros/xacro#203 (Not sure if ur_modern_driver can can depend on a PR though. Any comments?)

Additionally,
@ipa-led: can you comment on the changes you made for the Time API?

Also, we need to fix some git branch issues as @gavanderhoorn noticed.

I also noticed robot_state_publisher has been ported for ROS2, but for the workshop we still used ROS(1) version. We did not touch ur_description part either as pointed out earlier.

@schornakj
Copy link

schornakj commented Jun 18, 2019

@gavanderhoorn @ipa-hsd I think that for a message package cross-compatibility makes sense, since ros1_bridge requires matching message definitions in both the ROS and ROS2 workspaces. Since having a fully cross-compatible package as discussed in this Discourse thread isn't really a core functional requirement I'll amend that item to:

  • Tweaking the ur_modern_driver package's CMakeLists.txt and package.xml to be compatible with both ROS versions ROS2.

@ipa-hsd I've used the ROS2 version of robot_state_publisher and it works just like I'd expect. As a workaround for the ROS2 xacro parsing issue I just used rosrun xacro xacro to convert to URDF before running my system.

It sounds like there's already significant progress, which is very cool! I'd be interested in contributing if it would be helpful.

@darkdragon-001
Copy link

You could try the ROS2 xacro pull request: ros/xacro#203

@schornakj
Copy link

@ipa-hsd Any further thoughts or progress on the ROS2 migration? @gavanderhoorn and I talked about the state of things for a little bit during the ROS-I developer call this morning.

@hsd-dev
Copy link

hsd-dev commented Jul 10, 2019

Sorry about the delay guys. I will get this done this week.

@kazuki0824
Copy link

I’m working on porting “universal_robot” into ROS2 Dashing here: https://github.com/kazuki0824/universal_robot/tree/dashing-devel

@schornakj
Copy link

@ipa-hsd How is this going? Could you send me an email when you get a chance? I have some offline questions.

@khssnv
Copy link

khssnv commented Oct 4, 2019

Any updates?

@gavanderhoorn
Copy link
Member

I'm closing this as we've officially deprecated this package.

Refer to the announcement on ROS Discourse.

@gavanderhoorn
Copy link
Member

We will not be adding ROS 2 support here in ur_modern_driver.

Any efforts towards ROS 2 support should be focused on ur_robot_driver instead.

There are a few aspects of ur_robot_driver that could facilitate a ROS 2 port, and community members interested in this are strongly encouraged to first open an issue on the ur_robot_driver issue tracker to discuss potential approaches.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests