Skip to content

Tutorial on making an ESP32 ROS Companion, that uses serial communication to read values from a computer and sends to the ROS network via wifi.

Notifications You must be signed in to change notification settings

lesaf92/esp32_ros_companion

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 

Repository files navigation

ESP32 ROS Companion

Tutorial on making an ESP32 ROS Companion, that uses serial communication to read values from an isolated computer and sends to the ROS network via wifi for a ROS enabled computer to get access.

Software setup and requirements

  • ROS Noetic
  • ESP32 Arduino framework
  • rosserial package
  • ros_lib Arduino library
  • python for serial communication (or anything that talks via serial)

Hardware setup

  • Computer as ROS Master
  • Isolated computer
  • ESP32 dev board and USB cable
  • Wi-Fi router

Use case

The code provided in this repo can be used to test a simple application. The objective is to iteratively read a 6DOF pose data on a Python code, sending it through serial and then encapsulating it as a PoseStamped message to a topic in the ROS network via Wi-Fi. The following chart shows the flow of data in a sample case of 3 computers in a ROS network.

flowchart TD;
    A[Isolated 
    Computer] -->|Serial| B(ESP32);
    B --> |Wi-Fi|C{Router};
    C <-->|Wi-Fi| D[ROS computer A];
    C <-->|Wi-Fi| E[ROS computer B];
    C <-->|Wi-Fi| F[ROS computer C];
Loading

On the isolated computer

python3 send_serial_esp32.py

On the ROS computer

roscore
rosrun rosserial_python serial_node.py tcp

On the ESP32

Compile and upload the project serial2roswifi.

About

Tutorial on making an ESP32 ROS Companion, that uses serial communication to read values from a computer and sends to the ROS network via wifi.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published