Designing a ROS package for Luos

Hi there!

I’m developing a ROS2 package for Luos modules there (that should be compatible with ROS1 later too).

Here’s my design:

  • A broker node runs the interface between Luos modules and the ROS ecosystem
  • Each module is isolated into its own alias prefix, e.g. /Imu_mod/ for the Imu
  • Every module publishes its read variables into topics in the form of /alias/variable/read
  • Every module subscribes to topics in the form of /alias/variable/write in order to write its variables
  • Every module publishes its events into topics in the form of /alias/events/event_name

An example setup running a Gate and an Imu nodes is available there.

Some design questions remain:

  • How do you expect the broker to work if several gates are connected to several USB ports?
  • How do you expect the broker to work if 2 nodes have the same alias and thus will publish under the same namespace?
  • How would you like to set the USB port e.g. /dev/ttyUSB0 (ROS param? Or autodetect?)
  • How would you like to activate/deactivate features e.g. Imu_mod.quaternion = True (ROS Param? Service? Topic?)
  • Are there other Luos-node-specific useful data to publish that are not in the variables/events list in the Luos doc you would like to access to from ROS? (e.g. embedded LED, L0_temperature, …)

Thank you for your feedback! Do not hesitate to suggest usecases you would like to test with ROS and Luos. Poke @worrelsik @LR_JOLY :slight_smile:

3 Likes

Hello ROS users :wave:

Here are some news about ROS + Luos :blue_heart:
Check out this demo running Luos modules with ROS 2 Dashing in Python:

:bike: The bike sharing application:

  • The bike pops up in steady green when it’s idle and available to be borrowed
  • Agitate the imu when it’s idle, it’s being stolen, the RGB alarm flashes in red
  • Press the state button to acknowledge the alarm
  • Press again to start riding, the bike slighly blinks in green
  • Press a new time to stop riding, it becomes idle again

You can find out more about how to use Luos modules with ROS in this repository:

Here are some design directions I made from the last post:

  • The luos_msgs packages defines some Luos-specific message types published by the luos_interface package
  • If several modules pop up with the same alias, the broker will publish to a distinct topic e.g. /Imu_mod2/...
  • Several gates require several brokers, which can be automatized via a launchfile
  • The USB port e.g. /dev/ttyUSB0 is set either via a ROS param in a launchfile or simply via auto-detection
  • Features can be activated/deactivated via /write topics, on which you publish a boolean

Currently, only Gate, Color, State, and IMU modules can be used with ROS but other Luos motors and modules will come soon, as well as a retro-compatibility with ROS 1 Melodic. Feel free to try and suggest improvements, since this is still WIP.

3 Likes