The Teensy also has a CAN FD bus, which could be another nice option for more deterministic communication between devices. The wiring would be pretty minimal and the peer-to-peer nature seems like it would fit well with publish/subscribe data transfer.
In case anybody wants to use this lib with platformio, it appears that adding the following line (for Teensy 4.1)
build_flags = -L ./lib/microros_ros_arduino-0.0.2/imxrt1062/fpv5-d16-hard/ -l libmicroros
platformio.ini fixes the linker issues, without having to modify the
platform.txt file needed when compiling with the Arduino IDE.
Hello @rom1 could you share some instructions for using micro-ROS with PlatformIO?
I’m still testing it right now, but so far it does compile and upload correctly. All that’s needed is to create a new PlatformIO project, placing the
micro_ros_arduino folder inside the
lib/ folder that’s generated when you create a new project. After that, you need to modify the
platform.txt file to add the
build_flags, it’ll end up looking something like this (in my case, the
micro_ros_arduino is named
[env:teensy41] platform = teensy board = teensy41 framework = arduino build_flags = -L ./lib/microros/imxrt1062/fpv5-d16-hard/ -l libmicroros
You might need to add
#include <Arduino.h> to some files, since platformio does not include it by default. I’ve been trying to test it but haven’t been able to compile the
micro_ros_agent to do so.
Let me know if you have any other problem build the agent and please give us feedback about the PlatformIO + micro-ROS behavior.
Oh, thanks, that was exactly the issue that I was getting. I’ll get back to you after I test this. On an unrelated note, does micro-ROS support
UART? I modified the teensy_transports.c just to test with the normal arduino
Update: the example publisher works well when compiled with PlatformIO and using uart.
Cool, maybe we can do some kind of tutorial in order to show this PlatformIO initial test to the community.
In case of anyone interested to know how to connect and use micro-ros with teensy, I have published a tutorial article in this link. how-to-connect-teensy-3-2-with-micro-ros-and-ros2-foxy. Hope this helps someone.
Thanks for this great quality article!
Hi guys, I managed to run a simple pub-sub demo using PlatformIO. I documented my progress here GitHub - linorobot/micro_ros_platformio
Is there any potential way to create a ROS 2 node on a microcontroller without the Micro-ROS agent? I was thinking about whether it would be possible to create a simple pub/sub (constrained even to a single type like String is fine!) with a ESP32 microcontroller that is not reliant on an agent living somewhere else, as that breaks decentralization.
Hello, the brokerless P2P does not entirely fit your needs because it only communicates micro-ROS nodes, and in this P2P mode there is no interaction between micro-ROS and ROS 2.
With no agent, one idea could be to write a RMW with a lightweight RTPS compatible middleware, for example embeddedRTPS. We think that it is possible to port embeddedRTPS to the ESP32 LwIP layer and will look into it.