- Author
- Peter Polidoro
- License
- BSD
sudo apt-get remove docker docker-engine docker.io containerd runc
sudo apt-get update
sudo apt-get install \
ca-certificates \
curl \
gnupg \
lsb-release -y
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin -y
sudo groupadd docker
sudo usermod -aG docker $USER
docker pull microros/micro-ros-agent:humble
docker pull microros/micro_ros_static_library_builder:humble
https://www.arduino.cc/en/software
mkdir -p ~/MicroRosArduinoIde && cd "$_"
mv ~/Downloads/arduino-1.8.19-linux64.tar.xz .
tar -xf arduino-1.8.19-linux64.tar.xz
wget -c https://www.pjrc.com/teensy/td_156/TeensyduinoInstall.linux64
chmod 755 TeensyduinoInstall.linux64
./TeensyduinoInstall.linux64
# Select ~/MicroRosArduinoIde/arduino-1.8.19/ to install Teensduino
# Select None additional libraries to install
export ARDUINO_PATH=~/MicroRosArduinoIde/arduino-1.8.19
cd $ARDUINO_PATH/hardware/teensy/avr/
curl https://raw.githubusercontent.com/micro-ROS/micro_ros_arduino/main/extras/patching_boards/platform_teensy.txt > platform.txt
cd ~/MicroRosArduinoIde
wget -c https://github.com/micro-ROS/micro_ros_arduino/archive/refs/tags/v2.0.5-humble.tar.gz
rm -rf ~/Arduino/libraries/micro_ros_arduino
tar -zxf v2.0.5-humble.tar.gz -C ~/Arduino/libraries/
cd ~/MicroRosArduinoIde
git clone -b humble [email protected]:micro-ROS/micro_ros_arduino.git
cd micro_ros_arduino
docker run -it --rm -v $(pwd):/project --env MICROROS_LIBRARY_FOLDER=extras microros/micro_ros_static_library_builder:humble
cd ~/Arduino/libraries
ln -s ~/MicroRosArduinoIde/micro_ros_arduino
./MicroRosArduinoIde/arduino-1.8.19/arduino
- Plug in Teensy 4.0
- Select Tools:Port:/dev/ttyACM0
- Navigate to File:Examples:INCOMPATIBLE:micro_ros_arduino:micro-ros_subscriber
- Upload
mkdir -p ~/tmp && cd "$_"
git clone https://github.com/micro-ROS/micro_ros_platformio
cd ~/tmp/micro_ros_platformio/examples/micro-ros_publisher/
pio run -e teensy40 --target upload
docker run -it --rm -v /dev:/dev --privileged --net=host microros/micro-ros-agent:humble serial --dev /dev/ttyACM0 -v6
docker run -it --rm --net=host ros:humble
ros2 topic list
ros2 topic pub -1 /micro_ros_arduino_subscriber std_msgs/msg/Int32 "data: 1"
ros2 topic pub -1 /micro_ros_arduino_subscriber std_msgs/msg/Int32 "data: 0"