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

Using ros2-web-bridge for Node-Red implementation #168

Open
a-pastore opened this issue Jan 11, 2021 · 2 comments
Open

Using ros2-web-bridge for Node-Red implementation #168

a-pastore opened this issue Jan 11, 2021 · 2 comments

Comments

@a-pastore
Copy link

a-pastore commented Jan 11, 2021

Hello all,

i would like to ask you if anyone here already has experience with the connection between ROS2 and node-red. I was hoping to use the ros2-web-bridge in combination with the following node-red-module to create a web-based joystick, for instance.

node-red-contrib-ros

The following system is used in a VM:

  • Ubuntu 20.04 LTS
  • ROS2: Foxy Fitzroy
  • ros2-web-bridge: 0.3.0
  • node: 10.19.0
  • npm: 6.14.11
  • node-red: 1.2.2

Can someone please assist with the following confusion? Is it enough to directly access the websocket ws://127.0.0.1:9090 to access the ROS2 Topics? Or does the ros2-web-bridge differ in this respect from the ROSbridge based on this tutorial?

The connection status of the Node-Red pub/sub indicates a successful connection. Unfortunately, ROS2 messages neither get in nor out. After connecting for the first time, the following is output in the webbridge terminal:

(node:13026) DeprecationWarning: Deep requiring like const uuidv4 = require('uuid/v4');is deprecated as of uuid@7.x. Please require the top-level module when using the Node.js CommonJS module or use ECMAScript Modules when bundling for the browser. See https://github.com/uuidjs/uuid#deep-requires-now-deprecated for more information.

Thank you for your time

@minggangw
Copy link
Member

Theoretically, I think it's feasible to use ros2-web-bridge to replace the ROS bridge because ros2-web-bridge is designed to be compatible with roslibjs and follows the rosbridge v2 protocol.

The warning you mentioned is not critical, please try to run the ros2-web-bridge:

DEBUG=ros2-web-bridge* node bin/rosbridge.js

to find any meaningful output. For Node.js, I suggest you upgrade to v12.20.1.

@vkuehn
Copy link

vkuehn commented Jan 12, 2021

@a-pastore interesting project !
It looks like you are using an older node version. Look here Node Red Supported Versions.
Maybe you want to forward ROS2 as an issue to https://github.com/namgk/node-red-contrib-ros ?

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

No branches or pull requests

3 participants