Giter Club home page Giter Club logo

ros2_esp32bot's Introduction

ROS2_ESP32Bot

Dependency

  • ROS2 Dashing Diademata
  • ros2arduino 0.1.3
  • Micro-XRCE-DDS Agent 1.1.0

Prepare Hardware

Build a your own bot

I bought below parts.

Setup dependency

Setup Micro-XRCE-DDS Agent

You need to setup Micro-XRCE-DDS Agent for using ros2arduino.

Arduino ESP32

If you have not setup arduino environment yet, you can check the instraction at here

Getting started

Make sure you need an access point.

$ git clone https://github.com/shirokunet/ros2_esp32bot
$ cd ros2_esp32bot/main/
$ cp network_config_templrate.h network_config.h
$ vi network_config.h
#define SSID       ""
#define SSID_PW    ""
#define AGENT_IP   ""
#define AGENT_PORT 2018

And write the .ino file into your ESP32.

Run ROS2 nodes for sending commands

Run MicroXRCEAgent

$ MicroXRCEAgent udp -p 2018 -v 6

If you get error messages like below:

terminate called after throwing an instance of 'std::bad_alloc'
  what():  std::bad_alloc
Aborted (core dumped)

Try to run.

$ LD_PRELOAD="/usr/local/lib/libfastrtps.so.1 /usr/local/lib/libfastcdr.so.1" MicroXRCEAgent udp -p 2018

Run joy_node

$ ros2 run joy joy_node

Run teleop_node

$ ros2 run teleop_twist_joy teleop_node

Useful commands for debugging

$ ros2 node list
$ ros2 topic list
$ ros2 topic echo /esp32bot/status
$ ros2 topic echo /esp32bot/chatter
$ ros2 topic echo /joy
$ ros2 topic echo /cmd_vel

teleop_twist_joy for Logicool Gamepad F310

If you do not have a PS4 controller, you can buy F310 and use my repository.

ros2_esp32bot's People

Contributors

shirokunet avatar

Watchers

James Cloos 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.