Skip to main content

A client library for Rainbow Robotics' cobot RB-Series

Project description

RBPodo

CI Issues Releases Apache-2.0 python

:warning: Note: The API is currently under development and is subject to change.

This is a client library for Rainbow Robotics' cobots RB-Series. It is compatible with C++17.

You can find the documentation here.


Installation

To build rbpodo using CMake, just run

mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release ..
make

To install rbpodo for integrating your program, you just run

sudo make install

In your CMake project, you can include and link rbpodo

find_package(rbpodo REQUIRED)
target_link_libraries(<YOUR TARGET> rbpodo::rbpodo)

rbpodo is also available as a Python module. You can install it from PyPI via

pip install rbpodo

Or you can build and install Python module from source via

pip install .

Basic Example

You can find examples here.

C++

#include <iostream>
#include "rbpodo/rbpodo.hpp"

using namespace rb;

int main() {
  try {
    // Make connection
    podo::Cobot robot("10.0.2.7");
    podo::ResponseCollector rc;

    robot.set_operation_mode(rc, podo::OperationMode::Simulation);
    robot.set_speed_bar(rc, 0.5);

    robot.flush(rc);
    
    // Move robot in joint space
    robot.move_j(rc, {100, 0, 0, 0, 0, 0}, 200, 400);
    if (robot.wait_for_move_started(rc, 0.1).type() == podo::ReturnType::Success) {
      robot.wait_for_move_finished(rc);
    }
    // If there is any error during above process, throw exception error
    rc.error().throw_if_not_empty();
  } catch (const std::exception& e) {
    std::cerr << e.what() << std::endl;
    return 1;
  }
  return 0;
}

Python

import rbpodo as rb
import numpy as np

ROBOT_IP = "10.0.2.7"


def _main():
    try:
        robot = rb.Cobot(ROBOT_IP)
        rc = rb.ResponseCollector()

        robot.set_operation_mode(rc, rb.OperationMode.Simulation)
        robot.set_speed_bar(rc, 0.5)

        robot.flush(rc)
        
        robot.move_j(rc, np.array([100, 0, 0, 0, 0, 0]), 200, 400)
        if robot.wait_for_move_started(rc, 0.1).type() == rb.ReturnType.Success:
            robot.wait_for_move_finished(rc)
        rc.error().throw_if_not_empty()
    except Exception as e:
        print(e)
    finally:
        pass


if __name__ == "__main__":
    _main()

Joint Blending Move

blending_value = [0.01, 5.0, 20.0, 50.0]
q = []
for bv in blending_value:
    robot.move_jb2_clear(rc)
    robot.move_jb2_add(rc, np.array([90, 0, 0, 0, 0, 0]), 100, 100, bv)
    robot.move_jb2_add(rc, np.array([0, 0, 0, 0, 0, 0]), 100, 100, bv)
    robot.move_jb2_add(rc, np.array([90, 0, 0, 0, 0, 0]), 100, 100, bv)
    robot.move_jb2_add(rc, np.array([0, 0, 0, 0, 0, 0]), 100, 100, bv)
    robot.move_jb2_add(rc, np.array([90, 0, 0, 0, 0, 0]), 100, 100, bv)
    
    robot.flush(rc)
    robot.move_jb2_run(rc)

    data = []
    if robot.wait_for_move_started(rc, 0.5).type() == rb.ReturnType.Success:
        while robot.wait_for_move_finished(rc, 0.).type() == rb.ReturnType.Timeout:
            data.append(data_channel.request_data().sdata.jnt_ref)
            time.sleep(0.01)
        q.append(np.squeeze(np.array(data)[:, 0]))
q = np.vstack([np.hstack((e, np.tile(e[-1], max([e.shape[0] for e in q]) - e.shape[0]))) for e in q])

You can plot q via plt.plot(np.arange(0, q.shape[1]) * 0.01, np.transpose(q))

img

Advanced Topic

:warning: Note: This is experimental feature. Be careful when you use this.

Realtime script

rt_script() allows for the direct integration of custom scripts into the real-time control loop executed within the control box of robotic arm systems. By enabling computation to be carried out locally in the control box, it significantly reduces communication latency associated with the updating control output to robot arm. For instance, variables related to the feedback loop—such as joint positions and electrical current measurements—can be accessed directly in the control box.

The following is the part of example.

robot.eval(rc, "var count = 0");

robot.rt_script_onoff(rc, true);
robot.rt_script(rc, "count += 1");

for ( ... ) {
  std::string count_str;
  robot.print_variable(rc, "count", count_str);
  ...
}

robot.eval(rc, "var count = 0");

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

rbpodo-0.10.2-cp312-cp312-win_amd64.whl (444.9 kB view details)

Uploaded CPython 3.12 Windows x86-64

rbpodo-0.10.2-cp312-cp312-manylinux_2_35_x86_64.whl (588.0 kB view details)

Uploaded CPython 3.12 manylinux: glibc 2.35+ x86-64

rbpodo-0.10.2-cp311-cp311-win_amd64.whl (444.6 kB view details)

Uploaded CPython 3.11 Windows x86-64

rbpodo-0.10.2-cp311-cp311-manylinux_2_35_x86_64.whl (586.5 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.35+ x86-64

rbpodo-0.10.2-cp310-cp310-win_amd64.whl (443.4 kB view details)

Uploaded CPython 3.10 Windows x86-64

rbpodo-0.10.2-cp310-cp310-manylinux_2_35_x86_64.whl (586.3 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.35+ x86-64

rbpodo-0.10.2-cp39-cp39-win_amd64.whl (422.7 kB view details)

Uploaded CPython 3.9 Windows x86-64

rbpodo-0.10.2-cp39-cp39-manylinux_2_35_x86_64.whl (586.5 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.35+ x86-64

rbpodo-0.10.2-cp38-cp38-win_amd64.whl (443.8 kB view details)

Uploaded CPython 3.8 Windows x86-64

rbpodo-0.10.2-cp38-cp38-manylinux_2_35_x86_64.whl (585.9 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.35+ x86-64

rbpodo-0.10.2-cp37-cp37m-win_amd64.whl (432.6 kB view details)

Uploaded CPython 3.7m Windows x86-64

rbpodo-0.10.2-cp37-cp37m-manylinux_2_35_x86_64.whl (614.0 kB view details)

Uploaded CPython 3.7m manylinux: glibc 2.35+ x86-64

File details

Details for the file rbpodo-0.10.2-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: rbpodo-0.10.2-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 444.9 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for rbpodo-0.10.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 9352ea6a306710b946c2e4ecd8c33f8360b4ef5558cb6fd5199cf11ddddf13ae
MD5 c050c99e67bea403776936a248b64d0e
BLAKE2b-256 285e7f6bf1789600dd940bdeddfa94d668b2bfb1335e48ab626e4fd9e4a802a4

See more details on using hashes here.

File details

Details for the file rbpodo-0.10.2-cp312-cp312-manylinux_2_35_x86_64.whl.

File metadata

File hashes

Hashes for rbpodo-0.10.2-cp312-cp312-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 feb4be2af642554de6bcfa6bef9c665b7b325685d15f35a241f2b76549082a3f
MD5 44d1acf60f4a94708c0f607682e7c5b7
BLAKE2b-256 5fd772545f6284cde4cf71a19190b1adf8dfb32129ffc8af5e0375bc7592f46c

See more details on using hashes here.

File details

Details for the file rbpodo-0.10.2-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: rbpodo-0.10.2-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 444.6 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for rbpodo-0.10.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 0ab52a6ebcc3b7d367f7df761aaaa772831fb24f5842ac8c60ec9f3da164c166
MD5 0374c533f24d8cffea8f793121749ade
BLAKE2b-256 2cdf6289097b08c7a2ec8d0996e21e95f9e4dee3494aa94a1a3cfd212ab75603

See more details on using hashes here.

File details

Details for the file rbpodo-0.10.2-cp311-cp311-manylinux_2_35_x86_64.whl.

File metadata

File hashes

Hashes for rbpodo-0.10.2-cp311-cp311-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 96581057f384879bf8f7f9c15f7a2b3bb3eb1f8b23e5bb32f05fd50b0df94ba1
MD5 388c5e87a6bc2655ac8ab0fe142c0f3a
BLAKE2b-256 9e880c0b7c1e948d7df28fdce9be9369b047e7c308d3c62acac47b1d59e091ee

See more details on using hashes here.

File details

Details for the file rbpodo-0.10.2-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: rbpodo-0.10.2-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 443.4 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for rbpodo-0.10.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 1e74358f294f86d8b8750aad148af5257ac95012c8bea7183829a11e388fbb00
MD5 648b09f88451ce56e9b8128fca23daab
BLAKE2b-256 8dc7d6e3f12d692c853b73d2976f921201222e1c5555c8d84bd52c9b90cad511

See more details on using hashes here.

File details

Details for the file rbpodo-0.10.2-cp310-cp310-manylinux_2_35_x86_64.whl.

File metadata

File hashes

Hashes for rbpodo-0.10.2-cp310-cp310-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 8aa88b298c380d3f8a3c74602416aa8c49bf10a56c25976913b14984a0bf80b9
MD5 e03398ad54b85cdf2a0af05205b9d4b6
BLAKE2b-256 0dc35cf5a7e37ab38fd2ef6bdfb95fed320062f87fa843b1db2c10c23848eaba

See more details on using hashes here.

File details

Details for the file rbpodo-0.10.2-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: rbpodo-0.10.2-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 422.7 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for rbpodo-0.10.2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 16d1415cd66c3c6d3f80e9b92e38678bf973577c1e1cfbdb7f6f2f605b70051e
MD5 9856b05237a69ab26018f716e3391e91
BLAKE2b-256 c2205922c7978ebe5f2d30398d5243e9d7ab47407669523be5d4654da7a03b7b

See more details on using hashes here.

File details

Details for the file rbpodo-0.10.2-cp39-cp39-manylinux_2_35_x86_64.whl.

File metadata

File hashes

Hashes for rbpodo-0.10.2-cp39-cp39-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 5e61b8619a87c02325f3a435f9ff0f2ead4aaef5c03bf838559868c8e17098a6
MD5 fb415df4b74e5e67b74eeecdb5efd114
BLAKE2b-256 30acbac8ef1b903c84feee2c74452a1b1f544e781de95958af8b14249fd47180

See more details on using hashes here.

File details

Details for the file rbpodo-0.10.2-cp38-cp38-win_amd64.whl.

File metadata

  • Download URL: rbpodo-0.10.2-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 443.8 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for rbpodo-0.10.2-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 f557b48388f0e911ee8768172beda14423bcf1731a0fea6292f9b462cae558cd
MD5 e55451e7e77f3eb80577af367f9a0981
BLAKE2b-256 190471d2ddc0ba4e06f4e8d0ab0c4816b4217ee082a15ad6a27c537296aa526f

See more details on using hashes here.

File details

Details for the file rbpodo-0.10.2-cp38-cp38-manylinux_2_35_x86_64.whl.

File metadata

File hashes

Hashes for rbpodo-0.10.2-cp38-cp38-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 45fc6b23def7de668f9cb1bd3f55c5eb60e1fb5cf62a9670460a18f08253e5ae
MD5 cb436a097899935bb648e78ae2e80a59
BLAKE2b-256 4fa64c097a9236c418a5ebc9e9f25f6aa9116db9cacd3552d057c85da42b577b

See more details on using hashes here.

File details

Details for the file rbpodo-0.10.2-cp37-cp37m-win_amd64.whl.

File metadata

  • Download URL: rbpodo-0.10.2-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 432.6 kB
  • Tags: CPython 3.7m, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.0.0 CPython/3.12.2

File hashes

Hashes for rbpodo-0.10.2-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 66d8f002df8e44b74e00b358b75376b0286dce3148ff9a29fe8d2f729069d2cb
MD5 9e95feb2711ffc788cf6c9d6fbcd834c
BLAKE2b-256 284203883bb03ed2fb57884160b545e057092def8f0149044f5c3c428422a6b9

See more details on using hashes here.

File details

Details for the file rbpodo-0.10.2-cp37-cp37m-manylinux_2_35_x86_64.whl.

File metadata

File hashes

Hashes for rbpodo-0.10.2-cp37-cp37m-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 e0ae1e2e6677699c0866c3d1b7aa3a824b1035aa6f7f209231359e7685f4a28a
MD5 13635539651c5a85f2f31ae85aff09b7
BLAKE2b-256 4630ba7a6f54e75b8922ba7513550632bfad72aa2250f3a4790dd6c632a5c055

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page