Get ready to cringe! ROS1 interface for ROS2

47 views
Skip to first unread message

Dheera Venkatraman

unread,
Jun 25, 2021, 12:27:49 AM6/25/21
to hbrob...@googlegroups.com
Hi everyone,
This might make some people cringe, but let’s face it – you have a lot
of ROS1 code and you aren’t switching to ROS2 yet because you have to
rewrite a LOT of nodes.

So I wrote a legacy interface that behaves like rospy but speaks ROS2
behind the curtain. This is very different from a ROS1/ROS2 bridge in
that you don’t need to run a ROS1 master at all.

The idea is to be able to take any ROS1 node, replace
import rospy
with
import rospy2 as rospy

and BAM it should work on ROS2. Check out this repo! Included is a
single Python file that will run in ROS1 or ROS2.

https://github.com/dheera/rospy2

____________________
Dheera Venkatraman
http://dheera.net

Gmail

unread,
Jun 25, 2021, 4:26:49 AM6/25/21
to hbrob...@googlegroups.com
Sweet!



Thomas

-
Want to learn more about ROBOTS?









On Jun 24, 2021, at 9:27 PM, Dheera Venkatraman <dhe...@dheera.net> wrote:

Hi everyone,
--
You received this message because you are subscribed to the Google Groups "HomeBrew Robotics Club" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hbrobotics+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hbrobotics/CAC2DVVdjfUxUJvZz2eTg2J%3DFn1Jc9oJT6%3DuA5ro36bx0HJdSAA%40mail.gmail.com.

Sergei Grichine

unread,
Jun 25, 2021, 8:02:58 PM6/25/21
to hbrob...@googlegroups.com
Dheera, - great idea and nice implementation - count me as your fan! I hope that M9 camera isn't too heavy to carry around :-)

Looking at GitHub repository, - you provided a test node, but not much else. I am wondering if any attempt was made to take a working ROS1 robot code (Turtlebot teleop?) and make it run under ROS2. Maybe, Turtlebot is a wrong example - it doesn't have much of Python code. ROS experts in this group may suggest a better proving test.

What are your general recommendations and ideas about using your tool - basically, what's worth trying and what's out of reach in its current state? Any plans to expand it?

Best Regards, and thanks for sharing.
-- Sergei Grichine  

Chris Albertson

unread,
Jun 25, 2021, 8:36:24 PM6/25/21
to hbrob...@googlegroups.com
On Fri, Jun 25, 2021 at 5:02 PM Sergei Grichine <vital...@gmail.com> wrote:

Looking at GitHub repository, - you provided a test node, but not much else. I am wondering if any attempt was made to take a working ROS1 robot code (Turtlebot teleop?) and make it run under ROS2. Maybe, Turtlebot is a wrong example - it doesn't have much of Python code. ROS experts in this group may suggest a better proving test.

I am far from an expert, but I'd recommend the ROS1 Python tutorials as test cases.  They are well known, very simple, and demo the most used functionality.  If the tutorials still work as written with just one line of code changed, it would be a convincing test


Any plans for the C++ interface?
--

Chris Albertson
Redondo Beach, California
Reply all
Reply to author
Forward
0 new messages