Micro-ROS for STM32

Post here to discuss any new features, components, chips, etc, that you would like to see in Flowcode.
Post Reply
Brendan
Posts: 58
http://meble-kuchenne.info.pl
Joined: Tue Dec 08, 2020 2:12 pm
Has thanked: 45 times
Been thanked: 12 times

Micro-ROS for STM32

Post by Brendan »

Hi everyone.

I'm at a bit of a juncture with Flowcode and a high-profile professional project.

I'm developing system hardware and functions for a robotics system, based around STM32F407IG, and I must now investigate micro-ROS integration to the MCU.

A colleague found and highlighted a topic (mid-2024) suggesting that it was tentatively being considered for Flowcode support, though I'm unaware if this is a likely proposition in the near-term, if indeed at-all. I must therefore consider whether it will be necessary to engage a software engineer to code the project in CubeMX from the outset, or if Flowcode support for micro-ROS will be rolled out in due course?

I can code the project in Flowcode until such time, though dispensing with an entire project and re-coding from scratch further down the road would be a non-starter.

Thanks and best regards,

Brendan

BenR
Matrix Staff
Posts: 1936
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 506 times
Been thanked: 688 times

Re: Micro-ROS for STM32

Post by BenR »

Hi Brendan,

I've just been looking into this again and it seems that everything examples wise is tailored to a Raspberry pi, MPU with OS, or extreemly capable MCU and so I think it's unlikely we could create something that did everything you would need.

There is an example for FreeRTOS which can be ran on most MCUs but maybe in a cut down form and so even this I couldn't guarentee would be ok on an MCU.

Robotcs is something we want to do more with and having other external APIs we can interact with would be very welcomed but it looks like ROS is maybe a bit too heavy for us to do well.

I could be wrong, there could be something I'm missing.

If I don't look at the ROS website and instead google around the problem it looks like a standard Arduino can be a fully fledged ROSS node so there is hope.

https://maker.pro/arduino/tutorial/how- ... system-ros

I'll see if I can get hold of the latest Arduino library and have a better poke around. I imagine there will be a fair amount of requirements such as timer interaction to allow things to happen at certain time periods.

BenR
Matrix Staff
Posts: 1936
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 506 times
Been thanked: 688 times

Re: Micro-ROS for STM32

Post by BenR »

Aha, from Reddit.
I don't think it is possible out of the box, unfortunately :( I have the same issue, but micro-Ros needs at least 32k of RAM (much more than what Arduino Uno or Mega have) On ROS 1 it was possible with rosserial, indeed, but it has been phased out in favor or micro-ros
This is interesting.
a) You don't need Micro ROS if you are making a robot that runs ROS on a Raspberry pi or something and you are running the motors via an Arduino. Instead write a simple ROS node on your Raspi that listens to cmd_vel or whatever you want (in my case I use ros2 control) and then talks to the Arduino over plain serial (not rosserial just python opening a serial port and talking to the arduino connected via USB or another UART).

b) If you are just using an Arduino without a raspberry pi then you might as well not use ROS at all and save yourself some time.

Micro ROS doesn't seem to support many different types of hardware yet and looks like a pain in the ass in general to get going unless you really need it.
Option A would allow something like a Arduino Teensy or RPI Compute module to run the ROS node and then use this to forward to the MCU which does the simple motor control. Of course your solution of a single chip STM32 is maybe more straightforward and elegant.

Brendan
Posts: 58
Joined: Tue Dec 08, 2020 2:12 pm
Has thanked: 45 times
Been thanked: 12 times

Re: Micro-ROS for STM32

Post by Brendan »

Hi Ben.

Thank you so very much for investigating further, and for your valued time to reply. I really do appreciate this.

I will take this back to the team early next week in order that we can now arrive at well-informed decisions going forwards, hoping that scope remains for Flowcode-based integrations for our substantial project.

Since 2012 I've used Flowcode to empower development of literally all of my professional embedded projects - considerably assisted by exceptional quality of support, expertise, and vibrant community, and a most valued product I have come to rely upon.

My thanks and best regards,

Brendan

Post Reply