Skip to content

Control of the myBuddy280 manipulator through integration with ROS 2 and Robonomics

License

Notifications You must be signed in to change notification settings

Fingerling42/mybuddy280-ros2-robonomics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contributors Forks Stargazers Issues Apache-2.0 License


myBuddy 280 with Robonomics for ROS 2

Python ROS 2 packages for control of the myBuddy 280 manipulator through integration with Robonomics parachain

Table of Contents
  1. About Project
  2. Getting Started
  3. Usage
  4. Contributing
  5. License
  6. Contact
  7. Acknowledgments

About Project

This ROS 2 Python packages provide interface for usage of Robonomics ROS 2 wrapper with myBuddy 280, a double 6-DOF dual-arm collaborative robot created by Elephant Robotics. The robot consists of two myCobot 280 manipulators with ATOM Matrix ESP32-PICO boards, 7" sensor display, two built-in cameras and Raspberry Pi 4B as the main computing unit.

The goal of the project is to provide the ability to remotely control a robot and receive its telemetry via secure and decentralized cloud of Robonomics Network. Robonomics allows to store digital twins of robotics and IoT devices and get access to them through the network.

Current available features include:

  • a custom robot driver for ROS 2 based on pymycobot library, a Python API for Elephant Robotics products: the driver can get states of each joints for both arms and wrist as well as send angles to them;
  • automatic sending of robot joint states using Robonomics datalogs;
  • a remote joint control by sending a launch function to the robot's address.

DISCLAIMER: There is an official ROS 2 package for the robot provided by the developers. However, some necessary API functions are missing in this package, so a custom driver is used here. Keep in mind that the custom driver is still in development.

(back to top)

Project Structure

For convenience, the project is divided into several ROS 2 packages:

.
├── mybuddy280_driver           # A package with the custom ROS 2 driver for myBuddy 280
├── mybuddy280_interfaces       # A package that describes types of robot's services and messages
├── mybuddy280_robonomics       # Main package with Robonomics handler for myBuddy 280
└── ...

(back to top)

Getting Started

Prerequisites

Make sure you have the following software installed on myBuddy 280:

You also need to create an account on Robonomics parachain and write down seed phrase and account type. Make sure, that you have a free account balance to make transactions. The guide is available here. After creating an account, do not forget to insert the seed phrase to the account_params.yaml file of Robonomics ROS 2 wrapper package.

WARNING: The seed phrase is sensitive information that allows anyone to use your account. Make sure you don't upload a config file with it to GitHub or anywhere else.

(back to top)

Installation and Building

  1. Open a console instance on your robot directly or via SSH.

  2. Create directory for ROS 2 workspace and the src subdirectory:

    mkdir -p your_project_ws/src
    cd your_project_ws/src
  3. Clone this repo to src directory:

    git clone https://github.com/Fingerling42/mybuddy280-ros2-robonomics.git
  4. Build the package from your_project_ws directory:

    colcon build
  5. Source the package to the environment (you will need it to do in every console instance or add it to .bashrc):

    source install/setup.bash

(back to top)

Usage

  1. First, launch IPFS Daemon:

    ipfs daemon
  2. In separate console instance run the ROS 2 launch file from driver directory. It will launch main driver node a node that will connect to the robot via a serial port:

     ros2 launch mybuddy280_driver mybuddy280_ros2_launch.py
  3. In another console instance run the main launch file with Robonomics handler for the robot (do not forget about sourcing the package to the environment). It will launch all necessary nodes: nodes from Robonomics wrapper and main integration for myBuddy 280:

     ros2 launch mybuddy280_robonomics mybuddy280_robonomics_launch.py
  4. You will see logs in the console with IPFS ID, path to directory with IPFS files and Robonomics address. The main node starts publish datalogs with a states of every joints every 1 min. You can check the datalog transactions, using, for example, Subscan explorer (just enter your Robonomics address).

  5. The node also starts waiting for every launch command, that will be sent to specified address. You can test it using the Robonomics parachain portal: go to DevelopersExtrinsicsSubmission and find launch function.

  6. The joints are controlled using /myBuddy280/send_joint_angles service, so you need to prepare corresponding message for its request, that will go as a launch parameter. For convenience, this message need to be added as JSON-file to IPFS:

       {
        "part_id": "R/L/W",
        "joint_number": [
            1,
            
            6,
        ],
        "angle": [
            0.0,
            
            0.0
        ],
        "speed": [
            100,
            
            100
        ]
    }
  7. Then, you will need to upload the JSON file to IPFS and get its CID in special format (32-byte hash). For sending launch on the Robonomics parachain portal just specified the robot address and formatted string as the param. Submit transaction and watch for the action.

(back to top)

Contributing

If you have a suggestion or correction, please feel free to participate! You should:

  1. Fork the project
  2. Add and commit your changes
  3. Open a pull request

(back to top)

License

Distributed under the Apache-2.0 License. See LICENSE.txt for more information.

(back to top)

Contact

Ivan Berman — @berman_ivanberman@robonomics.network

(back to top)

Acknowledgments

(back to top)

About

Control of the myBuddy280 manipulator through integration with ROS 2 and Robonomics

Topics

Resources

License

Stars

Watchers

Forks