ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Ros1_bridge between ROS1 on WSL and ROS2 on Windows

asked 2020-02-04 10:09:38 -0500

erenaud2 gravatar image

Hello !

I would like to set up a system in which I would have (on a single computer of course) :

  • ROS Kinetic installed on WSL (could also be ROS Melodic),
  • ROS2 Dashing on pure Windows,
  • ros1_bridge to allow communication between the first two.

Would you say it's feasible ?

What I really want to do:

I am currently working with OnBoard-SDK-ROS, a package designed to connect ROS to DJI's drones. I would like to synchronize data from various sensors with my drone ones' (using ROS of course). My problem is that those sensors can only be connected to Windows (cry in Linux...).

Of course, I could have OnBoard-SDK-ROS on my WSL and some kind of web-server on Windows to expose sensors data to WSL. But it bothers me to lost ROS abilities.

At first, I thought of installing both ROS1 and ROS2 on Windows. But I am experiencing a lot of troubles trying to compile OnBoard-SDK on Windows (dependency of OnBoard-SDK-ROS). I am not even sure that it is possible.

Any thoughts/ideas would be greatly appreciated !

edit retag flag offensive close merge delete

Comments

So where do you want to have the ros1_bridge running?

What is feasible is to have ROS1 and a minimal ROS2 install with the ros1_bridge on each robot/drone. They will all publish in the global DDS dataspace and a single computer running ROS2 can see all the data from all the robots/drones (make sure you namespace all the topics published by the robots).

MCornelis gravatar image MCornelis  ( 2020-02-06 04:04:41 -0500 )edit
1

If you want the ros1_bridge to run on the host, then you can only connect to one drone by specifying the ROS master on the drone. To be able to compile the ros1_bridge you will need to have both ROS1 and ROS2 installed.

MCornelis gravatar image MCornelis  ( 2020-02-06 04:08:42 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2020-02-12 11:15:53 -0500

erenaud2 gravatar image

@MCornelis Sorry, I didn't make my self clear. ROS is NOT installed on my drone (and can NOT be). It only contains a flight controller on which I can't do anything. I have one single computer embedded on my drone and that's it, really.

I have been playing around with ros1_bridge since I post this issue and now I get how it works. At first, I didn't realize I had to have both ROS1 and ROS2 installed on my machine, as you pointed out. So I tried to make it work on Linux, which I easily achieved.

Then, I try to solve my original issue. Here what I had a mind:

  1. Install ROS1 Melodic on WSL
  2. Install both ROS1 Melodic and ROS2 Eloquent on Windows (ROS1 melodic being used only for ros1_bridge compilation)
  3. Build ros1_bridge from source on Windows and launch a dynamic_bridge
  4. Launch a dummy ROS2 publisher on Windows
  5. Launch a dummy ROS1 listener on WSL (and pray to see my messages...)

This didn't work because of step 3. Compiling ros1_bridge on Windows is really painful. So I was ready to give up and implement some kind of RESTful API using Flask, when I literally had an epiphany... What if instead of building ros1_bridge on Windows, I build it on WSL ? It would imply having ROS2 Eloquent installed both on Windows and Linux, but it isn't such a big deal...

So here what I did :

  1. Install both ROS1 Melodic and ROS2 Eloquent on WSL (ROS2 being used only for ros1_bridge compilation)
  2. Install ROS2 Eloquent on Windows
  3. Build ros1_bridge from source on WSL and launch a dynamic_bridge (from WSL of course)
  4. Launch a dummy ROS1 publisher on WSL
  5. Launch a dummy ROS2 listener on Windows and to my huge surprise, I was seeing messages coming from WSL ! Without any extra configurations ! Gotta love ROS and WSL !

PS: I didn't specify why I needed to have ROS2 on Windows : that's because I am using python 3.7 to talk with the sensors connected to my embedded computer. On the other hand, DJI didn't make any ROS2 package for their drones, so I was stuck with ROS1 and python2.7...

edit flag offensive delete link more

Comments

Unfortunately, I can not accept my answer as correct since my karma is < 10 points

erenaud2 gravatar image erenaud2  ( 2020-02-12 11:16:41 -0500 )edit

Question Tools

4 followers

Stats

Asked: 2020-02-04 10:09:38 -0500

Seen: 518 times

Last updated: Feb 12 '20