sudo apt install -y git cmake python3-pip
; Add these in platformio.ini
board_microros_distro = humble
board_microros_transport = serial
lib_deps =
https://github.com/micro-ROS/micro_ros_platformio
# Run Micro-ROS agent (humble) in a container with access to serial device
docker run -it --rm -v /dev:/dev -v /dev/shm:/dev/shm --privileged --net=host microros/micro-ros-agent:humble serial --dev /dev/ttyACM0 -v6
# Run Micro-ROS agent (humble) in a container with access to multiple serial devices
docker run -it --rm -v /dev:/dev -v /dev/shm:/dev/shm --privileged --net=host microros/micro-ros-agent:humble multiserial --devs "/dev/ttyUSB0 /dev/ttyACM0" -v6
# UDPv4 micro-ROS Agent
docker run -it --rm -v /dev:/dev -v /dev/shm:/dev/shm --privileged --net=host microros/micro-ros-agent:humble udp4 --port 8888 -v6
# Run container in interactive mode
docker run -it --rm osrf/ros:humble-desktop
# Return a list of all the topics currently active in the system
ros2 topic list
# To see the data being published on a topic, use
ros2 topic echo /button
# To publish data onto a topic directly from the command line
ros2 topic pub /led std_msgs/UInt8 "data: 1" --once
ros2 topic pub /led std_msgs/UInt8 "data: 0" --once