Giter VIP home page Giter VIP logo

umi_robot_ros2's Introduction

umi_robot_ros2

This project provides:

  • ROS 2 Hardware interface,
  • ROS 2 UMI Robot MoveIt package,
  • and MicroROS ESP32 component for Servo control with a serial connection.

Getting Started

Hardware

This project uses the UMI robot hardware designed by Murilo Marques Marinho, Ph.D. It's a low-cost 3D printable robotic platform. You can access the UMIRobot website here. UMIRobot is an excellent platform for both robotics enthusiasts and students.

MicroROS Setup

MicroROS is a platform designed to bring ROS2 (Robot Operating System 2) to microcontrollers. This project uses a component for ESP-IDF (Espressif IoT Development Framework) that integrates MicroROS.

To set up MicroROS for this project, follow these steps:

  1. Clone the MicroROS for ESP-IDF component repository:
git clone https://github.com/BarisYazici/micro_ros_espidf_component.git
  1. Start the repository using the devcontainer for VSCode.
  • Open the project in Visual Studio Code.
  • Move the .devcontainer directory to the top level of your project.
  • Press F1 to open the command palette, then run the Dev Containers: Rebuild container command.
  1. Source the ESP-IDF environment setup script. This script sets up the environment variables and paths necessary for the ESP-IDF. Depending on the shell you're using, the command might be:
source $IDF_PATH/export.sh
  1. Switch to the servo_drive example folder.
cd examples/servo_drive
  1. Build the example servo_drive project
idf.py build
  1. Connect the ESP32 to your laptop. And give read-write permission to the docker container user.
sudo chmod a+rw /dev/ttyUSB0
  1. Flash the ESP32 with the servo_drive example
idf.py flash

Setting up the umi_robot_ros2 workspace

This project uses a development container in Visual Studio Code for a consistent and easily reproducible development environment.

  1. Ensure you have Docker installed and running on your machine.
  2. Install Visual Studio Code.
  3. Install the Remote - Containers extension in Visual Studio Code.
  4. Open the project in Visual Studio Code.
  5. Move the .devcontainer directory to the top level of your project.
  6. Press F1 to open the command palette, then run the Dev Containers: Rebuild container command.

This will build the Docker image as defined in the .devcontainer directory and start a container. Your workspace will automatically be mounted into the container, and you'll be connected to the running container.

Creating a ROS2 Workspace

Once you're in the development container, you can create a ROS2 workspace:

mkdir -p ~/ros2_ws/src
cd ~/ros2_ws/src

Building the Project

To build the project,

colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release

Connecting the ROS 2 Agent

Make sure that you connected the ESP32 through serial communication to your computer. Run the following docker container to connect the MicroROS agent.

docker run -it --rm --device=/dev/ttyUSB0 microros/micro-ros-agent:humble serial --dev /dev/ttyUSB0 -b 115200 -v6

Running the MoveIt Example

After connecting the ROS 2 agent making sure that you can receive data from the Microros agent in ESP32 microcontroller, you can run the MoveIt example with the following command:

ros2 launch umi_robot_moveit_config demo.launch.py

This will start the RViz2 application with MoveIt motion plannning plugin.

umi_robot_ros2's People

Contributors

barisyazici avatar

Stargazers

张志诚 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.