This is an experimental micro-ROS app to use PlatformIO as an alternative to Arduino IDE in developing micro_ros_arduino based firmware on Teensy series boards. Here are a few motivations why:
-
Allow headless development since you don't need the Arduino IDE to program your firmware with PlatformIO.
-
Less setup required. PlatformIO automatically downloads micro_ros_arduino as a dependency, the first time you compile your code.
-
Provide a development template for PlatformIO users.
Follow these instructions on micro-ROS' wiki on how to use Teensy with Arduino - Installing ROS 2 and micro-ROS in the host compute .
You can check out the installation guide how to Install PlatformIO here.
Download the udev rules from Teensy's website:
wget https://www.pjrc.com/teensy/00-teensy.rules
and copy the file to /etc/udev/rules.d :
sudo cp 00-teensy.rules /etc/udev/rules.d/
The default board used in this demo is Teensy 3.6 but you can uncomment the Teensy board you're using
[env:teensy36]
board = teensy36
; [env:teensy35]
; board = teensy35
; [env:teensy36]
; board = teensy36
Upload the firmware by running:
cd micro_ros_platformio
pio run --target upload
Run the micro-ROS agent to relay the data streaming from your microcontroller to your host computer through the Serial port:
ros2 run micro_ros_agent micro_ros_agent serial --dev /dev/ttyACM0
Now you can use ros2 topic tool to display the messages being published by the agent:
ros2 topic echo /micro_ros_arduino_node_publisher
- Nothing's displayed on ros2 topic echo.
- Try unplugging your microcontroller after uploading the firmware and run the agent again.