MonkyDCristian / esp32_micro_ros

PlatformIO repository to use the ESP32 devkit microcontorller with the Micro-ROS framework for th learning purposes.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ESP32_MICRO_ROS

Description

Repository to learn to use plataformio_microros with the ESP32 DEV KIT miccrocontorller.

Dependencies

Software

PlatfotmIO

Hardware

Install

sudo apt-get install python3-venv

install the repository as a platformIO project:

Note: if the micro_ros_platformio doesn't install, comment any ROS pkg source in your .bashrc, like this:

# Setup ROS2
#source /opt/ros/humble/setup.bash
#source /opt/vulcanexus/humble/setup.bash

Delet the /.pio/libdeps/esp32doit-devkit-v1/micro_ros_platformio folder and restart the computer.

Open the proyect with VSC again, the microros_ros_platformio should install correctly.

Tutorials

One you are ready with the turorials checks the examples:

Demo

Go to your platformio.ini file to set the build_src_filter:

build_src_filter = +<examples/pub_sub_timer/*> -<.git/> -<.svn/>

Now compile and upload the firmware.uf2 file to raspberry PI pico, use the one that is inside the .pio/build/pico/ folder.

Find your serial [device name]:

ls /dev/serial/by-id/*

Add access to USB port

sudo chmod a+wr [device name]

Start micro_ros_agent:

ros2 run micro_ros_agent micro_ros_agent serial --dev [device name]

visualice msgs with ros Qt tools

rqt 

Turn down the LED low

ros2 topic pub /micro_ros_subscriber std_msgs/msg/Int16 data:\ 0\

Turn down the LED high

ros2 topic pub /micro_ros_subscriber std_msgs/msg/Int16 data:\ 1\

About

PlatformIO repository to use the ESP32 devkit microcontorller with the Micro-ROS framework for th learning purposes.


Languages

Language:C++ 100.0%