Best practices MCU to ROS2 SBC

asked 2022-10-08 14:42:00 -0500

PointCloud gravatar image

Hi all,

I'm trying to understand the best approach in getting communication working between a Teensy 4.1 and an NVIDIA Jetson Nano. There are likely many others asking themselves the same question, of how to get started with an ambitious project.. So with some luck this thread will hopefully provide some answers to others in the future.

As far as I'm aware there are certain limitations that need to be factored in, along with guidelines / specifications for the project.

So here it the scope: Hardware: 1. Low level control node is Teensy 4.1 2. ROS 2 (or ROS2, depending on your preference) on SBC (Nvidia Jetson Nano)

This ultimately leads to: Software: 1. Teensy being programmed in C/C++ 2. SBC ideally running python scripts

The communication should be done via one of the many Serial-Ports the Teensy offers, as USB needs to be kept open for downloading new programs (Yes downloading, Arduino calls it uploading but it's WRONG. Topic for another discussion)

Question now is, how is this best possibly implemented as ROS2 (ROS 2) serial communication is not as straight forward as it was with ROS1? Keep in mind that a lot of beginners starting with an Arduino or Teensy and lack the knowledge to program the entire serial communication on ROS 2 side.

  1. Forget about ROS 2 until Serial support is implemented (if ever)
  2. Use ROS1 to ROS2 bridge?
  3. Use rosserial on the MCU, but on the SBC use???
  4. Use microROS where you are forced to use an Arduino, due to lack of support for more powerful MCU's?

At the moment, I'm absolutely stuck and seriously considering throwing the towel, after 4 months of Hardware development / assembly and wiring. I just can't see a way forward, other than writing forum posts until this is solved...

Any pointers to the actual best approach would be greatly appreciated.

edit retag flag offensive close merge delete

Comments

What have you tried so far and what were the blockages?

Haven't used it but this repo aimed to provide a simple implantation as well as references to other project to achieve this: https://github.com/osrf/ros2_serial_e...

marguedas gravatar image marguedas  ( 2022-10-08 17:28:19 -0500 )edit

Hi and thank you @marguedas

I have attempted to use microROS, so far without any luck, as I'm getting stuck with the limited examples available. Not to anyone's fault but mine, that I don't fully understand how to port it from the publisher example from micro-ros_platformio to a service or subscriber. Also likely that I'm piling too much on my plate with the entire set-up.

In my opinion microRos is amazing, but very difficult for a beginner to understand, especially being paired with working in Platformio and an advanced (less popular compared to arduino) platform like teensy.

I will mainly focus on a microROS implementation, but in the meantime, just to get things started off, I will look closer at the ros2_serial_example you suggested. Thank you for that! Truly appreciate it

Once I mke some progress, I do plan on merging it back to the main ...(more)

PointCloud gravatar image PointCloud  ( 2022-10-08 17:52:21 -0500 )edit