Giter Club home page Giter Club logo

esp_arduino_ethernet's Introduction

ESP32-ROS-ETH

This repository is a part of AnywhereInLoop project

Introduction

This is an template PlatformIO project for ESP32-ETH-Kit, please use PIO-IDE to open this project and the dependency will be installed by PIO-IDE automatically.

This project realized the communication between PC and ESP32 through UDP. Support the ros_msg data format.

Mention

This project did not initialize a ROS node in ESP32. To transmitting data, an extra node is required for building interface between ROS and ESP32.

Manual

The file structure is shown below:

.
├── includes # Headers are here
│   └── README
├── lib # Self-defined libiraries
│   ├── ethernet
│   ├── README
│   └── ros_lib # Generated By ROS_Serial
├── platformio.ini # Project configuration file
├── README.md # This file
├── src # Source codes are here
│   ├── eth_task.cc # Ethernet have an individual thread
│   └── main.cpp # main task is used for initialize device
└── test # Unused
    └── README

For self-defined libiraries, here gives using guidance:

ethernet
├── ethernet.cc
├── ethernet.h # Initialize connection and create a thread
└── ros_eth
    ├── eth_rosmsg.cc
    └── eth_rosmsg.h # Defines the receiviable format of ros_msg

In ethernet.h, The class Ethernet_t is defined as a singuleton class, which can only get the instance by using function below:

Ethernet_t::getInstance()

Here are provided API in ethernet.h:

void Ethernet_thread(void* pvParameter);
bool Init(IPAddress static_ip, IPAddress gateway, IPAddress subnet);
void getETHStatus();

The function

void Ethernet_thread(void* pvParameter);

have an weak define in ethernet.cc, which can be overwrite by user, is an FreeRTOS thread entry function.

In ros_eth/eth_rosmsg.h, Here provided 2 often used ros_msg format, you can override the function due to your requirements:

bool getMsg(geometry_msgs::Twist* msg);
bool getMsg(geometry_msgs::TwistStamped* msg);

esp_arduino_ethernet's People

Contributors

uon-hari avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.