osrf / ros2_serial_example

70 stars 15 forks source link

[Question] Support for 8-bit Microcontrollers (Arduino) #81

Open Butakus opened 1 year ago

Butakus commented 1 year ago

After searching around the Web I have not found (yet) any project that supports serial communication between ROS 2 machines and 8-bit microcontrollers like the Arduino Uno/Mega. I know of the microROS project, and the other projects that are referenced in the README, but all of them are targeting 32-bit boards.

I understand that this project is also focused on 32-bit boards (FreeRTOS / MicroCDR), so at this point I have a couple of questions:

  1. Is the development of this repo still active? Or has everything being moved to microROS?

  2. Is there anyone working on a library to offer support to smaller boards like the 8-bit Arduinos? I was planning to reuse an old project to build my own, based on HDLC or COBS with a basic ARQ feature. However, if there is an intention to provide official support from the OSRF I would not mind to help/collaborate to make it happen and avoid duplicate and unnecessary work.

This is probably related to #67, but it was closed due to inactivity and was not even focused on smaller micros...

chrisalbertson commented 1 year ago

Why use an 8-bit processor when you can buy a Raspbery Pi Pico for $4 that is not only cheaper than Arudino but more than an order of magnitude faster? So, I think there is little incentive to work on making ROS Serial work under ROS2

If you MUST use the Arduino, why not make a one-off protocol? What to use depends on if you can stand latency. (COBS would be poor for sending 16-byte packets)

If its is an existing robot and you can't swap out the Arduino, I would just make up something that work for this one use case.

On Wed, Dec 21, 2022 at 7:09 AM Francisco Miguel Moreno < @.***> wrote:

After searching around the Web I have not found (yet) any project that supports serial communication between ROS 2 machines and 8-bit microcontrollers like the Arduino Uno/Mega. I know of the microROS https://github.com/microROS project, and the other projects that are referenced in the README, but all of them are targeting 32-bit boards.

I understand that this project is also focused on 32-bit boards (FreeRTOS / MicroCDR), so at this point I have a couple of questions:

1.

Is the development of this repo still active? Or has everything being moved to microROS? 2.

Is there anyone working on a library to offer support to smaller boards like the 8-bit Arduinos? I was planning to reuse an old project to build my own, based on HDLC https://en.wikipedia.org/wiki/High-Level_Data_Link_Control#Asynchronous_framing or COBS with a basic ARQ feature. However, if there is an intention to provide official support from the OSRF I would not mind to help/collaborate to make it happen and avoid duplicate and unnecessary work.

This is probably related to #67 https://github.com/osrf/ros2_serial_example/issues/67, but it was closed due to inactivity and was not even focused on smaller micros...

— Reply to this email directly, view it on GitHub https://github.com/osrf/ros2_serial_example/issues/81, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQKNRXOPH2COVX7UP3MSNDWOMMRPANCNFSM6AAAAAATFXJCAM . You are receiving this because you are subscribed to this thread.Message ID: @.***>

--

Chris Albertson Redondo Beach, California

Butakus commented 1 year ago

That is a completely valid point that I agree with. Sometimes the excuse is not wanting/not being able to change the hardware, and sometimes it's about simplicity. If you just want to control some LEDs, a motor and read a couple of sensors, it's easier to just get one of those Arduino from the drawer. Also, they are easier for beginners, which is a plus for educational projects.

In my case there are no constraints, and I could use whatever micro. I opted for the Arduino because it was already there, but I will consider all options now...

My question was mainly if there was any intention to work on this or if the plan is to put all those Arduinos to sleep forever, which makes sense as there are today better alternatives (technology evolves and we should with it).