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

ROS2 Foxy - Arduino Best Practice?

asked 2020-06-08 05:58:38 -0500

kneave gravatar image

Howdo,

TLDR: What is the best practice in ROS2 to send and received messages on an Arduino/Teensy please?

I've been building a robot and I've been using ROS1 in a very naive way to send messages from a custom controller, I'm using a Teensy on the controller to monitor the state of physical switches and joysticks and on the robot to translate between servos and sensors. I've been using ros-serial and -arduino for this. On both sides the microcontrollers are connected to a Raspberry Pi.

I've decided to switch to ROS2 as my knowledge of ROS is still basic and I figure it would give me a head start on learning the new architecture. Had a bit of a play and very impressed with the multicasting!

The one sticking point is getting communications between the Teensy board and ROS2, is there a best practice for this with Foxy please? I've been researching my options and it seems like there isn't consensus on this at the minute. Is the best bet at the minute to have a custom node on the Pi translating or is there some option I've missed?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2020-06-15 08:48:58 -0500

kneave gravatar image

updated 2020-10-31 05:12:03 -0500

Following up on my research on this it seems there isn't currently a best practice however these are the most common solutions, micro-ros support for Teensy has recently been added but early in development at the minute:

  1. ROS1 to ROS2 bridge and use ros-serial/ros-arduino
  2. Use one of the soloutions listed on this page
  3. Use an Open CR or Teensy and this library.

ros2arduino seems like the best fit however it isn't currently listed as running with Foxy. I'm going to go with option 1 for now, I have existing code that runs on ROS1 that I can use for communicating with an Arduino.

Edit to add micro-ros update.

edit flag offensive delete link more

Comments

Hey, just wondering how you went with this? Looking into doing something very similar, but with a Arduino mega.

TheMilkman92 gravatar image TheMilkman92  ( 2020-11-04 19:31:24 -0500 )edit
1

I've not got any further to be honest but the 3rd item is the most promising, it's only for OpenCR or the Teensy though. The Teensy 4.1 could be an option if you are able to swap that for the Mega?

kneave gravatar image kneave  ( 2020-11-07 12:00:33 -0500 )edit

Yeah I tried to get all 3 of those working aswell. Decided to go back to Kinetic for now, but will try teensy and foxy in a later version

TheMilkman92 gravatar image TheMilkman92  ( 2020-11-19 22:27:52 -0500 )edit

i was in same thing but i just want to know how to make the bridge as i tried the bridge but the topic which is publishing the data is not seen in ros 2 please help..

kathan_patel gravatar image kathan_patel  ( 2021-07-02 06:58:33 -0500 )edit

Hi Kathan, you need to start a new question for that, it'll mean the most people possible will see and be able to help.

kneave gravatar image kneave  ( 2021-07-20 11:47:18 -0500 )edit

Question Tools

3 followers

Stats

Asked: 2020-06-08 05:58:38 -0500

Seen: 2,881 times

Last updated: Oct 31 '20