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);

    // 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.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.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 within the control box, it significantly reduces communication latency associated with the updating of variables crucial for the arm's operation. For instance, variables related to the feedback loop—such as joint positions and electrical current measurements—can be computed 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

If you're not sure about the file name format, learn more about wheel file names.

rbpodo-0.9.1-cp312-cp312-win_amd64.whl (436.4 kB view details)

Uploaded CPython 3.12Windows x86-64

rbpodo-0.9.1-cp312-cp312-manylinux_2_35_x86_64.whl (578.0 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.35+ x86-64

rbpodo-0.9.1-cp311-cp311-win_amd64.whl (435.8 kB view details)

Uploaded CPython 3.11Windows x86-64

rbpodo-0.9.1-cp311-cp311-manylinux_2_35_x86_64.whl (578.0 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.35+ x86-64

rbpodo-0.9.1-cp310-cp310-win_amd64.whl (434.4 kB view details)

Uploaded CPython 3.10Windows x86-64

rbpodo-0.9.1-cp310-cp310-manylinux_2_35_x86_64.whl (577.7 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.35+ x86-64

rbpodo-0.9.1-cp39-cp39-win_amd64.whl (414.1 kB view details)

Uploaded CPython 3.9Windows x86-64

rbpodo-0.9.1-cp39-cp39-manylinux_2_35_x86_64.whl (577.8 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.35+ x86-64

rbpodo-0.9.1-cp38-cp38-win_amd64.whl (434.8 kB view details)

Uploaded CPython 3.8Windows x86-64

rbpodo-0.9.1-cp38-cp38-manylinux_2_35_x86_64.whl (577.6 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.35+ x86-64

rbpodo-0.9.1-cp37-cp37m-win_amd64.whl (424.3 kB view details)

Uploaded CPython 3.7mWindows x86-64

rbpodo-0.9.1-cp37-cp37m-manylinux_2_35_x86_64.whl (602.6 kB view details)

Uploaded CPython 3.7mmanylinux: glibc 2.35+ x86-64

File details

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

File metadata

  • Download URL: rbpodo-0.9.1-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 436.4 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.9.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 e11c791748de9f932427d641a7654f11577e64dd165c1b6529f1795e1ef1f193
MD5 d0549679c5ea0f5de0853fec2bd41099
BLAKE2b-256 4e9ec20166eac66eeda5e6e7df118d59675bbe6c7b131fed08940d37380ad75c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rbpodo-0.9.1-cp312-cp312-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 a145d6334238c522501273ee2b5e3d2f76c88304b02485c8ddc6b4d9f14e1290
MD5 a695ba6286830225432216caf4c321d1
BLAKE2b-256 11f85abf8c987b17206af75e136b9539d562c83a0895ff9190660a37e01ee51d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rbpodo-0.9.1-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 435.8 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.9.1-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 56c50c408c5312a9a7e38aed391d0620133d2a4b715eea7d431d6a24f875ff14
MD5 f506098eca3a917e166f76395d62d0ea
BLAKE2b-256 f41033a2e97aeca0b1a6fc8e12ef9ebd4ffea0bd1ecea4a618fb167d528bc7e9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rbpodo-0.9.1-cp311-cp311-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 0351635d88efac99f76f6f2fa5fc18bfcfccba4a7f7293ff6988032540c6797d
MD5 5ff92475bfe1ead81bd207903b9e40b8
BLAKE2b-256 e72b3f792f07f693e90c41d4b392c9e8dedc7f24b30ee1b1f83c8bf9ce44a946

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rbpodo-0.9.1-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 434.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.9.1-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 259f9f5b955e4cd780fbc94493bd3b64369fb7ed898712a16b6bcdc7eacc3139
MD5 afd316ce1e8ea6748ea3a33054549f7e
BLAKE2b-256 52dda4eca0defb06b17bb4db9a74201c8a533cc0ccba0423c5a68a56c9e61fa7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rbpodo-0.9.1-cp310-cp310-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 c84675bc0e20cbb782788381116a99b8bbe65f232fd039f3ae52ab64f2e5b9c5
MD5 bdb32ea1cc49015e7494782c55356947
BLAKE2b-256 d3b8c076bcc27a246fe153d1b87610fcf31efc519c8c932d558d3f97e77e4030

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rbpodo-0.9.1-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 414.1 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.9.1-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 58b915e3589bb50f2924208bc9c6a587a924ad6e0f9513cb64a12386b7d55d01
MD5 6b6806f33a5cf7bc2c1ef64f963173ee
BLAKE2b-256 e6afc2a2fdffd1a70a05365f66ba549659ae2dfeca6f8e62449d0cdb995a8619

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rbpodo-0.9.1-cp39-cp39-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 0e4bfcf00daaf2ccb1a1ac1f951a79e7ddb9584819c1bee1e464844460146f36
MD5 4a26497fb5316e7f1ff80c306f44f9c7
BLAKE2b-256 d9b6facd400b9415bd8dc90343e1af79dde721789c07b5f36e24782cb243fda8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rbpodo-0.9.1-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 434.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.9.1-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 ac6e8696a541d2a8f69c2205f28e2f6edad42f611841da1f01bbc4f785479449
MD5 1263aeb0d2195b5ea1ce957ab59e8982
BLAKE2b-256 801a0cf8d7c062edace5bca24b5a4d30f377b91bb9a36b14ec72f1968cc4c737

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rbpodo-0.9.1-cp38-cp38-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 d5cbf686d607106482e4e63f9f997043f22761c4358a1c926cbb93ebf8dcac62
MD5 31629e05bba5c911570d66f0e2b71011
BLAKE2b-256 ad078b7860b741a2aa04645313b2a49d5b5c0badd4fa323aabfaadbfc09c7d6a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: rbpodo-0.9.1-cp37-cp37m-win_amd64.whl
  • Upload date:
  • Size: 424.3 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.9.1-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 6dafbb8007bc54cd4b38586c3e5baaefb1c5ea64b45b31827c4d485a8613b603
MD5 e0b8932151bd638dd19266651db65913
BLAKE2b-256 96b52cd42fe1f8fec4fffc61057a05f7eca05d35b22da5d06addf44711b6ea80

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rbpodo-0.9.1-cp37-cp37m-manylinux_2_35_x86_64.whl
Algorithm Hash digest
SHA256 4c80024d39bb5ad17a55960489a3f4d33c3b5fe9177e94be02992fca915e895e
MD5 e0c764292fb81e539699d385eed9b204
BLAKE2b-256 6b782fbfc1f6bd868a99dfdb071029adec4e690b916603a99860956b8a3a8692

See more details on using hashes here.

Supported by

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