Giter Club home page Giter Club logo

micro_ros_rc_receiver's Introduction

micro_ros_rc_receiver

This projects outlines the process of building a ROS 2 RC receiver using ESP32 and micro-ROS. It aims to design a ROS 2 plug-and-play receiver which can be used to replace any standard RC receiver. The receiver can communicate either over serial using USB-C or Wifi.

Hardware

Basic Setup

The receiver is based on a Adafruit ESP32 Feather V2 (any board supported by micro_ros_arduino can be used). In the future, the Adafruit ESP32 Feather V2 might be replaced by the Arduino Nano RP2040 Connect to make use of the additional 6-axis IMU.

A custom PCB is used to connect at least two (more can be added) 3-pin plugs for connecting e.g. the ESC and servo of a standard RC car. This can be built using cheap perfboards.

This simple hardware setup already allows us to control a RC car using ROS 2.

Advanced Setup

For the advanced setup the receiver includes ports for four hall sensors which are used for wheel odometry.

Software

Setup

To integrate the micro-ROS receiver into a ROS 2 environment, two things are needed: a micro-ROS agent running on a host computer and the micro-ROS client running on the ESP32.

micro-ROS agent

To get the agent running, simply setup Docker on your host computer and run the following command in a shell:

# Serial micro-ROS Agent
docker run -it --rm -v /dev:/dev --privileged --net=host microros/micro-ros-agent:[YOUR ROS 2 VERSION] serial --dev [YOUR BOARD PORT] -v6

This command connects to an micro-ROS client over serial. Check your PORT and ROS 2 VERSION. Find more information here. There is also an command for connecting the client over Wifi.

When using WSL2 this article discribes how to connect a USB device to the Linux distribution.

micro-ROS client

The client is based on micro-ROS for Arduino reconnection example. Install Arduino IDE 2, add Arduino-ESP32 support and download the micro-ROS library for Arduino following the instructions on micro-ROS for Arduino. Use the board manage to select your board and port.

Clone this repo and upload the micro_ros_rc_receiver.ino file to your device.

Connect the device over USB to the host where the micro-ROS agent is running. To check the devices port run ls /dev/ttyACM* or ls /dev/ttyUSB* (linux) or check your device manager (windows).

micro_ros_rc_receiver's People

Contributors

ninoweg avatar

Watchers

 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.