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

Multiple Micro-Ros MCUs over the same serial

asked 2021-09-03 07:57:49 -0500

GuillaumeB gravatar image

Hello,

From what I have seen, there is some example of Micro-ros over serial. But all I have seen is one computer (or one MCU) communicating to one MCU.

I was wondering if it was possible for example to connect two MCUs on the same serial lines to one computer? So the computer would have only one serial port to communicate with two different MCUs (or even more!).

I know that Modbus-RTU allows to do this, but it's a rather old protocol that doesn't allow much flexibility. If it's not possible to use multiple MCUs on the same serial lines with Micro-ros, is there a way to build a multiple MCUs architecture without duplicating the serial port on the computer?

Thanks.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
2

answered 2021-09-07 02:19:32 -0500

Pablogs gravatar image

In general, a bare UART serial port (same Tx and Rx lines) cannot be shared by multiple devices since it does not have medium access control.

You have the possibility of connecting multiple MCU to a single micro-ROS Agent using a serial port for each MCU using the multiserial Agent feature. You will need to use something like:

ros2 run micro_ros_agent micro_ros_agent multiserial [args]

If you want to use a serial communication device that allows address and multidevice medium access (SPI, RS485...) you can create your own micro-ROS transports for both Client and Agent, please check this tutorial.

edit flag offensive delete link more
0

answered 2021-09-04 02:44:44 -0500

mbudris gravatar image

There are ways to do this, but none of them are ROS related. If by "serial" you refering to rs232 , then the possibilities are limited and comes with the "if you know what you're doing" warning.

edit flag offensive delete link more

Comments

By serial, I mean the UART of the MCUs (It could be only UART, rs232 or rs485 etc.). What are the possibilities, then? RS-485 allows multidrop-communication is there anything that would be more modern than ModBus RTU (modbus is limited to 16 bit data)?

GuillaumeB gravatar image GuillaumeB  ( 2021-09-04 06:02:08 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2021-09-03 07:57:49 -0500

Seen: 435 times

Last updated: Sep 07 '21