Ask Your Question
0

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
0

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

kneave gravatar image

Following up on my research on this it seems there isn't currently a best practice however these are the most common solutions:

  1. ROS1 to ROS2 bridge and use ros-serial/ros-arduino
  2. Use one of the soloutions listed on this page

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 flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

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

Seen: 63 times

Last updated: Jun 15