Skip to main content

RBPodo

CI Issues Releases Apache-2.0 python

[!WARNING] 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

Wait functions

We provide wait functions for convenient external control. However, to achieve the intended behavior, it is necessary to understand the mechanism and use the wait functions accurately. Processes and the control box exchange commands and data through port 5000. After an external process sends a command, the control box sends back an ACK message indicating that the command has been executed (as shown in steps 1 and 2 in the dialog below). Afterward, whenever an event occurs (such as the start or end of move), the corresponding event message is delivered to all connected processes. The wait function operates by parsing this event message to check if a certain condition has been met.

wait_func

If only one process is connected to the control box, this is generally not a problem. However, if multiple processes (or multiple computers) are connected, it may not work as expected. For example, in the illustration below, if while the wait_for_move_finished function is checking in process 1, some other process triggers an error unrelated to move ( such as trying to read a nonexistent variable), the control box will send an error message to all connected processes. In such cases, the wait function (if return_on_error is true) will assume an error has occurred and immediately return.

wait_func_with_error

To solve this problem, one can either repeatedly check whether an error is related to movement or check whether the robot's state is idle. (or you can check though port 5001 data channel.)

while robot.get_robot_state(rc)[1] == rb.RobotState.Moving:
    time.sleep(1.0e-3)

Additionally, due to this mechanism, before using wait function, it is necessary to flush all messages in the buffer (a storage for messages from the control box that have not yet been processed) to avoid the program mistaking the result of a previous move (or command) for the result of the current command.

Advanced Topic

[!WARNING] 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");

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.16.14-cp312-cp312-win_amd64.whl (527.1 kB view details)

Uploaded CPython 3.12Windows x86-64

rbpodo-0.16.14-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (770.7 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

rbpodo-0.16.14-cp311-cp311-win_amd64.whl (525.3 kB view details)

Uploaded CPython 3.11Windows x86-64

rbpodo-0.16.14-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (765.1 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

rbpodo-0.16.14-cp310-cp310-win_amd64.whl (524.4 kB view details)

Uploaded CPython 3.10Windows x86-64

rbpodo-0.16.14-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (763.7 kB view details)

Uploaded CPython 3.10manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

rbpodo-0.16.14-cp39-cp39-win_amd64.whl (503.8 kB view details)

Uploaded CPython 3.9Windows x86-64

rbpodo-0.16.14-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (764.3 kB view details)

Uploaded CPython 3.9manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

rbpodo-0.16.14-cp38-cp38-win_amd64.whl (524.4 kB view details)

Uploaded CPython 3.8Windows x86-64

rbpodo-0.16.14-cp38-cp38-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (763.2 kB view details)

Uploaded CPython 3.8manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

File details

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

File metadata

  • Download URL: rbpodo-0.16.14-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 527.1 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for rbpodo-0.16.14-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 62b170fd67e7b33093766a59f624c2f1e577c6168119e6f36c920a0f6551ac42
MD5 76d03f8b0be13fdd0f125f88b154c673
BLAKE2b-256 c93405f29e15651e99e7e0eaa3a7be5ca9933d58e6f0c5757ea900535eeb4ca8

See more details on using hashes here.

Provenance

The following attestation bundles were made for rbpodo-0.16.14-cp312-cp312-win_amd64.whl:

Publisher: release.yml on RainbowRobotics/rbpodo

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rbpodo-0.16.14-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for rbpodo-0.16.14-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b72ba1c4e25910512e1a634b5c0230f92f8ceca127d5b6a53656727e4627ecd8
MD5 2635c506ae9229582ddb5d6387e66ec3
BLAKE2b-256 0a3f6e6bd04a1b58fff82153615809f5f6d059a870cb6e522ed8cd95acf02290

See more details on using hashes here.

Provenance

The following attestation bundles were made for rbpodo-0.16.14-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: release.yml on RainbowRobotics/rbpodo

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: rbpodo-0.16.14-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 525.3 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for rbpodo-0.16.14-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 aaf24c8446160cc512bc3f05f1ac4422df9bc1b43b8aeab6944d9cc3be84e411
MD5 a828f18327a947dc03778f7da84e8363
BLAKE2b-256 6467538298f4bcd078f260d8653d007ee91204e67a97d2657d472144d6134be6

See more details on using hashes here.

Provenance

The following attestation bundles were made for rbpodo-0.16.14-cp311-cp311-win_amd64.whl:

Publisher: release.yml on RainbowRobotics/rbpodo

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rbpodo-0.16.14-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for rbpodo-0.16.14-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c6713436dc349fff1b5d5ac332b32f2067aee674dde4d24a6e434a58c26979fa
MD5 4d15276c5494b33f0d0211406481ff4b
BLAKE2b-256 09cf9993a3215f230e917ef6bde174dbcc8d192564b640d84ae095d2049cba81

See more details on using hashes here.

Provenance

The following attestation bundles were made for rbpodo-0.16.14-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: release.yml on RainbowRobotics/rbpodo

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: rbpodo-0.16.14-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 524.4 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for rbpodo-0.16.14-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 9cfef316f4c21b9169068e69038321a435550230aa2b041a8f62aa5573ab9f07
MD5 6d082b215c5ec7ede8a40ebea0d236be
BLAKE2b-256 f48f0994731f8977ec6aaaa3c5c94916348a0c31d05d34e6d5d5d55f6594a55c

See more details on using hashes here.

Provenance

The following attestation bundles were made for rbpodo-0.16.14-cp310-cp310-win_amd64.whl:

Publisher: release.yml on RainbowRobotics/rbpodo

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rbpodo-0.16.14-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for rbpodo-0.16.14-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 df3ace43da0b110a2c70d5b5aaa86ed4d60478500aa06fb3cdf8a909c17e3ae0
MD5 6ab8647ca4c6d00dfa4ce2b76d68e117
BLAKE2b-256 c48a02308aa445623540ccf0f819dd3bce00af21392de03e9fd7c386e0237ae4

See more details on using hashes here.

Provenance

The following attestation bundles were made for rbpodo-0.16.14-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: release.yml on RainbowRobotics/rbpodo

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: rbpodo-0.16.14-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 503.8 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for rbpodo-0.16.14-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 1f1084c67c26846d7ceea8c2cfaceeba96fbc4d40443dc396518e4f021e02ca2
MD5 37fbcd8f6366ad7c799149d797953782
BLAKE2b-256 78c98d29c16c22ef475930c066b0bc535bc4df1fa7c2f5cc2264c728807a682d

See more details on using hashes here.

Provenance

The following attestation bundles were made for rbpodo-0.16.14-cp39-cp39-win_amd64.whl:

Publisher: release.yml on RainbowRobotics/rbpodo

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rbpodo-0.16.14-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for rbpodo-0.16.14-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e02172a5b010ac202a6c86aee43bcdd11a15f3d419bf625d1b3bb0ee6167c730
MD5 570d428c1564c44643ea77d72ea67fdd
BLAKE2b-256 a0bd319026015e1a668399e0000566eec683c8af3fc7dfe94820638747384592

See more details on using hashes here.

Provenance

The following attestation bundles were made for rbpodo-0.16.14-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: release.yml on RainbowRobotics/rbpodo

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: rbpodo-0.16.14-cp38-cp38-win_amd64.whl
  • Upload date:
  • Size: 524.4 kB
  • Tags: CPython 3.8, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for rbpodo-0.16.14-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 d16b4621c09636eb495bf14ca260f15fbf24526d21b30282b7feb9bc0e23f6cd
MD5 75ec4661db66a5060e7df802b6113863
BLAKE2b-256 f8cd3c0032e75bfaea03de4873765d8853934a0d00943c951510df6d7a41f384

See more details on using hashes here.

Provenance

The following attestation bundles were made for rbpodo-0.16.14-cp38-cp38-win_amd64.whl:

Publisher: release.yml on RainbowRobotics/rbpodo

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file rbpodo-0.16.14-cp38-cp38-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for rbpodo-0.16.14-cp38-cp38-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7eef5425c1fc5bfc2ee6349f7df123471cbb8db7b921b105fc32809b6e4e9781
MD5 3b5ea903dc511fd05a29b971a3158729
BLAKE2b-256 a198af1e74e1b3cefdc5b0f785b88462813efe2c4f1eac2976c72538ccdda610

See more details on using hashes here.

Provenance

The following attestation bundles were made for rbpodo-0.16.14-cp38-cp38-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: release.yml on RainbowRobotics/rbpodo

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.16.14 This release

10 files

0.16.12

10 files

0.16.10

10 files

0.16.9

10 files

0.16.7

10 files

0.16.4

10 files

0.16.3

10 files

0.16.2

10 files

0.16.1

12 files

0.16.0

12 files

0.14.0

12 files

0.13.0

12 files

0.12.0

12 files

0.10.3

12 files

0.10.2

12 files

0.10.1

12 files

0.10.0

12 files

0.9.1

12 files

0.9.0

12 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page