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

Revision history [back]

click to hide/show revision 1
initial version

@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...