C++ API#

Public headers of librb_sdk.

amr/amr_accessory.hpp#

class RBAmrAccessorySDK : public RBBaseSDK#
#include <amr_accessory.hpp>

AMR accessory commands.

Sends lift-power requests to the SLAMNAV accessory endpoint. All queries use the AMR-wide 10 second timeout and return the FlatBuffers native table, which the AMR caster exposes to Python as a snake_case dict.

Public Functions

SLAMNAV::ResponseLiftPowerT set_lift_power(const std::string &robot_model, bool switch_value, const std::optional<std::string> &req_id = std::nullopt, pybind11::object flow_manager_args = pybind11::none())#

Turns the lift power on or off.

Warning

This call blocks for up to 10 seconds.

Parameters:
  • robot_model – Robot model used to compose the Zenoh topic.

  • switch_value – true to enable lift power, false to disable it.

  • req_id – Compatibility request ID; the current request schema has no ID field.

  • flow_manager_args – Optional PyFM completion object whose done() is called on acceptance.

Throws:

std::runtime_error – When no reply arrives or PyFM receives a non-accept result.

Returns:

Native FlatBuffers lift-power response.

amr/amr_capability.hpp#

class RBAmrCapabilitySDK : public RBBaseSDK#
#include <amr_capability.hpp>

Reads the hardware and safety capabilities advertised by an AMR.

Capability request schemas currently contain no request-id field. The public req_id argument is retained for compatibility with the former Python SDK and will be serialized when the schema gains that field.

Public Functions

SLAMNAV::ResponseCapabilityDockT get_capability_dock(const std::string &robot_model, const std::optional<std::string> &req_id = std::nullopt, pybind11::object flow_manager_args = pybind11::none())#

Returns docking capability information.

Warning

The call is blocking, and req_id is currently ignored by the wire format.

Parameters:
  • robot_model – Robot model used to compose the Zenoh topic.

  • req_id – Compatibility request ID; current capability requests cannot serialize it.

  • flow_manager_args – Optional PyFM object whose done() is called after a reply.

Throws:

std::runtime_error – When no reply arrives within 10 seconds.

Returns:

Native FlatBuffers capability response.

SLAMNAV::ResponseCapabilitySafetyIoT get_capability_safety_io(const std::string &robot_model, const std::optional<std::string> &req_id = std::nullopt, pybind11::object flow_manager_args = pybind11::none())#

Returns docking capability information.

Warning

The call is blocking, and req_id is currently ignored by the wire format.

Parameters:
  • robot_model – Robot model used to compose the Zenoh topic.

  • req_id – Compatibility request ID; current capability requests cannot serialize it.

  • flow_manager_args – Optional PyFM object whose done() is called after a reply.

Throws:

std::runtime_error – When no reply arrives within 10 seconds.

Returns:

Native FlatBuffers capability response.

SLAMNAV::ResponseCapabilityCameraT get_capability_camera(const std::string &robot_model, const std::optional<std::string> &req_id = std::nullopt, pybind11::object flow_manager_args = pybind11::none())#

Returns docking capability information.

Warning

The call is blocking, and req_id is currently ignored by the wire format.

Parameters:
  • robot_model – Robot model used to compose the Zenoh topic.

  • req_id – Compatibility request ID; current capability requests cannot serialize it.

  • flow_manager_args – Optional PyFM object whose done() is called after a reply.

Throws:

std::runtime_error – When no reply arrives within 10 seconds.

Returns:

Native FlatBuffers capability response.

SLAMNAV::ResponseCapabilityLidar2DT get_capability_lidar2d(const std::string &robot_model, const std::optional<std::string> &req_id = std::nullopt, pybind11::object flow_manager_args = pybind11::none())#

Returns docking capability information.

Warning

The call is blocking, and req_id is currently ignored by the wire format.

Parameters:
  • robot_model – Robot model used to compose the Zenoh topic.

  • req_id – Compatibility request ID; current capability requests cannot serialize it.

  • flow_manager_args – Optional PyFM object whose done() is called after a reply.

Throws:

std::runtime_error – When no reply arrives within 10 seconds.

Returns:

Native FlatBuffers capability response.

SLAMNAV::ResponseCapabilityLidar3DT get_capability_lidar3d(const std::string &robot_model, const std::optional<std::string> &req_id = std::nullopt, pybind11::object flow_manager_args = pybind11::none())#

Returns docking capability information.

Warning

The call is blocking, and req_id is currently ignored by the wire format.

Parameters:
  • robot_model – Robot model used to compose the Zenoh topic.

  • req_id – Compatibility request ID; current capability requests cannot serialize it.

  • flow_manager_args – Optional PyFM object whose done() is called after a reply.

Throws:

std::runtime_error – When no reply arrives within 10 seconds.

Returns:

Native FlatBuffers capability response.

SLAMNAV::ResponseCapabilityImuT get_capability_imu(const std::string &robot_model, const std::optional<std::string> &req_id = std::nullopt, pybind11::object flow_manager_args = pybind11::none())#

Returns docking capability information.

Warning

The call is blocking, and req_id is currently ignored by the wire format.

Parameters:
  • robot_model – Robot model used to compose the Zenoh topic.

  • req_id – Compatibility request ID; current capability requests cannot serialize it.

  • flow_manager_args – Optional PyFM object whose done() is called after a reply.

Throws:

std::runtime_error – When no reply arrives within 10 seconds.

Returns:

Native FlatBuffers capability response.

SLAMNAV::ResponseCapabilitySafetyBumperT get_capability_safety_bumper(const std::string &robot_model, const std::optional<std::string> &req_id = std::nullopt, pybind11::object flow_manager_args = pybind11::none())#

Returns docking capability information.

Warning

The call is blocking, and req_id is currently ignored by the wire format.

Parameters:
  • robot_model – Robot model used to compose the Zenoh topic.

  • req_id – Compatibility request ID; current capability requests cannot serialize it.

  • flow_manager_args – Optional PyFM object whose done() is called after a reply.

Throws:

std::runtime_error – When no reply arrives within 10 seconds.

Returns:

Native FlatBuffers capability response.

SLAMNAV::ResponseCapabilitySafetyInterlockT get_capability_safety_interlock(const std::string &robot_model, const std::optional<std::string> &req_id = std::nullopt, pybind11::object flow_manager_args = pybind11::none())#

Returns docking capability information.

Warning

The call is blocking, and req_id is currently ignored by the wire format.

Parameters:
  • robot_model – Robot model used to compose the Zenoh topic.

  • req_id – Compatibility request ID; current capability requests cannot serialize it.

  • flow_manager_args – Optional PyFM object whose done() is called after a reply.

Throws:

std::runtime_error – When no reply arrives within 10 seconds.

Returns:

Native FlatBuffers capability response.

SLAMNAV::ResponseCapabilitySafetyObstacleT get_capability_safety_obstacle(const std::string &robot_model, const std::optional<std::string> &req_id = std::nullopt, pybind11::object flow_manager_args = pybind11::none())#

Returns docking capability information.

Warning

The call is blocking, and req_id is currently ignored by the wire format.

Parameters:
  • robot_model – Robot model used to compose the Zenoh topic.

  • req_id – Compatibility request ID; current capability requests cannot serialize it.

  • flow_manager_args – Optional PyFM object whose done() is called after a reply.

Throws:

std::runtime_error – When no reply arrives within 10 seconds.

Returns:

Native FlatBuffers capability response.

SLAMNAV::ResponseCapabilitySafetyOperationStopT get_capability_safety_operation_stop(const std::string &robot_model, const std::optional<std::string> &req_id = std::nullopt, pybind11::object flow_manager_args = pybind11::none())#

Returns docking capability information.

Warning

The call is blocking, and req_id is currently ignored by the wire format.

Parameters:
  • robot_model – Robot model used to compose the Zenoh topic.

  • req_id – Compatibility request ID; current capability requests cannot serialize it.

  • flow_manager_args – Optional PyFM object whose done() is called after a reply.

Throws:

std::runtime_error – When no reply arrives within 10 seconds.

Returns:

Native FlatBuffers capability response.

SLAMNAV::ResponseCapabilitySafetySpeedControlT get_capability_safety_speed_control(const std::string &robot_model, const std::optional<std::string> &req_id = std::nullopt, pybind11::object flow_manager_args = pybind11::none())#

Returns docking capability information.

Warning

The call is blocking, and req_id is currently ignored by the wire format.

Parameters:
  • robot_model – Robot model used to compose the Zenoh topic.

  • req_id – Compatibility request ID; current capability requests cannot serialize it.

  • flow_manager_args – Optional PyFM object whose done() is called after a reply.

Throws:

std::runtime_error – When no reply arrives within 10 seconds.

Returns:

Native FlatBuffers capability response.

SLAMNAV::ResponseCapabilityBmsT get_capability_bms(const std::string &robot_model, const std::optional<std::string> &req_id = std::nullopt, pybind11::object flow_manager_args = pybind11::none())#

Returns docking capability information.

Warning

The call is blocking, and req_id is currently ignored by the wire format.

Parameters:
  • robot_model – Robot model used to compose the Zenoh topic.

  • req_id – Compatibility request ID; current capability requests cannot serialize it.

  • flow_manager_args – Optional PyFM object whose done() is called after a reply.

Throws:

std::runtime_error – When no reply arrives within 10 seconds.

Returns:

Native FlatBuffers capability response.

amr/amr_control.hpp#

class RBAmrControlSDK : public RBBaseSDK#
#include <amr_control.hpp>

AMR actuator, docking, and safety-control commands.

Request/response commands use query_one with a 10 second timeout. Docking results are delivered separately through control_get_result_dock.

With flow_args, control_dock/control_undock wait for the dock result on the status topic and call done() on success.

Safety configuration

SLAMNAV::ResponseGetSafetyFieldT control_get_safety_field(const std::string &robot_model, const std::optional<std::string> &req_id = std::nullopt, pybind11::object flow_args = pybind11::none())#

Reads the active safety field.

Parameters:
  • robot_model – Robot model used to compose the Zenoh topic.

  • req_id – Optional request correlation ID.

  • flow_args – Optional PyFM completion object.

Throws:

std::runtime_error – When no reply arrives within 10 seconds, or (with flow_args) the request is not accepted.

Returns:

Native FlatBuffers response.

SLAMNAV::ResponseSetSafetyFieldT control_set_safety_field(const std::string &robot_model, uint8_t safety_field, const std::optional<std::string> &req_id = std::nullopt, pybind11::object flow_args = pybind11::none())#

Selects a safety field.

Warning

The SDK does not validate whether safety_field exists on the robot.

Parameters:
  • robot_model – Robot model used to compose the Zenoh topic.

  • safety_field – Controller-defined safety-field number.

  • req_id – Optional request correlation ID.

  • flow_args – Optional PyFM completion object.

Throws:

std::runtime_error – When no reply arrives within 10 seconds, or (with flow_args) the request is not accepted.

Returns:

Native FlatBuffers response.

SLAMNAV::ResponseGetSafetyFlagT control_get_safety_flag(const std::string &robot_model, const std::optional<std::string> &req_id = std::nullopt, pybind11::object flow_args = pybind11::none())#

Reads the safety-flag collection.

Parameters:
  • robot_model – Robot model used to compose the Zenoh topic.

  • req_id – Optional request correlation ID.

  • flow_args – Optional PyFM completion object.

Throws:

std::runtime_error – When no reply arrives within 10 seconds, or (with flow_args) the request is not accepted.

Returns:

Native FlatBuffers response.

SLAMNAV::ResponseSetSafetyFlagT control_set_safety_flag(const std::string &robot_model, const std::vector<SLAMNAV::SafetyFlagT> &safety_flag, const std::optional<std::string> &req_id = std::nullopt, pybind11::object flow_args = pybind11::none())#

Replaces the safety-flag collection.

Parameters:
  • robot_model – Robot model used to compose the Zenoh topic.

  • safety_flag – Safety flags serialized into the request.

  • req_id – Optional request correlation ID.

  • flow_args – Optional PyFM completion object.

Throws:

std::runtime_error – When no reply arrives within 10 seconds, or (with flow_args) the request is not accepted.

Returns:

Native FlatBuffers response.

SLAMNAV::ResponseGetSafetyIoT control_get_safety_io(const std::string &robot_model, const std::optional<std::string> &req_id = std::nullopt, pybind11::object flow_args = pybind11::none())#

Reads safety-controller digital inputs.

Parameters:
  • robot_model – Robot model used to compose the Zenoh topic.

  • req_id – Optional request correlation ID.

  • flow_args – Optional PyFM completion object.

Throws:

std::runtime_error – When no reply arrives within 10 seconds, or (with flow_args) the request is not accepted.

Returns:

Native FlatBuffers response.

SLAMNAV::ResponseSetSafetyIoT control_set_safety_io(const std::string &robot_model, const std::vector<bool> &mcu0_din, const std::vector<bool> &mcu1_din, const std::optional<std::string> &req_id = std::nullopt, pybind11::object flow_args = pybind11::none())#

Updates safety-controller digital inputs.

Warning

Input lengths are forwarded without hardware-layout validation.

Parameters:
  • robot_model – Robot model used to compose the Zenoh topic.

  • mcu0_din – MCU0 digital-input states.

  • mcu1_din – MCU1 digital-input states.

  • req_id – Optional request correlation ID.

  • flow_args – Optional PyFM completion object.

Throws:

std::runtime_error – When no reply arrives within 10 seconds, or (with flow_args) the request is not accepted.

Returns:

Native FlatBuffers response.

Docking and obstacle configuration

SLAMNAV::ResponseDockT control_dock(const std::string &robot_model, const std::optional<std::string> &id = std::nullopt, pybind11::object flow_args = pybind11::none())#

Starts docking.

Parameters:
  • robot_model – Robot model used to compose the Zenoh topic.

  • req_id – Optional request correlation ID.

  • flow_args – Optional PyFM completion object. When given, blocks until the dock result arrives and calls done() on success.

Throws:

std::runtime_error – When no reply arrives within 10 seconds, or (with flow_args) the request is not accepted or the dock fails/cancels.

Returns:

Native FlatBuffers command response.

SLAMNAV::ResponseUndockT control_undock(const std::string &robot_model, const std::optional<std::string> &req_id = std::nullopt, pybind11::object flow_args = pybind11::none())#

Starts docking.

Parameters:
  • robot_model – Robot model used to compose the Zenoh topic.

  • req_id – Optional request correlation ID.

  • flow_args – Optional PyFM completion object. When given, blocks until the dock result arrives and calls done() on success.

Throws:

std::runtime_error – When no reply arrives within 10 seconds, or (with flow_args) the request is not accepted or the dock fails/cancels.

Returns:

Native FlatBuffers command response.

SLAMNAV::ResponseDockStopT control_dock_stop(const std::string &robot_model, const std::optional<std::string> &req_id = std::nullopt, pybind11::object flow_args = pybind11::none())#

Stops an active docking/undocking motion.

Parameters:
  • robot_model – Robot model used to compose the Zenoh topic.

  • req_id – Optional request correlation ID.

  • flow_args – Optional PyFM completion object.

Throws:

std::runtime_error – When no reply arrives within 10 seconds, or (with flow_args) the request is not accepted.

Returns:

Native FlatBuffers command response.

SLAMNAV::ResponseGetObsBoxT control_get_obs_box(const std::string &robot_model, const std::optional<std::string> &req_id = std::nullopt, pybind11::object flow_args = pybind11::none())#

Reads the obstacle-filtering box and range.

Parameters:
  • robot_model – Robot model used to compose the Zenoh topic.

  • req_id – Optional request correlation ID.

  • flow_args – Optional PyFM completion object.

Throws:

std::runtime_error – When no reply arrives within 10 seconds, or (with flow_args) the request is not accepted.

Returns:

Native FlatBuffers response.

SLAMNAV::ResponseChargeTriggerT control_charge_trigger(const std::string &robot_model, bool switch_value, const std::optional<std::string> &req_id = std::nullopt, pybind11::object flow_args = pybind11::none())#

Enables or disables charge triggering.

Parameters:
  • robot_model – Robot model used to compose the Zenoh topic.

  • switch_value – Requested charge-trigger state.

  • req_id – Optional request correlation ID.

  • flow_args – Optional PyFM completion object.

Throws:

std::runtime_error – When no reply arrives within 10 seconds, or (with flow_args) the request is not accepted.

Returns:

Native FlatBuffers response.

SLAMNAV::ResponseSetObsBoxT control_set_obs_box(const std::string &robot_model, float min_x, float min_y, float min_z, float max_x, float max_y, float max_z, float map_range, const std::optional<std::string> &req_id = std::nullopt, pybind11::object flow_args = pybind11::none())#

Sets the obstacle-filtering box and range.

Warning

Coordinate ordering and range validity are not checked locally.

Parameters:
  • robot_model – Robot model used to compose the Zenoh topic.

  • min_x – Minimum x coordinate.

  • min_y – Minimum y coordinate.

  • min_z – Minimum z coordinate.

  • max_x – Maximum x coordinate.

  • max_y – Maximum y coordinate.

  • max_z – Maximum z coordinate.

  • map_range – Map range applied with the box.

  • req_id – Optional request correlation ID.

  • flow_args – Optional PyFM completion object.

Throws:

std::runtime_error – When no reply arrives within 10 seconds, or (with flow_args) the request is not accepted.

Returns:

Native FlatBuffers response.

SLAMNAV::ResponseSetLedT control_set_led(const std::string &robot_model, bool switch_value, const std::string &color, const std::optional<std::string> &req_id = std::nullopt, pybind11::object flow_args = pybind11::none())#

Sets the AMR LED state and color.

Parameters:
  • robot_model – Robot model used to compose the Zenoh topic.

  • switch_value – Requested LED state.

  • color – Controller-supported color string.

  • req_id – Optional request correlation ID.

  • flow_args – Optional PyFM completion object.

Throws:

std::runtime_error – When no reply arrives within 10 seconds, or (with flow_args) the request is not accepted.

Returns:

Native FlatBuffers response.

Runtime actuator controls

SLAMNAV::ResponseSetMotorT control_set_motor(const std::string &robot_model, bool switch_value, const std::optional<std::string> &req_id = std::nullopt, pybind11::object flow_args = pybind11::none())#

Enables or disables the motor actuator.

Warning

Actuator state changes must follow the site’s safety procedure.

Parameters:
  • robot_model – Robot model used to compose the Zenoh topic.

  • switch_value – Requested actuator state.

  • req_id – Optional request correlation ID.

  • flow_args – Optional PyFM completion object.

Throws:

std::runtime_error – When no reply arrives within 10 seconds, or (with flow_args) the request is not accepted.

Returns:

Native FlatBuffers response.

SLAMNAV::ResponseSetJogT control_set_jog(const std::string &robot_model, bool switch_value, const std::optional<std::string> &req_id = std::nullopt, pybind11::object flow_args = pybind11::none())#

Enables or disables the motor actuator.

Warning

Actuator state changes must follow the site’s safety procedure.

Parameters:
  • robot_model – Robot model used to compose the Zenoh topic.

  • switch_value – Requested actuator state.

  • req_id – Optional request correlation ID.

  • flow_args – Optional PyFM completion object.

Throws:

std::runtime_error – When no reply arrives within 10 seconds, or (with flow_args) the request is not accepted.

Returns:

Native FlatBuffers response.

SLAMNAV::ResponseSetAvoidT control_set_avoid(const std::string &robot_model, bool switch_value, const std::optional<std::string> &req_id = std::nullopt, pybind11::object flow_args = pybind11::none())#

Enables or disables the motor actuator.

Warning

Actuator state changes must follow the site’s safety procedure.

Parameters:
  • robot_model – Robot model used to compose the Zenoh topic.

  • switch_value – Requested actuator state.

  • req_id – Optional request correlation ID.

  • flow_args – Optional PyFM completion object.

Throws:

std::runtime_error – When no reply arrives within 10 seconds, or (with flow_args) the request is not accepted.

Returns:

Native FlatBuffers response.

SLAMNAV::ResponseSetStreamFrequencyT control_stream_frequency(const std::string &robot_model, const std::string &target, int32_t frequency, const std::optional<std::string> &req_id = std::nullopt, pybind11::object flow_args = pybind11::none())#

Sets a controller stream frequency.

Warning

req_id is ignored by the current wire format.

Parameters:
  • robot_model – Robot model used to compose the Zenoh topic.

  • target – Controller stream target.

  • frequency – Requested frequency.

  • req_id – Compatibility request ID; current request schema has no ID field.

  • flow_args – Optional PyFM completion object.

Throws:

std::runtime_error – When no reply arrives within 10 seconds, or (with flow_args) the request is not accepted.

Returns:

Native FlatBuffers response.

SLAMNAV::ResponseSetCrossingT control_set_crossing(const std::string &robot_model, bool crossing, const std::optional<std::string> &req_id = std::nullopt, pybind11::object flow_args = pybind11::none())#

Enables or disables crossing behavior.

Parameters:
  • robot_model – Robot model used to compose the Zenoh topic.

  • crossing – Requested crossing state.

  • req_id – Optional request correlation ID.

  • flow_args – Optional PyFM completion object.

Throws:

std::runtime_error – When no reply arrives within 10 seconds, or (with flow_args) the request is not accepted.

Returns:

Native FlatBuffers response.

SLAMNAV::ResultControlDockT control_get_result_dock(const std::string &robot_model)#

Waits for and returns the next docking result event.

Warning

This method blocks until receive_one obtains a result.

Parameters:

robot_model – Robot model used to compose the subscription topic.

Returns:

Next native FlatBuffers docking result.

void _dock_flow_manager_solver(const std::string &robot_model, const std::string &req_id, pybind11::object flow_manager_args = pybind11::none(), bool unsubscribe = false)#

Private Static Functions

static int64_t _now_ms()#
static std::string generateRandomId(const std::optional<std::string> &id)#
struct _FlowManagerState#

Public Functions

inline void finish()#
inline void wake_on_stop()#

Public Members

pybind11::object flow_manager_args#
std::string req_id#
std::atomic_bool finished = {false}#
std::atomic<int> subs_id = {-1}#
std::atomic<int64_t> last_seen_ms = {0}#
std::string error#
std::mutex wake_mtx#
std::condition_variable wake_cv#
bool stop_wake = false#

amr/amr_file.hpp#

class RBAmrFileSDK : public RBBaseSDK#
#include <amr_file.hpp>

Chunked file-transfer and archive operations for AMR map files.

Metadata determines the chunk count and size; callers should then request chunks sequentially. Chunk data remains binary-safe through the local SLAMNAV caster and is suitable for StreamingResponse/octet-stream output.

Public Functions

RBAmrFileSDK() = default#
SLAMNAV::ResponseGetFileMetaT get_file_meta(const std::string &robot_model, const std::string &file_path, uint32_t preferred_chunk_size)#

Reads file size, MIME type, and chunking metadata.

Warning

The server may choose a different chunk size; use response metadata for subsequent reads.

Parameters:
  • robot_model – Robot model used to compose the Zenoh topic.

  • file_path – AMR-side file path.

  • preferred_chunk_size – Requested transfer chunk size in bytes.

Throws:

std::runtime_error – When no reply arrives within 10 seconds.

Returns:

Native FlatBuffers file metadata response.

SLAMNAV::ResponseGetFileChunkT get_file_chunk(const std::string &robot_model, const std::string &file_path, uint32_t idx, uint32_t chunk_size)#

Reads one zero-based chunk from a file.

Warning

Preserve the returned byte sequence when forwarding it as application/octet-stream.

Parameters:
  • robot_model – Robot model used to compose the Zenoh topic.

  • file_path – AMR-side file path.

  • idx – Zero-based chunk index.

  • chunk_size – Chunk size negotiated through get_file_meta.

Throws:

std::runtime_error – When no reply arrives within 10 seconds.

Returns:

Native response containing binary-safe chunk data.

SLAMNAV::ResponseCompressFilesT compress_files(const std::string &robot_model, const std::string &base_dir, const std::vector<std::string> &source_names, const std::string &output_name)#

Compresses source entries below base_dir into one archive.

Warning

Paths are interpreted by the remote AMR service, not the local process.

Parameters:
  • robot_model – Robot model used to compose the Zenoh topic.

  • base_dir – AMR-side base directory.

  • source_names – Relative file or directory names to archive.

  • output_name – Output archive name.

Throws:

std::runtime_error – When no reply arrives within 10 seconds.

Returns:

Native FlatBuffers compression response.

SLAMNAV::ResponseDecompressFileT decompress_file(const std::string &robot_model, const std::string &source_path, const std::string &output_path)#

Extracts an archive to the requested output path.

Warning

Existing remote files may be overwritten according to server policy.

Parameters:
  • robot_model – Robot model used to compose the Zenoh topic.

  • source_path – AMR-side archive path.

  • output_path – AMR-side extraction destination.

Throws:

std::runtime_error – When no reply arrives within 10 seconds.

Returns:

Native FlatBuffers decompression response.

SLAMNAV::ResponseDeleteFileT delete_file(const std::string &robot_model, const std::string &file_path)#

Deletes one AMR-side file.

Warning

Deletion is remote and may be irreversible.

Parameters:
  • robot_model – Robot model used to compose the Zenoh topic.

  • file_path – AMR-side file path to delete.

Throws:

std::runtime_error – When no reply arrives within 10 seconds.

Returns:

Native FlatBuffers deletion response.

amr/amr_localization.hpp#

class RBAmrLocalizationSDK : public RBBaseSDK#
#include <amr_localization.hpp>

AMR localization initialization and lifecycle operations.

Explicit initialization accepts a partial pose; omitted coordinates use schema defaults. Every request uses a 10 second query timeout, while the final result is consumed from the localization result subscription.

Alternative initialization and lifecycle commands

SLAMNAV::ResponseLocalizationRandomInitT localization_random_init(const std::string &robot_model, const std::optional<std::string> &id = std::nullopt, pybind11::object flow_manager_args = pybind11::none())#

Requests random localization initialization.

Warning

This is a blocking query; completion of localization is reported separately.

Parameters:
  • robot_model – Robot model used to compose the Zenoh topic.

  • req_id – Optional request correlation ID.

  • flow_manager_args – Optional PyFM completion object.

Throws:

std::runtime_error – When no reply arrives or the command is rejected.

Returns:

Native FlatBuffers command response.

SLAMNAV::ResponseLocalizationAutoInitT localization_auto_init(const std::string &robot_model, const std::optional<std::string> &id = std::nullopt, pybind11::object flow_manager_args = pybind11::none())#

Requests random localization initialization.

Warning

This is a blocking query; completion of localization is reported separately.

Parameters:
  • robot_model – Robot model used to compose the Zenoh topic.

  • req_id – Optional request correlation ID.

  • flow_manager_args – Optional PyFM completion object.

Throws:

std::runtime_error – When no reply arrives or the command is rejected.

Returns:

Native FlatBuffers command response.

SLAMNAV::ResponseLocalizationSemiAutoInitT localization_semi_auto_init(const std::string &robot_model, const std::optional<std::string> &id = std::nullopt, pybind11::object flow_manager_args = pybind11::none())#

Requests random localization initialization.

Warning

This is a blocking query; completion of localization is reported separately.

Parameters:
  • robot_model – Robot model used to compose the Zenoh topic.

  • req_id – Optional request correlation ID.

  • flow_manager_args – Optional PyFM completion object.

Throws:

std::runtime_error – When no reply arrives or the command is rejected.

Returns:

Native FlatBuffers command response.

SLAMNAV::ResponseLocalizationStartT localization_start(const std::string &robot_model, const std::optional<std::string> &req_id = std::nullopt, pybind11::object flow_manager_args = pybind11::none())#

Requests random localization initialization.

Warning

This is a blocking query; completion of localization is reported separately.

Parameters:
  • robot_model – Robot model used to compose the Zenoh topic.

  • req_id – Optional request correlation ID.

  • flow_manager_args – Optional PyFM completion object.

Throws:

std::runtime_error – When no reply arrives or the command is rejected.

Returns:

Native FlatBuffers command response.

SLAMNAV::ResponseLocalizationStopT localization_stop(const std::string &robot_model, const std::optional<std::string> &req_id = std::nullopt, pybind11::object flow_manager_args = pybind11::none())#

Requests random localization initialization.

Warning

This is a blocking query; completion of localization is reported separately.

Parameters:
  • robot_model – Robot model used to compose the Zenoh topic.

  • req_id – Optional request correlation ID.

  • flow_manager_args – Optional PyFM completion object.

Throws:

std::runtime_error – When no reply arrives or the command is rejected.

Returns:

Native FlatBuffers command response.

Public Functions

SLAMNAV::ResponseLocalizationInitT localization_init(const std::string &robot_model, std::optional<float> x = std::nullopt, std::optional<float> y = std::nullopt, std::optional<float> z = std::nullopt, std::optional<float> rz = std::nullopt, const std::optional<std::string> &id = std::nullopt, pybind11::object flow_manager_args = pybind11::none())#

Initializes localization from an optional x/y/z/rz pose.

Warning

Supplying only part of the pose silently fills every omitted component with zero.

Parameters:
  • robot_model – Robot model used to compose the Zenoh topic.

  • x – Initial x coordinate; omitted values become zero.

  • y – Initial y coordinate; omitted values become zero.

  • z – Initial z coordinate; omitted values become zero.

  • rz – Initial yaw; omitted values become zero.

  • req_id – Optional request correlation ID.

  • flow_manager_args – Optional PyFM completion object.

Throws:

std::runtime_error – When no reply arrives or PyFM receives a non-accept result.

Returns:

Native FlatBuffers initialization response.

SLAMNAV::ResultLocalizationT get_localization_result(const std::string &robot_model)#

Waits for the next asynchronous localization result.

Warning

This method blocks until receive_one obtains a result sample.

Parameters:

robot_model – Robot model used to compose the subscription topic.

Returns:

Next native FlatBuffers localization result.

void _localization_flow_manager_solver(const std::string &robot_model, const std::string &req_id, pybind11::object flow_manager_args = pybind11::none(), bool unsubscribe = false)#

Private Static Functions

static int64_t _now_ms()#
static std::string generateRandomId(const std::optional<std::string> &id)#
struct _FlowManagerState#

Public Functions

inline void finish()#
inline void wake_on_stop()#

Public Members

pybind11::object flow_manager_args#
std::string req_id#
std::atomic_bool finished = {false}#
std::atomic<int> subs_id = {-1}#
std::atomic<int64_t> last_seen_ms = {0}#
std::string error#
std::mutex wake_mtx#
std::condition_variable wake_cv#
bool stop_wake = false#

amr/amr_map.hpp#

class RBAmrMapSDK : public RBBaseSDK#
#include <amr_map.hpp>

Map metadata, cloud, topology, mapping, and activation operations.

Cloud payloads are flat float vectors accompanied by row/column counts. Topology dicts are converted to Node/Link/Zone native tables by the local SLAMNAV casters before they are serialized.

Map lookup and deletion

SLAMNAV::ResponseMapListT get_map_list(const std::string &m, std::optional<std::string> id = std::nullopt, pybind11::object f = pybind11::none())#

Returns the maps stored on the AMR.

Parameters:
  • m – Robot model used in the Zenoh key expression.

  • id – Optional request id; a generated id is used when omitted.

  • f – Optional PyFM callback object; done() is called on response.

Throws:

std::runtime_error – If no response arrives within 10 seconds.

Returns:

Map-list response as a FlatBuffers native table.

SLAMNAV::ResponseMapDeleteT delete_map(const std::string &m, const std::string &n, std::optional<std::string> id = std::nullopt, pybind11::object f = pybind11::none())#

Deletes a named map from the AMR.

Parameters:
  • m – Robot model.

  • n – Map name to delete.

  • id – Optional request id.

  • f – Optional PyFM callback object.

Throws:

std::runtime_error – If the query times out or has no payload.

Returns:

Map-delete response.

SLAMNAV::ResponseMapCurrentT get_current_map(const std::string &m, std::optional<std::string> id = std::nullopt, pybind11::object f = pybind11::none())#

Returns the currently active map.

Parameters:
  • m – Robot model.

  • id – Optional request id.

  • f – Optional PyFM callback object.

Throws:

std::runtime_error – If the query produces no payload.

Returns:

Current-map response.

Point-cloud transfer

SLAMNAV::ResponseGetMapCloudT get_map_cloud(const std::string &m, const std::string &n, const std::string &file, std::optional<std::string> id = std::nullopt, pybind11::object f = pybind11::none())#

Downloads one point-cloud file from a map.

Warning

The response may be large; file/chunk APIs are preferred when streaming raw map files over HTTP.

Parameters:
  • m – Robot model.

  • n – Map name.

  • file – Point-cloud file name.

  • id – Optional request id.

  • f – Optional PyFM callback object.

Throws:

std::runtime_error – If no response is received.

Returns:

Cloud data with row/column metadata.

SLAMNAV::ResponseGetMapCloudStreamT get_map_cloud_stream(const std::string &m, const std::string &n, const std::string &file, uint32_t chunk_size = 0, std::optional<std::string> id = std::nullopt)#
SLAMNAV::ResponseSetMapCloudT set_map_cloud(const std::string &m, const std::string &n, const std::string &file, const std::vector<float> &data, uint32_t cols, uint32_t rows, std::optional<std::string> id = std::nullopt, pybind11::object f = pybind11::none())#

Uploads a flattened point cloud.

Warning

The SDK does not reshape or validate data; callers must keep its length consistent with cols and rows.

Parameters:
  • m – Robot model.

  • n – Map name.

  • file – Destination file name.

  • data – Row-major flattened point data.

  • cols – Number of values in each row.

  • rows – Number of rows.

  • id – Optional request id.

  • f – Optional PyFM callback object.

Throws:

std::runtime_error – If no response is received.

Returns:

Set-cloud response.

Topology lookup and replacement

SLAMNAV::ResponseGetMapTopologyT get_map_topology(const std::string &m, const std::string &n, std::optional<int> page_no = std::nullopt, std::optional<int> page_size = std::nullopt, std::optional<std::string> node_type = std::nullopt, std::optional<std::string> search = std::nullopt, std::optional<std::string> sort = std::nullopt, std::optional<std::string> direction = std::nullopt, std::optional<std::string> id = std::nullopt, pybind11::object f = pybind11::none())#

Returns a filtered, sorted page of map topology.

Parameters:
  • m – Robot model.

  • n – Map name.

  • page_no – One-based page number; defaults to 1.

  • page_size – Rows per page; defaults to 10.

  • node_type – Optional node-type filter.

  • search – Optional search text.

  • sort – Optional sort field.

  • direction – Optional sort direction.

  • id – Optional request id.

  • f – Optional PyFM callback object.

Throws:

std::runtime_error – If no response is received.

Returns:

Topology page response.

SLAMNAV::ResponseSetMapTopologyT set_map_topology(const std::string &m, const std::string &n, const pybind11::list &nodes, const pybind11::list &links, const pybind11::list &zones, std::optional<std::string> id = std::nullopt, pybind11::object f = pybind11::none())#

Replaces a map’s complete node/link/zone topology.

Warning

This is replacement, not patch semantics; omitted entries are not retained by the request.

Parameters:
  • m – Robot model.

  • n – Map name.

  • nodes – Python list of Node-compatible dicts.

  • links – Python list of Link-compatible dicts.

  • zones – Python list of Zone-compatible dicts.

  • id – Optional request id.

  • f – Optional PyFM callback object.

Throws:
  • pybind11::cast_error – If an input dict does not match its FBS type.

  • std::runtime_error – If no response is received.

Returns:

Set-topology response.

Mapping and map activation

SLAMNAV::ResponseMappingStartT mapping_start(const std::string &m, std::optional<std::string> id = std::nullopt, pybind11::object f = pybind11::none())#

Starts mapping.

Parameters:
  • m – Robot model.

  • id – Optional request id.

  • f – Optional PyFM callback.

Throws:

std::runtime_error – On missing response.

Returns:

Start response.

SLAMNAV::ResponseMappingStopT mapping_stop(const std::string &m, std::optional<std::string> id = std::nullopt, pybind11::object f = pybind11::none())#

Stops mapping.

Parameters:
  • m – Robot model.

  • id – Optional request id.

  • f – Optional PyFM callback.

Throws:

std::runtime_error – On missing response.

Returns:

Stop response.

SLAMNAV::ResponseMappingSaveT mapping_save(const std::string &m, const std::string &n, std::optional<std::string> id = std::nullopt, pybind11::object f = pybind11::none())#

Saves mapping output under a map name.

Parameters:
  • m – Robot model.

  • n – Destination map name.

  • id – Optional request id.

  • f – Optional PyFM callback.

Throws:

std::runtime_error – On missing response.

Returns:

Save response.

SLAMNAV::ResponseMappingCloudReloadT mapping_reload(const std::string &m, std::optional<std::string> id = std::nullopt, pybind11::object f = pybind11::none())#

Reloads the mapping cloud.

Parameters:
  • m – Robot model.

  • id – Optional request id.

  • f – Optional PyFM callback.

Throws:

std::runtime_error – On missing response.

Returns:

Reload response.

SLAMNAV::ResponseMapLoadT map_load(const std::string &m, const std::string &n, std::optional<std::string> id = std::nullopt, pybind11::object f = pybind11::none())#

Activates a named map.

Parameters:
  • m – Robot model.

  • n – Map name.

  • id – Optional request id.

  • f – Optional PyFM callback.

Throws:

std::runtime_error – On missing response.

Returns:

Load response.

SLAMNAV::ResponseTopoLoadT topo_reload(const std::string &m, std::optional<std::string> id = std::nullopt, pybind11::object f = pybind11::none())#

Reloads topology for the active map.

Parameters:
  • m – Robot model.

  • id – Optional request id.

  • f – Optional PyFM callback.

Throws:

std::runtime_error – On missing response.

Returns:

Topology-load response.

void _map_flow_manager_solver(const std::string &robot_model, const std::string &req_id, pybind11::object flow_manager_args = pybind11::none(), bool unsubscribe = false)#

Private Static Functions

static int64_t _now_ms()#
static std::string rid(const std::optional<std::string> &id)#
struct _FlowManagerState#

Public Functions

inline void finish()#
inline void wake_on_stop()#

Public Members

pybind11::object flow_manager_args#
std::string req_id#
std::atomic_bool finished = {false}#
std::atomic<int> subs_id = {-1}#
std::atomic<int64_t> last_seen_ms = {0}#
std::string error#
std::mutex wake_mtx#
std::condition_variable wake_cv#
bool stop_wake = false#

amr/amr_move.hpp#

class RBAmrMoveSDK : public RBBaseSDK#
#include <amr_move.hpp>

Goal, target, jog, relative-motion, and multi-robot commands.

C++ counterpart of the Python RBAmrMoveSDK (amr_sdk/amr_move.py) — every method here is meant to be call-compatible with its Python equivalent, including the flow_manager_args (PyFM) semantics.

Jog uses fire-and-forget publish. Other commands use a 10 second query. For goal/target/relative-motion/multi-path/multi-vobs, when flow_manager_args is given, the call additionally blocks on _move_flow_manager_solver until the robot’s moveStatus reports the matching request finished (or fails/times out) before returning.

Navigation goals and jog

SLAMNAV::ResponseMoveGoalT send_move_goal(const std::string &robot_model, std::optional<std::string> goal_id, std::optional<std::string> goal_name, std::optional<std::string> method = std::nullopt, int preset = 0, bool multi_mode = false, std::optional<std::string> robot_serial = std::nullopt, std::optional<std::string> map_name = std::nullopt, std::optional<std::string> req_id = std::nullopt, pybind11::object flow_manager_args = pybind11::none())#

Sends a named or identified navigation goal.

Parameters:
  • robot_model – Robot model used to compose the Zenoh topic.

  • goal_id – Optional topology goal ID.

  • goal_name – Optional topology goal name.

  • method – Optional controller navigation method.

  • preset – Controller preset number.

  • multi_mode – If true, sends the goal to ACS as a move candidate (muscat/move/moveCandidate, relayed by the amr service) instead of SLAMNAV move/goal.

  • robot_serial – Robot serial number. Required when multi_mode is true.

  • map_name – Current map name. Required when multi_mode is true.

  • req_id – Optional request correlation ID (random if omitted).

  • flow_manager_args – Optional PyFM step context. If given, this call blocks until the actual move finishes (or fails/times out) via _move_flow_manager_solver before returning.

Throws:
  • std::invalid_argument – When multi_mode is true and robot_serial or map_name is missing.

  • std::runtime_error – When no reply arrives within 10 seconds, the request is rejected, or (with flow_manager_args) the move fails/is canceled/times out.

Returns:

Native FlatBuffers acceptance response. In multi mode the ACS reply is mapped to it (success -> result “accept”/”reject”).

SLAMNAV::ResponseMoveTargetT send_move_target(const std::string &m, float x, float y, float z, float rz, std::optional<std::string> method = std::nullopt, int preset = 0, std::optional<std::string> id = std::nullopt, pybind11::object flow_manager_args = pybind11::none())#

Sends a Cartesian navigation target.

Parameters:
  • m – Robot model used to compose the Zenoh topic.

  • x – Target x coordinate.

  • y – Target y coordinate.

  • z – Target z coordinate.

  • rz – Target yaw.

  • method – Optional controller navigation method.

  • preset – Controller preset number.

  • id – Optional request correlation ID (random if omitted).

  • flow_manager_args – Optional PyFM step context. If given, this call blocks until the actual move finishes (or fails/times out) via _move_flow_manager_solver before returning.

Throws:

std::runtime_error – When no reply arrives within 10 seconds, the request is rejected, or (with flow_manager_args) the move fails/is canceled/times out.

Returns:

Native FlatBuffers acceptance response.

void send_move_jog(const std::string &m, float vx, float vy, float wz)#

Publishes one velocity jog command.

Warning

This is fire-and-forget; it provides neither acknowledgement nor automatic stop.

Parameters:
  • m – Robot model used to compose the Zenoh topic.

  • vx – Linear x velocity.

  • vy – Linear y velocity.

  • wz – Angular z velocity.

Motion lifecycle and relative motion

SLAMNAV::ResponseMoveStopT send_move_stop(const std::string &m, std::optional<std::string> id = std::nullopt, std::optional<std::string> robot_serial = std::nullopt, bool multi_mode = false, pybind11::object flow_manager_args = pybind11::none())#

Stops the active move.

Unlike goal/target/relative-motion, stop/pause/resume do not wait on _move_flow_manager_solver — the query response itself is treated as completion, matching the Python original.

In multi mode the robot is stopped by removing its FMS goal candidates instead: muscat/move/deleteCandidate (relayed by the amr service to ACS) with robot_id = robot_serial, and the ACS result is mapped to “accept”/”reject”.

Parameters:
  • m – Robot model used to compose the Zenoh topic.

  • id – Optional request correlation ID (random if omitted).

  • robot_serial – Robot serial sent as robot_id; required when multi_mode is true.

  • multi_mode – When true, send FMS deleteCandidate instead of SLAMNAV move/stop.

  • flow_manager_args – Optional PyFM step context; done() is called immediately once the response is accepted.

Throws:
  • std::invalid_argument – When multi_mode is true and robot_serial is missing.

  • std::runtime_error – When no reply arrives within 10 seconds, or (with flow_manager_args) the request is rejected.

Returns:

Native FlatBuffers command response.

SLAMNAV::ResponseMovePauseT send_move_pause(const std::string &m, std::optional<std::string> id = std::nullopt, std::optional<std::string> robot_serial = std::nullopt, bool multi_mode = false, pybind11::object flow_manager_args = pybind11::none())#

Pauses the active move.

Same as send_move_stop but sends SLAMNAV move/pause. In multi mode it sends the same FMS deleteCandidate as send_move_stop's multi mode.

Parameters:
  • m – Robot model used to compose the Zenoh topic.

  • id – Optional request correlation ID (random if omitted).

  • robot_serial – Robot serial sent as robot_id; required when multi_mode is true.

  • multi_mode – When true, send FMS deleteCandidate instead of SLAMNAV move/pause.

  • flow_manager_args – Optional PyFM step context; done() is called immediately once the response is accepted.

Throws:
  • std::invalid_argument – When multi_mode is true and robot_serial is missing.

  • std::runtime_error – When no reply arrives within 10 seconds, or (with flow_manager_args) the request is rejected.

Returns:

Native FlatBuffers command response.

SLAMNAV::ResponseMoveResumeT send_move_resume(const std::string &m, std::optional<std::string> id = std::nullopt, pybind11::object flow_manager_args = pybind11::none())#

Stops the active move.

Unlike goal/target/relative-motion, stop/pause/resume do not wait on _move_flow_manager_solver — the query response itself is treated as completion, matching the Python original.

In multi mode the robot is stopped by removing its FMS goal candidates instead: muscat/move/deleteCandidate (relayed by the amr service to ACS) with robot_id = robot_serial, and the ACS result is mapped to “accept”/”reject”.

Parameters:
  • m – Robot model used to compose the Zenoh topic.

  • id – Optional request correlation ID (random if omitted).

  • robot_serial – Robot serial sent as robot_id; required when multi_mode is true.

  • multi_mode – When true, send FMS deleteCandidate instead of SLAMNAV move/stop.

  • flow_manager_args – Optional PyFM step context; done() is called immediately once the response is accepted.

Throws:
  • std::invalid_argument – When multi_mode is true and robot_serial is missing.

  • std::runtime_error – When no reply arrives within 10 seconds, or (with flow_manager_args) the request is rejected.

Returns:

Native FlatBuffers command response.

SLAMNAV::ResponseMoveXLinearT send_move_x_linear(const std::string &m, float target, float speed, std::optional<std::string> id = std::nullopt, pybind11::object flow_manager_args = pybind11::none())#

Commands linear relative motion.

Parameters:
  • m – Robot model used to compose the Zenoh topic.

  • target – Relative travel target.

  • speed – Requested travel speed.

  • id – Optional request correlation ID (random if omitted).

  • flow_manager_args – Optional PyFM step context. If given, this call blocks until the actual move finishes (or fails/times out) via _move_flow_manager_solver before returning.

Throws:

std::runtime_error – When no reply arrives within 10 seconds, the request is rejected, or (with flow_manager_args) the move fails/is canceled/times out.

Returns:

Native FlatBuffers command response.

SLAMNAV::ResponseMoveYLinearT send_move_y_linear(const std::string &m, float target, float speed, std::optional<std::string> id = std::nullopt, pybind11::object flow_manager_args = pybind11::none())#

Commands linear relative motion.

Parameters:
  • m – Robot model used to compose the Zenoh topic.

  • target – Relative travel target.

  • speed – Requested travel speed.

  • id – Optional request correlation ID (random if omitted).

  • flow_manager_args – Optional PyFM step context. If given, this call blocks until the actual move finishes (or fails/times out) via _move_flow_manager_solver before returning.

Throws:

std::runtime_error – When no reply arrives within 10 seconds, the request is rejected, or (with flow_manager_args) the move fails/is canceled/times out.

Returns:

Native FlatBuffers command response.

SLAMNAV::ResponseMoveCircularT send_move_circular(const std::string &m, float target, float speed, int direction, std::optional<std::string> id = std::nullopt, pybind11::object flow_manager_args = pybind11::none())#

Commands circular relative motion.

Warning

direction is stringified without range validation.

Parameters:
  • m – Robot model used to compose the Zenoh topic.

  • target – Angular/travel target defined by the controller contract.

  • speed – Requested motion speed.

  • direction – Numeric direction converted to the schema string field.

  • id – Optional request correlation ID (random if omitted).

  • flow_manager_args – Optional PyFM step context. If given, this call blocks until the actual move finishes (or fails/times out) via _move_flow_manager_solver before returning.

Throws:

std::runtime_error – When no reply arrives within 10 seconds, the request is rejected, or (with flow_manager_args) the move fails/is canceled/times out.

Returns:

Native FlatBuffers command response.

SLAMNAV::ResponseMoveRotateT send_move_rotate(const std::string &m, float target, float speed, std::optional<std::string> id = std::nullopt, pybind11::object flow_manager_args = pybind11::none())#

Commands linear relative motion.

Parameters:
  • m – Robot model used to compose the Zenoh topic.

  • target – Relative travel target.

  • speed – Requested travel speed.

  • id – Optional request correlation ID (random if omitted).

  • flow_manager_args – Optional PyFM step context. If given, this call blocks until the actual move finishes (or fails/times out) via _move_flow_manager_solver before returning.

Throws:

std::runtime_error – When no reply arrives within 10 seconds, the request is rejected, or (with flow_manager_args) the move fails/is canceled/times out.

Returns:

Native FlatBuffers command response.

Multi-robot coordination

SLAMNAV::ResponseMultiPathT send_multi_path(const std::string &m, const std::vector<std::string> &path, int preset = 0, std::optional<std::string> id = std::nullopt, pybind11::object flow_manager_args = pybind11::none())#

Sends a coordinated multi-robot path.

Warning

preset is currently ignored (absent from the FBS schema).

Parameters:
  • m – Robot model used to compose the Zenoh topic.

  • path – Ordered topology path.

  • preset – Compatibility value absent from the current FBS request.

  • id – Optional request correlation ID (random if omitted).

  • flow_manager_args – Optional PyFM step context. If given, this call blocks until the actual move finishes (or fails/times out) via _move_flow_manager_solver before returning.

Throws:

std::runtime_error – When no reply arrives within 10 seconds, the request is rejected, or (with flow_manager_args) the move fails/is canceled/times out.

Returns:

Native FlatBuffers response.

SLAMNAV::ResponseMultiVobsT send_multi_vobs(const std::string &m, const std::vector<float> &robots, uint32_t cols, uint32_t rows, const std::vector<std::string> &closures, bool is_vobs_c, std::optional<std::string> id = std::nullopt, pybind11::object flow_manager_args = pybind11::none())#

Sends virtual-obstacle data for multi-robot coordination.

Warning

The caller must ensure robots.size() == cols * rows; the SDK does not validate it.

Parameters:
  • m – Robot model used to compose the Zenoh topic.

  • robots – Flattened robot matrix.

  • cols – Matrix column count.

  • rows – Matrix row count.

  • closures – Closure identifiers.

  • is_vobs_c – Compatibility flag absent from the current FBS request.

  • id – Optional request correlation ID (random if omitted).

  • flow_manager_args – Optional PyFM step context. If given, this call blocks until the actual move finishes (or fails/times out) via _move_flow_manager_solver before returning.

Throws:

std::runtime_error – When no reply arrives within 10 seconds, the request is rejected, or (with flow_manager_args) the move fails/is canceled/times out.

Returns:

Native FlatBuffers response.

SLAMNAV::ResponseEnqueueActionT send_multi_enqueue(const std::string &m, const std::string &a, const std::string &p, const std::string &from, const std::string &to)#

Enqueues one multi-robot action.

Parameters:
  • m – Robot model used to compose the Zenoh topic.

  • a – Action ID.

  • p – Predecessor action ID.

  • from – Source topology node.

  • to – Destination topology node.

Throws:

std::runtime_error – When no reply arrives within 10 seconds.

Returns:

Native FlatBuffers enqueue response.

Public Functions

SLAMNAV::ResultMoveT get_move_result(const std::string &m)#

Waits for the next asynchronous movement result.

Warning

This method blocks until receive_one obtains a result.

Parameters:

m – Robot model used to compose the subscription topic.

Returns:

Next native FlatBuffers movement result.

void _move_flow_manager_solver(const std::string &robot_model, const std::string &req_id, pybind11::object flow_manager_args = pybind11::none(), bool unsubscribe = false, std::function<std::string()> resend_move = {}, bool multi = false, std::optional<std::string> robot_serial = std::nullopt)#

Blocks until the move identified by req_id is confirmed done, failed, canceled, or timed out.

C++ counterpart of the Python _move_flow_manager_solver: subscribes to amr/{robot_model}/moveStatus, waits for a message whose move_state.move_id == req_id, and resolves as follows:

  • move_result == "success": calls flow_manager_args.done() and returns normally.

  • move_result == "fail" / "cancel", an id mismatch, or ctx.check_stop() raising: records the error and stops waiting.

  • No moveStatus message at all for 2.5s (topic silence, e.g. the controller died): records “Move Fail (Timeout)” the same way.

On any of the error paths above, this issues a muscat/stop global stop (best-effort, matching the Python original’s all_stop), still calls flow_manager_args.done(), and then throws — matching the Python original’s behavior of releasing the flow-manager step even on failure while still surfacing the error to the caller.

일시정지(ctx.pause_event) 중에는 moveStatus로 판정하지 않는다. SLAMNAV2 call_pause·call_resume은 PyFM 컨트롤러가 보내고, 이동 종류에 따라 여기서 처리를 나눈다.

  • resend_move가 있으면(goal·target) 일시정지 때 move/stop으로 이번 이동을 끝내고(그때 오는 cancel·fail은 실패가 아니다), 재개 때 다시 move/stop으로 남은 주행(일시정지 중 시작된 다른 이동 등)을 끝낸 뒤 같은 목표를 새 moveId로 다시 보내 그 moveId로 기다린다.

  • 없으면(상대 이동·multi) stop하지 않는다. call_pause로 멈춰 있다가 call_resume으로 같은 moveId를 이어 가므로 그대로 계속 기다린다(stop 후 다시 보내면 남은 양보다 더 움직인다).

  • stop이 실패했거나 대기 루프가 일시정지를 보기 전에 재개됐으면 다시 보내지 않고 같은 moveId로 이어 간다.

Parameters:
  • robot_model – Robot model used to compose the subscription topic.

  • req_id – Request correlation ID to match against moveStatus.

  • flow_manager_args – PyFM step context; no-op if None.

  • unsubscribe – 성공 콜백에서 바로 구독을 해제할지 여부.

  • resend_move – 재개 때 같은 목표를 새 moveId로 다시 보내고 그 moveId를 돌려주는 함수. 있으면 일시정지 때 move/stop도 보낸다. goal·target만 넘긴다(절대 목표). 비어 있으면 다시 보내지 않는다.

  • multi – 멀티 모드(FMS moveCandidate) 이동. true면 moveStatus 대신 amr/{robot_model}/multi/arrival을 구독해 reason == "destination_arrived"이면 성공으로 끝낸다(moveId 비교 없음). 이 메시지는 FMS가 약 2초 주기로 보내므로 10초 동안 아무것도 안 오면 “Move Fail (Timeout)”으로 끝낸다. 일시정지·재개 때의 stop은 SLAMNAV move/stop 대신 FMS deleteCandidate로 보낸다.

  • robot_serial – multi일 때 deleteCandidate의 robot_id.

Throws:

std::runtime_error – On fail/cancel/mismatch/timeout/check_stop.

Private Functions

void _finish_move_success(const std::shared_ptr<_FlowManagerState> &state, bool unsubscribe)#
void _all_stop(pybind11::object flow_manager_args)#

Private Static Functions

static int64_t _now_ms()#
static bool _is_pause_requested(const pybind11::object &ctx)#
static std::string generateRandomId(const std::optional<std::string> &id)#
struct _FlowManagerState#

Public Functions

inline void finish()#
inline void wake_on_stop()#

Public Members

pybind11::object flow_manager_args#
std::string req_id#
std::atomic_bool finished = {false}#
std::atomic_bool claimed = {false}#
std::atomic<int> subs_id = {-1}#
std::atomic<int64_t> last_seen_ms = {0}#
std::string error#
std::mutex move_mtx#
bool was_paused = false#
bool move_stopped = false#
std::mutex wake_mtx#
std::condition_variable wake_cv#
bool stop_wake = false#

amr/amr_program.hpp#

class RBAmrProgramSDK : public RBBaseSDK#
#include <amr_program.hpp>

Program lifecycle commands shared with the controller IPC API.

Lifecycle commands use IPC FlatBuffers topics, while version lookup uses SLAMNAV. All blocking queries use the AMR-standard 10 second timeout.

Public Functions

void set_begin(const std::string &robot_model, pybind11::object flow_manager_args = pybind11::none())#

Marks a PyFM program step as begun without sending a wire request.

Warning

This method does not start a controller-side program.

Parameters:
  • robot_model – Kept for API compatibility; it is not used.

  • flow_manager_args – Optional PyFM object whose done() is called immediately.

IPC::Response_FunctionsT call_resume(const std::string &robot_model)#

Resumes a paused AMR program.

Parameters:

robot_model – Robot model used to compose the IPC topic.

Throws:

std::runtime_error – When no reply arrives within 10 seconds.

Returns:

Controller function response.

IPC::Response_FunctionsT call_pause(const std::string &robot_model)#

Resumes a paused AMR program.

Parameters:

robot_model – Robot model used to compose the IPC topic.

Throws:

std::runtime_error – When no reply arrives within 10 seconds.

Returns:

Controller function response.

IPC::Response_FunctionsT call_halt(const std::string &robot_model)#

Resumes a paused AMR program.

Parameters:

robot_model – Robot model used to compose the IPC topic.

Throws:

std::runtime_error – When no reply arrives within 10 seconds.

Returns:

Controller function response.

IPC::Response_FunctionsT call_program_before(const std::string &robot_model, int option)#

Executes controller setup before program execution.

Parameters:
  • robot_model – Robot model used to compose the IPC topic.

  • option – Controller-defined pre-program option.

Throws:

std::runtime_error – When no reply arrives within 10 seconds.

Returns:

Controller function response.

IPC::Response_FunctionsT call_program_after(const std::string &robot_model, int option)#

Executes controller setup before program execution.

Parameters:
  • robot_model – Robot model used to compose the IPC topic.

  • option – Controller-defined pre-program option.

Throws:

std::runtime_error – When no reply arrives within 10 seconds.

Returns:

Controller function response.

SLAMNAV::ResponseCurrentVersionT get_program_version(const std::string &robot_model)#

Returns the current AMR program version.

Warning

This is a blocking query.

Parameters:

robot_model – Robot model used to compose the Zenoh topic.

Throws:

std::runtime_error – When no reply arrives within 10 seconds.

Returns:

Native FlatBuffers version response.

ACS::ResponseSendACST send_acs(const std::string &robot_model, const std::string &command, const nlohmann::json &variables, FlowManagerArgsPtr flow_manager_args = nullptr)#

Sends named values to ACS and returns its reply (SendACS step).

Each entry of variables becomes one ACSVariable: the key is the name ACS reads, type is the JSON kind of the value (number/string/boolean/array/object/null) and value its JSON text. PyFM evaluates Step-args dict values (not keys) before the call, so a value can be a program variable name, an RB_* global, an expression or a constant. The request is queried on muscat/program/send_acs; the AMR service forwards it to FRS muscat/{robot_serial}/sendACS and replies with the ACS::ResponseSendACS that ACS returned. done() is called only after that reply arrives. The RBP_ACS_PROCESS_ID program variable (set by ACS after it starts the program) is sent as processId so ACS can pick the one execution to read/write; it is left empty when absent.

Warning

This is a blocking query (up to 15 s).

Parameters:
  • robot_model – Robot model (kept for the SDK call convention).

  • command – Command for ACS (“setVariable”, “getVariable”, …).

  • variables – Object of ACS name -> value.

  • flow_manager_args – PyFM args; done() is called on success.

Throws:
  • std::runtime_error – When variables is not an object.

  • rb_zenoh::ZenohNoReply – When the AMR service or ACS does not answer or answers with an error.

Returns:

The response from ACS.

amr/amr_sensor.hpp#

class RBAmrSensorSDK : public RBBaseSDK#
#include <amr_sensor.hpp>

Marker, RTSP, and safety-LiDAR sensor operations.

RTSP subscription returns endpoint metadata rather than video bytes; the media stream itself is consumed from the returned endpoint.

Marker scanning and registration

SLAMNAV::ResponseMarkerScanStartT marker_scan_start(const std::string &model, pybind11::object flow = pybind11::none())#

Starts marker scanning.

Parameters:
  • model – Robot model used to compose the Zenoh topic.

  • flow – Optional PyFM object whose done() is called after a reply.

Throws:

std::runtime_error – When no reply arrives within 10 seconds.

Returns:

Native FlatBuffers scan-start response.

SLAMNAV::ResponseMarkerScanStopT marker_scan_stop(const std::string &model, pybind11::object flow = pybind11::none())#

Starts marker scanning.

Parameters:
  • model – Robot model used to compose the Zenoh topic.

  • flow – Optional PyFM object whose done() is called after a reply.

Throws:

std::runtime_error – When no reply arrives within 10 seconds.

Returns:

Native FlatBuffers scan-start response.

SLAMNAV::ResponseRegisterMarkerT register_marker(const std::string &model, int cam_id, int marker_id, const std::string &type, const std::string &mount, float marker_size_m, pybind11::object flow = pybind11::none())#

Registers a marker observed by a camera.

Parameters:
  • model – Robot model used to compose the Zenoh topic.

  • cam_id – Camera identifier.

  • marker_id – Marker identifier.

  • type – Controller-defined marker type.

  • mount – Controller-defined mounting position.

  • marker_size_m – Physical marker size in metres.

  • flow – Optional PyFM completion object.

Throws:

std::runtime_error – When no reply arrives within 10 seconds.

Returns:

Native FlatBuffers registration response.

SLAMNAV::ResponseSetPrecisionNodeT set_precision_node(const std::string &model, int marker_id, const std::string &node_name, pybind11::object flow = pybind11::none())#

Associates a precision-navigation node with a marker.

Parameters:
  • model – Robot model used to compose the Zenoh topic.

  • marker_id – Marker identifier.

  • node_name – Topology node name.

  • flow – Optional PyFM completion object.

Throws:

std::runtime_error – When no reply arrives within 10 seconds.

Returns:

Native FlatBuffers precision-node response.

Public Functions

SLAMNAV::ResponseRTSPSubscribeT rtsp_subscribe(const std::string &model, int cam_id, const std::string &quality)#

Subscribes a camera/quality pair to its RTSP endpoint.

Warning

The caller must consume the media stream from the returned endpoint.

Parameters:
  • model – Robot model used to compose the Zenoh topic.

  • cam_id – Camera identifier.

  • quality – Controller-supported quality name.

Throws:

std::runtime_error – When no reply arrives within 10 seconds.

Returns:

Endpoint metadata; video bytes are not returned by this method.

SLAMNAV::ResponseSetSafetyLidarT set_safety_lidar_mode(const std::string &model, bool value, pybind11::object flow = pybind11::none())#

Enables or disables safety-LiDAR detection mode.

Warning

Disabling a safety sensor can affect personnel safety; enforce site policy externally.

Parameters:
  • model – Robot model used to compose the Zenoh topic.

  • value – Requested safety-LiDAR switch state.

  • flow – Optional PyFM completion object.

Throws:

std::runtime_error – When no reply arrives within 10 seconds.

Returns:

Native FlatBuffers safety-LiDAR response.

amr/amr_setting.hpp#

class RBAmrSettingSDK : public RBBaseSDK#
#include <amr_setting.hpp>

Robot, preset, PDU, drive, and sensor configuration operations.

Python dict/list inputs are converted to generated native tables by the AMR-local SLAMNAV casters. Numeric enum values are cast to FBS enums here.

Robot type and generic settings

SLAMNAV::ResponseGetRobotTypeT get_robot_type(const std::string &m, pybind11::object f = pybind11::none())#

Reads the configured robot type.

Parameters:
  • m – Robot model used to compose the Zenoh topic.

  • f – Optional PyFM completion object.

Throws:

std::runtime_error – When no reply arrives within 10 seconds.

Returns:

Native FlatBuffers response.

SLAMNAV::ResponseSetRobotTypeT set_robot_type(const std::string &m, const std::string &t, pybind11::object f = pybind11::none())#

Updates the configured robot type.

Parameters:
  • m – Robot model used to compose the Zenoh topic.

  • t – Controller-defined robot type.

  • f – Optional PyFM completion object.

Throws:

std::runtime_error – When no reply arrives within 10 seconds.

Returns:

Native FlatBuffers response.

SLAMNAV::ResponseGetSettingCategoryT get_setting_category(const std::string &m, int level, pybind11::object f = pybind11::none())#

Lists setting categories visible at an access level.

Warning

The integer is cast directly; callers must pass a valid enum value.

Parameters:
  • m – Robot model used to compose the Zenoh topic.

  • level – Numeric value of SettingLevelEnum.

  • f – Optional PyFM completion object.

Throws:

std::runtime_error – When no reply arrives within 10 seconds.

Returns:

Native FlatBuffers response.

SLAMNAV::ResponseGetSettingParamT get_setting_param(const std::string &m, int level, const std::string &category, pybind11::object f = pybind11::none())#

Reads parameters in a setting category.

Warning

The integer is cast directly; callers must pass a valid enum value.

Parameters:
  • m – Robot model used to compose the Zenoh topic.

  • level – Numeric value of SettingLevelEnum.

  • category – Setting category name.

  • f – Optional PyFM completion object.

Throws:

std::runtime_error – When the query fails.

Returns:

Native FlatBuffers response.

int parse_setting_param_type(int v)#

Preserves the Python SDK’s setting-type parser contract.

Warning

This helper does not validate the enum range.

Parameters:

v – Raw enum value.

Returns:

v unchanged.

int parse_setting_param_collection(int v)#

Preserves the Python SDK’s setting-type parser contract.

Warning

This helper does not validate the enum range.

Parameters:

v – Raw enum value.

Returns:

v unchanged.

SLAMNAV::ResponseSetSettingParamT set_setting_param(const std::string &m, const std::string &category, const pybind11::dict &param, pybind11::object f = pybind11::none())#

Updates one setting category.

Parameters:
  • m – Robot model used to compose the Zenoh topic.

  • category – Setting category name.

  • param – Mapping accepted by the generated SettingParamT caster.

  • f – Optional PyFM completion object.

Throws:
  • pybind11::cast_error – When param does not match the schema.

  • std::runtime_error – When no reply arrives within 10 seconds.

Returns:

Native FlatBuffers response.

Presets

SLAMNAV::ResponseGetSettingPresetListT get_setting_preset_list(const std::string &m, pybind11::object f = pybind11::none())#

Lists available setting presets.

Parameters:
  • m – Robot model used to compose the Zenoh topic.

  • f – Optional PyFM completion object.

Throws:

std::runtime_error – When no reply arrives within 10 seconds.

Returns:

Native FlatBuffers response.

SLAMNAV::ResponseGetSettingPresetT get_setting_preset(const std::string &m, int level, const std::string &id, pybind11::object f = pybind11::none())#

Reads a setting preset.

Warning

level is cast directly to the schema enum.

Parameters:
  • m – Robot model used to compose the Zenoh topic.

  • level – Numeric value of SettingLevelEnum.

  • id – Decimal preset ID.

  • f – Optional PyFM completion object.

Throws:

std::invalid_argument – When id is not decimal.

Returns:

Native FlatBuffers response.

SLAMNAV::ResponseSetSettingPresetT set_setting_preset(const std::string &m, const std::string &id, const pybind11::dict &param, pybind11::object f = pybind11::none())#

Updates a setting preset.

Parameters:
  • m – Robot model used to compose the Zenoh topic.

  • id – Decimal preset ID.

  • param – Mapping accepted by the generated SettingParamT caster.

  • f – Optional PyFM completion object.

Throws:
  • std::invalid_argument – When id is not decimal.

  • pybind11::cast_error – When param does not match the schema.

Returns:

Native FlatBuffers response.

PDU and drive parameters

SLAMNAV::ResponseGetPduParamT get_pdu_param(const std::string &m, pybind11::object f = pybind11::none())#

Reads PDU parameters.

Parameters:
  • m – Robot model used to compose the Zenoh topic.

  • f – Optional PyFM completion object.

Throws:

std::runtime_error – When no reply arrives within 10 seconds.

Returns:

Native FlatBuffers response.

SLAMNAV::ResponseSetPduParamT set_pdu_param(const std::string &m, const pybind11::list &params, pybind11::object f = pybind11::none())#

Updates PDU parameters.

Parameters:
  • m – Robot model used to compose the Zenoh topic.

  • params – Sequence of mappings accepted by the SettingParamT caster.

  • f – Optional PyFM completion object.

Throws:

pybind11::cast_error – When an entry does not match the schema.

Returns:

Native FlatBuffers response.

SLAMNAV::ResponseGetDriveParamT get_drive_param(const std::string &m, pybind11::object f = pybind11::none())#

Reads drive parameters.

Parameters:
  • m – Robot model used to compose the Zenoh topic.

  • f – Optional PyFM completion object.

Throws:

std::runtime_error – When no reply arrives within 10 seconds.

Returns:

Native FlatBuffers response.

void set_drive_param(const std::string &m, const pybind11::list &params, pybind11::object f = pybind11::none())#

Reports that drive-parameter writes are unsupported.

Parameters:
  • m – Unused robot model retained for API compatibility.

  • params – Unused parameter list retained for API compatibility.

  • f – Unused PyFM object retained for API compatibility.

Throws:

std::runtime_error – Always; the firmware does not support this operation.

Sensor inventory and operating mode

SLAMNAV::ResponseGetSensorInfoT get_sensor_info(const std::string &m, const std::string &t, pybind11::object f = pybind11::none())#

Reads sensor inventory for a target subsystem.

Parameters:
  • m – Robot model used to compose the Zenoh topic.

  • t – Controller-defined sensor target.

  • f – Optional PyFM completion object.

Throws:

std::runtime_error – When no reply arrives within 10 seconds.

Returns:

Native FlatBuffers response.

SLAMNAV::ResponseSetSensorInfoT set_sensor_info(const std::string &m, const std::string &t, const pybind11::list &info, pybind11::object f = pybind11::none())#

Replaces sensor inventory for a target subsystem.

Parameters:
  • m – Robot model used to compose the Zenoh topic.

  • t – Controller-defined sensor target.

  • info – Sequence accepted by the generated SensorInfoT caster.

  • f – Optional PyFM completion object.

Throws:

pybind11::cast_error – When an entry does not match the schema.

Returns:

Native FlatBuffers response.

SLAMNAV::ResponseGetSensorModeT get_sensor_mode(const std::string &m, const std::string &t, int index, const std::string &serial, pybind11::object f = pybind11::none())#

Reads one sensor’s operating mode.

Parameters:
  • m – Robot model used to compose the Zenoh topic.

  • t – Controller-defined sensor target.

  • index – Sensor index within the target.

  • serial – Sensor serial number.

  • f – Optional PyFM completion object.

Throws:

std::runtime_error – When no reply arrives within 10 seconds.

Returns:

Native FlatBuffers response.

SLAMNAV::ResponseSetSensorModeT set_sensor_mode(const std::string &m, const std::string &t, int index, const std::string &serial, bool value, pybind11::object f = pybind11::none())#

Enables or disables one sensor’s operating mode.

Warning

Disabling a safety-related sensor requires external safety validation.

Parameters:
  • m – Robot model used to compose the Zenoh topic.

  • t – Controller-defined sensor target.

  • index – Sensor index within the target.

  • serial – Sensor serial number.

  • value – Requested switch state.

  • f – Optional PyFM completion object.

Throws:

std::runtime_error – When no reply arrives within 10 seconds.

Returns:

Native FlatBuffers response.

amr/amr_status.hpp#

class RBAmrStatusSDK : public RBBaseSDK#
#include <amr_status.hpp>

Reads AMR variables, status snapshots, LiDAR data, and paths.

Core variables use request/reply. Status, move status, LiDAR, and path methods block until the next subscription sample and expose it as a snake_case Python dict through the AMR caster.

Public Functions

pybind11::object get_variable(const std::string &m, const std::string &name)#

Reads one typed core variable (number, array, string, or None).

Warning

A timeout is intentionally represented as None, not an exception.

Parameters:
  • m – Robot model used in both the topic and qualified variable name.

  • name – Unqualified core variable name.

Returns:

Python float, list, string, or None for invalid/unknown data.

SLAMNAV::StatusT get_status(const std::string &m, pybind11::object f = pybind11::none())#

Waits for the next complete AMR status sample.

Warning

This method blocks until receive_one obtains a sample.

Parameters:
  • m – Robot model used to compose the subscription topic.

  • f – Optional PyFM object whose done() is called after receipt.

Returns:

Next native FlatBuffers status sample.

SLAMNAV::MoveStatusT get_move_status(const std::string &m, pybind11::object f = pybind11::none())#

Waits for the next complete AMR status sample.

Warning

This method blocks until receive_one obtains a sample.

Parameters:
  • m – Robot model used to compose the subscription topic.

  • f – Optional PyFM object whose done() is called after receipt.

Returns:

Next native FlatBuffers status sample.

SLAMNAV::ResponseGetInfoCategoryT get_info_category(const std::string &m, pybind11::object f = pybind11::none())#

Queries the available information categories.

Parameters:
  • m – Robot model used to compose the Zenoh topic.

  • f – Optional PyFM object whose done() is called after a reply.

Throws:

std::runtime_error – When no reply arrives within 10 seconds.

Returns:

Native FlatBuffers category response.

SLAMNAV::LidarDataT get_lidar2d(const std::string &m, pybind11::object f = pybind11::none())#

Waits for the next complete AMR status sample.

Warning

This method blocks until receive_one obtains a sample.

Parameters:
  • m – Robot model used to compose the subscription topic.

  • f – Optional PyFM object whose done() is called after receipt.

Returns:

Next native FlatBuffers status sample.

SLAMNAV::PathT get_global_path(const std::string &m, pybind11::object f = pybind11::none())#

Waits for the next complete AMR status sample.

Warning

This method blocks until receive_one obtains a sample.

Parameters:
  • m – Robot model used to compose the subscription topic.

  • f – Optional PyFM object whose done() is called after receipt.

Returns:

Next native FlatBuffers status sample.

SLAMNAV::PathT get_local_path(const std::string &m, pybind11::object f = pybind11::none())#

Waits for the next complete AMR status sample.

Warning

This method blocks until receive_one obtains a sample.

Parameters:
  • m – Robot model used to compose the subscription topic.

  • f – Optional PyFM object whose done() is called after receipt.

Returns:

Next native FlatBuffers status sample.

amr/rb_amr_sdk.hpp#

class RBAmrSDK : public RBBaseSDK#
#include <rb_amr_sdk.hpp>

Root AMR SDK exposed to Python as rb_sdk_cpp.RBAmrSDK.

Domain members are intentionally public/read-only in pybind so callers use sdk.map, sdk.move, and the other domain APIs exactly like the former Python aggregate. All domains share RBBaseSDK’s process-wide Zenoh client.

Note

FlatBuffers generated headers and casters are regenerated by make backend.flatc. This aggregate and the handwritten domain methods are not schema-generated and must be reviewed when request or response fields change.

Public Functions

std::optional<std::string> connect(const ConnectOptions &options)#

base.hpp#

Enums

enum class ServerType#

SDK service family selector used by legacy construction paths.

Kept only for source compatibility with the original Python SDK, where the constructor accepted a server family. The C++ RBBaseSDK constructor accepts this value and ignores it: every SDK instance in a process shares the same zenoh session regardless of the service family it talks to.

Values:

enumerator AMR#
enumerator MANIPULATE#
enum class CongestionControl : int#

Zenoh congestion-control names used by SDK helpers when calling publish().

publish() takes the congestion control as a plain int and casts it straight to zenoh-c’s z_congestion_control_t, where 0 = BLOCK and 1 = DROP (the zenoh-c default, and the default of publish()).

The values must match z_congestion_control_t exactly: the int is cast without translation, so a mismatch turns DROP into BLOCK and stalls the sender thread under congestion.

Values:

enumerator BLOCK#
enumerator DROP#
enumerator DROP_LATEST#
enum class Priority : int#

Zenoh priority values used by publish().

The values match zenoh-c’s z_priority_t one-to-one (1 is the highest priority, 7 the lowest) and are passed through unchanged. Lower numbers are scheduled first by the zenoh transport when several messages are queued on the same link. DATA (5) is the default for publish(). Real-time control streams such as servo commands use REAL_TIME.

Values:

enumerator REAL_TIME#
enumerator INTERACTIVE_HIGH#
enumerator INTERACTIVE_LOW#
enumerator DATA_HIGH#
enumerator DATA#
enumerator DATA_LOW#
enumerator BACKGROUND#
struct MoveType#
#include <base.hpp>

Move-type string constants shared by manipulate program/point helpers.

  • J: joint-space move.

  • L: linear (Cartesian) move.

  • JB: joint-blend sequence (call_move_jb_clr/add/run).

  • LB: linear-blend sequence (call_move_lb_clr/add/run).

  • PB: point-blend sequence (call_move_pb_clr/add/run).

  • XB: mixed blend sequence where each segment chooses joint or linear motion (call_move_xb_clr/add/run).

Public Static Attributes

static constexpr std::string_view J = "J"#
static constexpr std::string_view L = "L"#
static constexpr std::string_view JB = "JB"#
static constexpr std::string_view LB = "LB"#
static constexpr std::string_view PB = "PB"#
static constexpr std::string_view XB = "XB"#
struct ConnectOptions#
#include <base.hpp>

Options for connecting this SDK process as a remote zenoh peer.

Passed to RBBaseSDK::connect() when the SDK runs on a different machine than the robot (for example a developer PC or an external vision PC). The SDK opens a zenoh listen port, registers its IP and port with the robot’s common service over HTTP, and keeps that registration alive with periodic heartbeats so that the robot’s services connect back to it and the process joins the robot’s zenoh mesh.

Only token and host are required; every other field has a usable default.

Public Members

std::string token#

Bearer token sent as “Authorization: Bearer <token>” on every peer registration, heartbeat, and unregistration request to the common service.

std::string host#

IPv4 address or hostname of the robot that runs the common service. The service is reached at http://<host>:8000. If this resolves to the local machine (“127.0.0.1”, “localhost”, “::1”, or an address of this host), connect() does nothing because the process is already in the local mesh.

std::optional<int> zenoh_port#

Local TCP port on which this process listens for zenoh connections from the robot. When omitted, a free port is picked by the OS. Set it when a firewall only allows a known port.

int ttl = 30#

Peer registration time-to-live in seconds. The common service drops the peer if no heartbeat arrives within this time. Default: 30.

std::optional<double> heartbeat#

Heartbeat interval in seconds. When omitted, ttl / 2 is used, with a lower bound of 1 second. Must be shorter than ttl or the registration expires between heartbeats.

std::optional<double> mesh_timeout#

Maximum time in seconds connect() waits for the zenoh echo check to prove that the robot can reach this process. When omitted, 5 seconds is used. If the check does not pass in time, the peer is unregistered and connect() returns no peer id.

double mesh_probe_timeout = 1.0#

Time in seconds to wait for each individual echo probe reply. Default: 1.0.

double mesh_probe_interval = 0.5#

Delay in seconds between two consecutive echo probes. Default: 0.5.

template<typename ClientT, typename ConfigT>
class VisionClientRegistry#
#include <base.hpp>

Owns vendor vision clients keyed by module_name.

Public Functions

inline ClientT *get(const std::string &module_name)#

Returns the client currently registered for module_name.

Returns:

Pointer to the owned client, or nullptr when no client is registered.

inline ClientT &connect(const std::string &module_name, const ConfigT &config)#

Replaces the client for module_name and connects the new one.

If an existing connected client is present for the same module, it is disconnected before the replacement is stored.

Throws:

std::exception – Propagates errors thrown by the vendor client’s constructor or connect().

Returns:

Reference to the connected client owned by this registry.

inline void disconnect_all()#

Disconnects all connected clients owned by this registry.

Individual disconnect errors are logged and swallowed so SDK cleanup can continue.

Private Members

std::unordered_map<std::string, std::unique_ptr<ClientT>> clients_#
class RBBaseSDK#
#include <base.hpp>

Common SDK base for zenoh transport, lifecycle, logging, and shared helpers.

Every domain SDK (RBManipulateSDK, RBAmrSDK, RBProgramSDK, RBRby1SDK, …) derives from this class. It provides:

  • One zenoh session per process. All SDK instances in the same process share a single rb_zenoh::ZenohClient. The session is opened lazily by the first constructor and is closed only when the last SDK instance is closed (reference counted per process id).

  • Raw and FlatBuffer-typed request/reply (query, query_one, query_all), publish/subscribe (publish, zenoh_subscribe, receive_one), and serving requests (zenoh_queryable).

  • Automatic recovery: query-style calls that fail with a transport error or no reply reconnect the shared session and retry exactly once.

  • Remote peer mode (connect/disconnect): lets a process running off-robot join the robot’s zenoh mesh through the common service.

  • Cross-domain helpers: program logs (log), PyFM step result checks (manipulate_return_value, validate_single_return_value), CAN bus access through the host_pcan service (connect_can, disconnect_can, transmit_can), and vendor vision client registries.

Threading: blocking network calls release the Python GIL when it is held, so other Python threads and zenoh callbacks keep running while a call waits for a reply. Calls are safe to make from multiple threads.

Fork safety: the zenoh runtime does not survive fork(). An instance that was created in a parent process is ignored by close() in a forked child; the child must create its own SDK instances.

Python binding: the Python class keeps one instance per (process id, class), so constructing the same SDK class twice in one process returns the same object. connect() and disconnect() return awaitables in Python, and zenoh_subscribe()/zenoh_queryable() are used as decorators.

Subclassed by RBAmrAccessorySDK, RBAmrCapabilitySDK, RBAmrControlSDK, RBAmrFileSDK, RBAmrLocalizationSDK, RBAmrMapSDK, RBAmrMoveSDK, RBAmrProgramSDK, RBAmrSDK, RBAmrSensorSDK, RBAmrSettingSDK, RBAmrStatusSDK, RBManipulateConfigSDK, RBManipulateFlangeSDK, RBManipulateGetDataSDK, RBManipulateIOSDK, RBManipulateMaintenanceSDK, RBManipulateMoveSDK, RBManipulatePointSDK, RBManipulateProgramSDK, RBManipulateSDK, RBManipulateSafetySDK, RBManipulateServiceSDK, RBManipulateStateSDK, RBManipulateVisionSDK, RBProgramSDK, RBRby1SDK

Public Types

using _gil_release_if_held = rb_sdk::gil_release_if_held#

Public Functions

RBBaseSDK(const RBBaseSDK&) = delete#
RBBaseSDK &operator=(const RBBaseSDK&) = delete#
RBBaseSDK(RBBaseSDK&&) = delete#
RBBaseSDK &operator=(RBBaseSDK&&) = delete#
RBBaseSDK(std::optional<ServerType> server = std::nullopt, bool use_directly = false)#

Creates an SDK instance and ensures the shared zenoh session exists.

The first SDK constructed in a process opens the shared zenoh session (as a leaf peer, using the SERVICE and IS_DEV environment variables). Later constructions reuse it, and if the session had been closed explicitly it is reopened. Each instance increments the per-process reference count that close() uses to decide when the shared session can be closed, and is added to the registry used by close_all_for_pid().

A failure to open the zenoh session is logged and does not throw; the first call that needs the session then fails or triggers a reconnect.

Parameters:
  • server – Legacy service selector. Currently accepted for API compatibility and not used by the C++ implementation.

  • use_directly – Legacy construction flag. Currently accepted for API compatibility and not used by the C++ implementation.

virtual ~RBBaseSDK()#

Closes this SDK instance. Virtual so derived SDKs can be deleted through RBBaseSDK*.

Equivalent to calling close(). close() is idempotent, so an explicit close() before destruction is safe.

std::optional<std::string> connect(const ConnectOptions &options)#

Registers this process as a remote zenoh peer through the common service.

Use this when the SDK runs on a machine other than the robot. The steps are:

  1. If options.host resolves to this machine, return std::nullopt immediately: the process is already part of the local mesh.

  2. If a peer is already registered in this process, return its id.

  3. Pick the listen port (options.zenoh_port or a free port), add “tcp/0.0.0.0:<port>” to ZENOH_PEER_LISTEN_ENDPOINTS, and reopen the shared zenoh session so it listens on that port.

  4. POST this machine’s IP (the local address used to reach the host), port, and ttl to http://<host>:8000/zenoh/peer.

  5. Start a background keepalive thread that sends a heartbeat every options.heartbeat seconds (ttl / 2 by default) and re-registers the peer if the common service forgets it (for example after a restart).

  6. Publish echo probes on “muscat/zenoh/echo_req” until a matching reply arrives on “muscat/zenoh/echo_res” or options.mesh_timeout expires.

If the first registration request fails (for example the robot is still booting), the error is logged, the keepalive thread keeps retrying with exponential backoff (2 s up to 30 s), and std::nullopt is returned. If registration succeeds but the echo check times out, the peer is unregistered and std::nullopt is returned.

In Python this method returns an awaitable that runs the blocking work in a worker thread: use “await sdk.connect(options)”.

Parameters:

options – Remote peer registration and heartbeat options.

Throws:

std::runtime_error – If local IP/port detection or zenoh reconnection fails, or if unregistering the peer after a failed echo check fails.

Returns:

Registered peer id, or std::nullopt when registration is skipped, still pending in the background, or the mesh echo check fails.

int zenoh_subscribe(const std::string &topic, rb_zenoh::SubCallback callback, rb_zenoh::CppSubscribeOptions opts = {})#

Declares a raw zenoh subscriber.

The callback runs on an rb_zenoh dispatch worker thread, not on the calling thread, and receives (key, payload bytes, attachment string). The topic is remembered by this instance so that close() and disconnect() undeclare it.

In Python this method is a decorator factory with a higher-level callback contract; see the Python docstring.

Parameters:
  • topic – Zenoh key expression to subscribe to. Wildcards (“*”, “**”) are allowed.

  • callback – Callback invoked with raw samples.

  • opts – Zenoh subscription options. Defaults: queue_size 8, overflow LatestOnly (only the newest pending sample is kept when the callback falls behind), dispatch Queue (callback runs on a dedicated worker), no self-sender filtering, no rate limit.

Throws:

std::exception – Propagates errors from ZenohClient::declare_subscriber().

Returns:

Subscriber id that can be passed to zenoh_unsubscribe().

void zenoh_unsubscribe(int sub_id)#

Undeclares one subscriber id returned by zenoh_subscribe().

Only that subscriber is removed; the shared session and other subscribers on the same topic are left untouched. Negative ids (the failure value of the FlatBuffer overload) are ignored.

template<typename FBSType>
inline int zenoh_subscribe(const std::string &topic, std::function<void(const std::string&, std::unique_ptr<typename FBSType::NativeTableType>, const std::string&)> callback, rb_zenoh::CppSubscribeOptions opts = {})#

Declares a FlatBuffer-decoding zenoh subscriber.

Each sample payload is decoded as FBSType and unpacked into its native table (FBSType::NativeTableType) before the callback runs. The callback receives (key, decoded object, attachment string) on an rb_zenoh dispatch worker thread.

Unlike the raw overload, declaration errors are not thrown: they are printed and -1 is returned.

Parameters:
  • topic – Zenoh key expression to subscribe to.

  • callback – Callback invoked with the decoded native table.

  • opts – Zenoh subscription options.

Returns:

Subscriber id, or -1 if declaration fails.

void zenoh_queryable(const std::string &topic, rb_zenoh::QueryHandler handler)#

Declares a zenoh queryable for raw request/reply handling.

The handler is called for every query that matches topic

with (key, parameters, optional payload bytes, attachment, reply_fn, del_fn). It answers by calling reply_fn(key, payload, attachment, content_type,

is_error), or calls del_fn() to finish without a reply so the caller gets no answer from this queryable.

Duplicate declarations for the same topic on this SDK instance are ignored with a warning; the first handler stays active. The topic is undeclared by close() and disconnect().

In Python this method is a decorator factory whose handler returns the reply value; see the Python docstring.

Parameters:
  • topic – Zenoh key expression to serve.

  • handler – Query handler invoked by ZenohClient.

void register_zenoh_subscriber(const std::string &topic)#

Registers an externally declared subscriber topic for cleanup by close().

Use this when a subscriber was declared on the shared zenoh session by some path other than zenoh_subscribe() and should still be removed when this instance is closed or disconnected. Cleanup is by topic, so every subscriber on that topic in the shared session is removed.

Parameters:

topic – Zenoh key expression of the subscriber.

void register_zenoh_queryable(const std::string &topic)#

Registers an externally declared queryable topic for cleanup by close().

Same as register_zenoh_subscriber() for queryables. Registering a topic also makes later zenoh_queryable() calls for that topic on this instance a no-op, because the topic is treated as already declared.

Parameters:

topic – Zenoh key expression of the queryable.

bool disconnect()#

Unregisters this process from the remote peer mesh and closes its shared zenoh session.

Reverses connect(): stops and joins the keepalive thread, sends DELETE /zenoh/peer/<peer_id> to the common service (a failure is logged, not thrown), undeclares this instance’s subscribers and queryables, and closes the shared zenoh session unconditionally. Other SDK instances in the process lose their session too; their next query-style call reopens it, but their subscribers and queryables are not restored.

In Python this method returns an awaitable: use “await sdk.disconnect()”.

Returns:

true when a peer registration or keepalive thread was active and has been torn down; false when there was nothing to disconnect.

virtual void before_close()#

Optional cleanup hook called by close() before shared resources are released.

The default implementation does nothing. Override it to release resources owned by a derived SDK (for example vendor vision clients). Exceptions thrown from it are logged and swallowed.

Note

C++ calls a virtual function on the class whose destructor is running, so when close() is reached only from ~RBBaseSDK(), the override is no longer dispatched. A derived class that overrides this hook must call close() from its own destructor.

void close()#

Releases this instance’s resources and closes the shared session when it is the last SDK.

In order: runs before_close(), decrements the per-process SDK reference count, then either calls disconnect() when a remote peer is registered (which always closes the shared session), or undeclares only this instance’s subscribers and queryables and closes the shared session if no other SDK instance is left.

Idempotent: later calls do nothing. Does nothing in a forked child for an instance created by the parent process. Called automatically by the destructor.

template<typename Fn>
inline auto _zenoh_call_with_retry(const char *op, Fn &&fn) -> decltype(fn())#

Runs a zenoh call and retries it once after reconnecting on transport/no-reply errors.

Every public query, publish, and receive method goes through this helper. Because of the single retry, the worst-case wait of a call that gets no reply is about twice its timeout. Other exceptions (for example rb_zenoh::ZenohReplyError, where the peer answered with an error) are not retried.

Intended for query-style calls. Transport errors force a reconnect; no-reply errors refresh the current process’s shared client without forcing an otherwise healthy session closed. If the retry also fails, the original rb_zenoh exception propagates unchanged: pybind translates it to Python ZenohNoReply/ZenohTransportError, which the FastAPI handlers map to 504/502. Wrapping it in std::runtime_error would lose that type (C++ has no cause chain across pybind) and surface as a 500.

std::vector<rb_zenoh::RawReply> query(const std::string &topic, const std::optional<std::vector<uint8_t>> &payload, int timeout_ms, int target = 0)#

Sends a raw zenoh query and returns every raw reply.

Blocks until every matching queryable has answered or timeout_ms elapses, then returns all replies received, including error replies (RawReply::is_error is true for those). Unlike query_one(), getting no reply is not an error: the result is simply empty.

Parameters:
  • topic – Zenoh key expression to query. Wildcards fan the query out to every matching queryable.

  • payload – Optional raw payload bytes sent with the query.

  • timeout_ms – Query timeout in milliseconds.

  • target – zenoh-c query target: 0 = BEST_MATCHING (default), 1 = ALL, 2 = ALL_COMPLETE.

Throws:
  • rb_zenoh::ZenohTransportError – If the session is not open or the query cannot be sent, even after one reconnect and retry.

  • std::runtime_error – If topic is not a valid key expression.

Returns:

Raw replies (key, payload, attachment, encoding, is_error) received before timeout. May be empty.

rb_zenoh::RawReply query_one(const std::string &topic, const std::optional<std::vector<uint8_t>> &payload, int timeout_ms, int target = 0)#

Sends a raw zenoh query and returns one raw reply.

Waits for the query to finish (all replies or timeout_ms), then returns the first non-error reply. This is the usual call for a service RPC that has exactly one responder.

In Python, ZenohNoReply and ZenohTransportError keep their rb_zenoh exception types, which the FastAPI services map to HTTP 504 and 502.

Parameters:
  • topic – Zenoh key expression to query.

  • payload – Optional raw payload bytes sent with the query.

  • timeout_ms – Query timeout in milliseconds. With the single reconnect-and-retry, the worst case is about twice this value.

  • target – zenoh-c query target: 0 = BEST_MATCHING (default), 1 = ALL, 2 = ALL_COMPLETE.

Throws:
  • rb_zenoh::ZenohTransportError – If the session is not open or the query cannot be sent, even after one reconnect and retry.

  • rb_zenoh::ZenohNoReply – If no reply arrives before timeout, even after one reconnect and retry.

  • rb_zenoh::ZenohReplyError – If only error replies arrive. The message contains the first error payload. Not retried.

Returns:

The first successful raw reply (key, payload, attachment, encoding, is_error = false).

template<typename FBSType>
inline std::unique_ptr<typename FBSType::NativeTableType> query_one(const std::string &topic, const std::optional<std::vector<uint8_t>> &payload = std::nullopt, int timeout_ms = 1000, int target = 0)#

Sends a zenoh query and decodes one FlatBuffer reply.

Same as the raw query_one(), then unpacks the reply payload as FBSType (the FlatBuffer table type, for example IPC::ResponseCANConnect) into its native object type (FBSType::NativeTableType, for example IPC::ResponseCANConnectT).

Warning

The reply buffer is not run through a FlatBuffer verifier. The responder must actually send an FBSType buffer.

Parameters:
  • topic – Zenoh key expression to query.

  • payload – Optional raw payload bytes sent with the query.

  • timeout_ms – Query timeout in milliseconds.

  • target – zenoh-c query target: 0 = BEST_MATCHING (default), 1 = ALL, 2 = ALL_COMPLETE.

Throws:
  • rb_zenoh::ZenohTransportError – Same conditions as the raw query_one().

  • rb_zenoh::ZenohReplyError – If only error replies arrive, or if the successful reply has an empty payload.

Returns:

Decoded native FlatBuffer table. Never null.

template<typename FBSType, typename ReqT>
inline std::unique_ptr<typename FBSType::NativeTableType> query_one(const std::string &topic, const ReqT &req, size_t req_buf_size = 512, int timeout_ms = 1000, int target = 0)#

Serializes req as a FlatBuffer request and decodes one FlatBuffer reply.

The typical service RPC call: req is a native request object (for example IPC::RequestCANConnectT), packed with its own table type and sent as the query payload. The reply is decoded as FBSType. Only FBSType has to be given explicitly; ReqT is deduced from req.

Parameters:
  • topic – Zenoh key expression to query.

  • req – Native request table to serialize.

  • req_buf_size – Initial FlatBuffer builder size in bytes. The builder grows if needed, so this is only a performance hint.

  • timeout_ms – Query timeout in milliseconds.

  • target – zenoh-c query target: 0 = BEST_MATCHING (default), 1 = ALL, 2 = ALL_COMPLETE.

Throws:

rb_zenoh::ZenohTransportError – Same conditions as the raw-payload query_one<FBSType>().

Returns:

Decoded native FlatBuffer table. Never null.

std::vector<rb_zenoh::RawReply> query_all(const std::string &topic, const std::optional<std::vector<uint8_t>> &payload, int timeout_ms, int target = 0)#

Sends a raw zenoh query and returns every successful raw reply.

Like query(), but error replies are dropped from the result. Use it to collect answers from several responders, for example with a wildcard key expression. Getting no reply is not an error.

Parameters:
  • topic – Zenoh key expression to query.

  • payload – Optional raw payload bytes sent with the query.

  • timeout_ms – Query timeout in milliseconds.

  • target – zenoh-c query target: 0 = BEST_MATCHING (default), 1 = ALL, 2 = ALL_COMPLETE.

Throws:

rb_zenoh::ZenohTransportError – If the session is not open or the query cannot be sent, even after one reconnect and retry.

Returns:

Successful raw replies received before timeout. May be empty.

template<typename FBSType>
inline std::vector<std::unique_ptr<typename FBSType::NativeTableType>> query_all(const std::string &topic, const std::optional<std::vector<uint8_t>> &payload = std::nullopt, int timeout_ms = 1000, int target = 0)#

Sends a zenoh query and decodes all FlatBuffer replies.

Same as the raw query_all(), with every successful reply decoded as FBSType. The reply buffers are not verified.

Returns:

Decoded native tables, one per successful reply. May be empty.

template<typename FBSType, typename ReqT>
inline std::vector<std::unique_ptr<typename FBSType::NativeTableType>> query_all(const std::string &topic, const ReqT &req, size_t req_buf_size = 512, int timeout_ms = 1000, int target = 0)#

Serializes req as a FlatBuffer request and decodes all FlatBuffer replies.

Combines the request packing of query_one<FBSType>(topic, req) with the multi-reply behavior of query_all<FBSType>().

Returns:

Decoded native tables, one per successful reply. May be empty.

void publish(const std::string &topic, const std::vector<uint8_t> &payload, const std::string &extra_attachment = "", int congestion_control = 1, int priority = 5, bool express = false)#

Publishes raw bytes to a zenoh topic.

Non-blocking: the sample is put on the session’s transmit queue and sent by a background worker, so this returns before the data is on the wire. The queue holds up to 4096 samples; when it is full, the oldest pending sample is dropped. While the session is closing, samples are silently discarded. There is no delivery confirmation; use query_one() when an acknowledgement is needed.

Parameters:
  • topic – Zenoh key expression to publish to. Must not contain wildcards.

  • payload – Raw payload bytes.

  • extra_attachment – Optional attachment string appended to the sender metadata that subscribers receive.

  • congestion_control – zenoh-c congestion control: 1 = DROP (default, drop the sample when the network is congested) or 0 = BLOCK (wait until it can be sent). See CongestionControl.

  • priority – zenoh-c priority 1 (REAL_TIME) to 7 (BACKGROUND). Default 5 (DATA). See Priority.

  • express – If true, zenoh sends the sample immediately instead of batching it with others. Lowers latency at the cost of throughput.

Throws:

std::runtime_error – If topic is not a valid key expression.

template<typename TObj>
inline void publish(const std::string &topic, const TObj &obj, size_t initial_size = 512, const std::string &extra_attachment = "", int congestion_control = 1, int priority = 5, bool express = false)#

Serializes a native FlatBuffer object and publishes it to zenoh.

Packs obj (a native object such as muscat::RB_Program_LogT) with its own table type and publishes the buffer with the same non-blocking, queued semantics as the raw publish().

Parameters:
  • topic – Zenoh key expression to publish to.

  • obj – Native FlatBuffer table to serialize.

  • initial_size – Initial FlatBuffer builder size in bytes. The builder grows if needed, so this is only a performance hint.

  • extra_attachment – Optional attachment string.

  • congestion_control – zenoh-c congestion control: 1 = DROP (default) or 0 = BLOCK.

  • priority – zenoh-c priority 1 (REAL_TIME) to 7 (BACKGROUND). Default 5 (DATA).

  • express – If true, send immediately without batching.

template<typename FBSType>
inline FBSType::NativeTableType receive_one(const std::string &topic, int timeout_ms = 1000, const std::string &self_sender_id = "")#

Receives and decodes one FlatBuffer sample from topic.

Same as the raw receive_one(), with the sample payload decoded as FBSType. The buffer is not verified.

Parameters:
  • topic – Zenoh key expression to receive from.

  • timeout_ms – Receive timeout in milliseconds.

  • self_sender_id – Sender id whose samples are ignored. Empty means no filtering.

Throws:

rb_zenoh::ZenohNoReply – If no sample arrives before timeout, even after one reconnect and retry.

Returns:

Decoded native FlatBuffer table, by value.

rb_zenoh::QueuedSample receive_one(const std::string &topic, int timeout_ms = 1000, const std::string &self_sender_id = "")#

Receives one raw queued sample from topic.

Declares a temporary subscriber, waits for the first sample published after this call, undeclares the subscriber, and returns the sample. Samples published before the call are not seen. Use it to wait for the next value of a periodic stream or for a one-off event.

Parameters:
  • topic – Zenoh key expression to receive from.

  • timeout_ms – Receive timeout in milliseconds. With the single reconnect-and-retry, the worst case is about twice this value.

  • self_sender_id – Sender id to ignore when filtering self-originated samples. Empty means no filtering.

Throws:

rb_zenoh::ZenohNoReply – If no sample arrives before timeout, even after one reconnect and retry.

Returns:

Raw queued sample (key, payload, attachment).

void log(const std::string &content, const std::string &robot_model, const std::string &level, bool disable_db = false, FlowManagerArgsPtr flow_manager_args = nullptr)#

Emits a program log entry on the shared muscat log topic.

Publishes a muscat::RB_Program_LogT on “muscat/program/log”, where the common service’s program feature picks it up as a program log. The call is fire-and-forget (see publish()); it does not wait for the log to be stored.

Parameters:
  • content – Log message content.

  • robot_model – Name of the robot model associated with the log.

  • level – Log level: “INFO”, “WARNING”, “ERROR”, “USER”, “DEBUG”, or “GENERAL”. Matching is case-sensitive. Any other string leaves the log type at its FlatBuffer default.

  • disable_db – Kept for parity with the Python SDK; currently ignored.

  • flow_manager_args – Optional PyFM step context. If provided, the step is marked done after publishing the log.

template<typename T>
inline void manipulate_return_value(const std::string &func_name, const T &obj_payload, FlowManagerArgsPtr flow_manager_args = nullptr)#

Raises on non-zero return_value when called from a PyFM step.

If flow_manager_args is omitted, this helper ignores return_value, matching the Python SDK’s direct-call behavior. A failed step should stop the program, while a direct caller is expected to inspect return_value itself.

This helper never calls flow_manager_args->done(); the caller marks the step done after this check passes.

Parameters:
  • func_name – Name used in the generated error message.

  • obj_payload – Response object to inspect. Types without a return_value field pass through.

  • flow_manager_args – Optional PyFM step context.

Throws:

std::runtime_error – If flow_manager_args is provided and obj_payload.return_value is non-zero.

template<typename T>
inline T validate_single_return_value(const std::optional<T> &obj_payload, FlowManagerArgsPtr flow_manager_args = nullptr)#

Validates an optional response payload and optionally completes the PyFM step.

Unlike manipulate_return_value(), a non-zero return_value raises even when flow_manager_args is omitted.

Parameters:
  • obj_payload – Optional response payload.

  • flow_manager_args – Optional PyFM step context. If provided, the step is marked done after validation succeeds.

Throws:

std::runtime_error – If obj_payload is empty, or if the payload has a non-zero return_value field.

Returns:

The contained payload value.

IPC::ResponseCANConnectT connect_can(const std::string &channel, uint32_t bitrate, const std::string &client_id, bool fd = false, uint32_t data_bitrate = 0, bool receive_own_messages = false, const std::string &iface = "pcan", FlowManagerArgsPtr flow_manager_args = nullptr)#

Opens a CAN channel through the host_pcan service.

Sends a request on “muscat/can/connect” (1 s timeout) to the host service, which opens the bus on the robot PC. Several clients can share one channel: the host keeps a list of client IDs per channel and closes the channel only when the last client calls disconnect_can(). Frames are sent with transmit_can().

In Python the keyword arguments use the FlatBuffer field names: channel, bitrate, clientId, fd, dataBitrate, receiveOwnMessages, interface, flow_manager_args (all keyword-only).

Parameters:
  • channel – CAN channel name as understood by the interface backend, for example “PCAN_USBBUS1”.

  • bitrate – Nominal (arbitration phase) bitrate in bit/s, for example 500000. For socketcan the host rejects a bitrate that differs from the one configured on the interface; it never changes the interface bitrate.

  • client_id – Required ID of the client opening the channel. Use a value that stays the same across restarts, such as the plugin ID, so a restarted client takes back its own connection.

  • fd – Whether to open the channel in CAN-FD mode.

  • data_bitrate – CAN-FD data phase bitrate in bit/s. Used only when fd is true; 0 leaves it to the backend default.

  • receive_own_messages – Whether transmitted frames should be looped back to this channel’s receivers.

  • iface – CAN interface backend, defaults to “pcan” (PEAK-System adapters).

  • flow_manager_args – Optional PyFM step context. If provided, the step is marked done on success and an unsuccessful response raises.

Throws:
  • std::runtime_error – If no response is received, or if flow_manager_args is provided and the response reports failure (the exception message is the service’s message).

  • rb_zenoh::ZenohNoReply – If the host service cannot be reached.

Returns:

IPC::ResponseCANConnectT returned by the host service. Check success and message when flow_manager_args is not given, because a failure is then returned instead of raised.

IPC::ResponseCANDisconnectT disconnect_can(const std::string &channel, const std::string &client_id, FlowManagerArgsPtr flow_manager_args = nullptr)#

Closes a CAN channel through the host_pcan service.

Sends a request on “muscat/can/disconnect” (1 s timeout). Releases only this client’s use of the channel; the host closes the channel when no client is left. Same success and error handling as connect_can().

Parameters:
  • channel – CAN channel name previously passed to connect_can().

  • client_id – Client ID previously passed to connect_can().

  • flow_manager_args – Optional PyFM step context. If provided, the step is marked done on success and an unsuccessful response raises.

Throws:
  • std::runtime_error – If no response is received, or if flow_manager_args is provided and the response reports failure.

  • rb_zenoh::ZenohNoReply – If the host service cannot be reached.

Returns:

IPC::ResponseCANDisconnectT returned by the host service.

IPC::ResponseCANTransmitT transmit_can(const std::string &channel, uint32_t arbitration_id, const std::vector<uint8_t> &data = {}, uint8_t dlc = 0, bool is_extended_id = false, bool is_remote_frame = false, bool is_fd = false, bool bitrate_switch = false, bool is_error_frame = false, bool error_state_indicator = false, double timestamp = 0.0, FlowManagerArgsPtr flow_manager_args = nullptr)#

Transmits one CAN/CAN-FD frame through the host_pcan service.

Sends a request on “muscat/can/transmit” (1 s timeout) carrying one IPC::CANMessageT. The channel must have been opened with connect_can(). The call returns once the host service has handed the frame to the bus, not when another node acknowledges it. Same success and error handling as connect_can().

In Python the keyword arguments use the FlatBuffer field names: channel, arbitrationId, data, dlc, isExtendedId, isRemoteFrame, isFd, bitrateSwitch, isErrorFrame, errorStateIndicator, timestamp, flow_manager_args (all keyword-only).

Parameters:
  • channel – CAN channel name previously passed to connect_can().

  • arbitration_id – CAN arbitration id: 11-bit (0x000-0x7FF) for a standard id, 29-bit for an extended id.

  • data – Frame payload bytes: up to 8 for classic CAN, up to 64 for CAN-FD.

  • dlc – Data length code. 0 lets the backend derive it from data.

  • is_extended_id – Whether arbitration_id is an extended (29-bit) id.

  • is_remote_frame – Whether the frame is a remote transmission request (no data).

  • is_fd – Whether the frame is CAN-FD.

  • bitrate_switch – Whether the CAN-FD data phase uses the faster data bitrate.

  • is_error_frame – Whether the frame is an error frame.

  • error_state_indicator – CAN-FD error-state indicator flag.

  • timestamp – Optional frame timestamp in seconds. 0 means unset.

  • flow_manager_args – Optional PyFM step context. If provided, the step is marked done on success and an unsuccessful response raises.

Throws:
  • std::runtime_error – If no response is received, or if flow_manager_args is provided and the response reports failure.

  • rb_zenoh::ZenohNoReply – If the host service cannot be reached.

Returns:

IPC::ResponseCANTransmitT returned by the host service.

Public Members

VisionClientRegistry<mechmind::MechMindClient, mechmind::MechMindConfig> mechmind_clients_#

Vendor Mech-Mind clients keyed by PyFM module/task id. Each module can hold its own connection to a different vision server. Cleanup is done by the vision SDK that uses the registry, through before_close().

VisionClientRegistry<photoneo::PhotoneoClient, photoneo::PhotoneoConfig> photoneo_clients_#

Vendor Photoneo clients keyed by PyFM module/task id.

VisionClientRegistry<pickit3d::PickitClient, pickit3d::PickitConfig> pickit_clients_#

Vendor Pickit clients keyed by PyFM module/task id.

Public Static Functions

static RBBaseSDK &instance()#

Returns a process-local singleton base SDK instance.

The instance is created on first use and lives until process exit. Use it when only the shared transport and helpers are needed and no domain SDK is involved.

Returns:

Reference to the singleton. Do not delete it.

static void shutdown_heartbeat()#

Stops the peer keepalive thread and joins it.

Sets heartbeat_stop_ and wakes heartbeat_loop’s wait immediately (a plain sleep_for used to block disconnect() for the whole interval, ttl/2 = 15s by default). Also called from a static exit guard in base.cpp: heartbeat_thread_ is a static std::thread, and a process that ends without disconnect() would otherwise destroy it while joinable and hit std::terminate (“libc++abi: terminating”). That is the common case when a subscribe handler lives in main, because its globals keeps the SDK object alive so close()/disconnect() never run. Not a nested struct on purpose: srcML (gen_rb_sdk_docstrings) drops the class’s later docstrings when RBBaseSDK declares a nested struct.

static int close_all_for_pid()#

Closes every live SDK instance in the current process.

Calls close() on every RBBaseSDK (including derived SDKs and sub-SDKs held as members of an aggregate SDK) that was constructed in this process and is not closed yet. The reference count therefore reaches zero and the shared zenoh session is closed. Use it at shutdown when relying on destructor or garbage-collection order is not acceptable. Errors from individual close() calls are logged and skipped.

In Python this also clears the per-process instance cache, so the next construction creates a fresh object.

Returns:

Number of instances that were closed. 0 when called from a forked child.

Protected Attributes

bool instance_closed_ = false#
std::string sender = ""#
std::optional<std::string> name#
std::unordered_set<std::string> zenoh_queryables#
std::unordered_set<std::string> zenoh_subscribes#
std::string SERVICE#
bool IS_DEV = false#

Protected Static Attributes

static int pid_#
static std::shared_ptr<rb_zenoh::ZenohClient> zenoh_client_#
static std::recursive_mutex lock_#
static std::mutex mutex_#
static std::optional<std::string> peer_id_#
static std::optional<std::string> peer_common_url_#
static std::optional<std::string> peer_token_#
static std::thread heartbeat_thread_#
static std::atomic<bool> heartbeat_stop_#

Private Functions

void _connect(const std::optional<std::vector<std::pair<std::string, std::string>>> &pairs = std::nullopt, const std::optional<std::string> &sender = std::nullopt, const int max_attempts = 8, const float initial_delay_s = 0.5, const float max_delay_s = 3.0)#
void _zenoh_unsubscribe_mine()#
void _zenoh_unqueryable_mine()#
std::shared_ptr<rb_zenoh::ZenohClient> _refresh_zenoh_client_for_pid(bool force = false)#
void _reconnect_shared_zenoh_for_remote_peer(int listen_port)#
bool _wait_for_zenoh_echo(const std::string &req_keyexpr, const std::string &res_keyexpr, std::optional<double> timeout, double probe_timeout, double interval)#

Private Static Functions

static void heartbeat_loop(std::string peer_id, int ttl, double interval_sec, nlohmann::json registration_payload, double retry_min_sec = kPeerRetryMinSec, double retry_max_sec = kPeerRetryMaxSec)#

Private Static Attributes

static constexpr double kPeerRetryMinSec = 2.0#
static constexpr double kPeerRetryMaxSec = 30.0#

common/value_validation.hpp#

namespace rb_glue#

Functions

template<typename T>
inline const T &require(const std::optional<T> &value, const std::string &field_name, const std::string &error_prefix)#
inline const std::string &require(const std::string &value, const std::string &field_name, const std::string &error_prefix)#
template<typename T>
inline const T &require(const std::unique_ptr<T> &value, const std::string &field_name, const std::string &error_prefix)#
template<typename T>
inline const std::vector<T> &require(const std::vector<T> &value, const std::string &field_name, const std::string &error_prefix)#
inline std::string resolve_option_of(const std::optional<std::string> &value, const std::string &error_prefix)#
inline std::string resolve_option_of(const std::string &value, const std::string &error_prefix)#
inline int timeout_ms_of(const std::optional<double> &value, double default_sec)#

flow_manager_args.hpp#

Typedefs

using FlowValuePtr = std::shared_ptr<FlowValue>#
using AlarmFn = std::function<void(const std::string&, const std::string&)>#
using ProgramLogFn = std::function<void(const std::string&, const std::string&, const std::string&)>#
using FlowVariableValue = std::variant<std::monostate, bool, int64_t, double, std::string, std::vector<int64_t>, std::vector<float>, std::vector<double>, std::vector<std::vector<double>>>#
using FlowVariables = std::unordered_map<std::string, FlowVariableValue>#
using FlowManagerArgsPtr = std::shared_ptr<FlowManagerArgs>#

Functions

inline void fm_done(const FlowManagerArgsPtr &flow_manager_args)#
inline void fm_pause_check_stop_done(const FlowManagerArgsPtr &flow_manager_args, const std::optional<std::string> &pause_option = std::nullopt, const std::function<void()> &while_paused = nullptr)#
inline bool fm_skip_when_not_ui(const FlowManagerArgsPtr &flow_manager_args, bool is_only_at_ui)#
inline std::string get_task_id(const FlowManagerArgsPtr &flow_manager_args)#
inline void resolve_interface_flow(const std::string &err_msg, const std::string &resolve_option, const FlowManagerArgsPtr &flow_manager_args, const AlarmFn &alarm_fn, const std::string &error_prefix)#
class FlowValue#

Public Functions

virtual ~FlowValue() = default#
class FlowManagerContext#

Public Functions

virtual ~FlowManagerContext() = default#
virtual void check_stop() = 0#
virtual void pause() = 0#
virtual void pause_all() = 0#
virtual void stop() = 0#
virtual void halt_sub_task() = 0#
virtual bool stop_requested() = 0#
inline void pause_and_check_stop()#
virtual bool is_ui_execution() = 0#
virtual std::string process_id() = 0#
virtual std::optional<std::string> state_get(std::string_view key) = 0#
virtual std::size_t state_seq_len(std::string_view key) = 0#
virtual void state_set(std::string_view key, std::string_view value) = 0#
virtual AlarmFn alarm_callback(std::string_view robot_model) = 0#
virtual void update_local_variables(const FlowVariables &variables) = 0#
virtual void update_local_variables_json(const nlohmann::json &variables) = 0#
virtual void merge_variable_meta_json(std::string_view name, const nlohmann::json &meta) = 0#
virtual void broadcast_variables_to_other_mains_json(const nlohmann::json &variables, const nlohmann::json &meta_by_name) = 0#
virtual std::optional<FlowVariableValue> get_local_variable(std::string_view name) = 0#
virtual std::optional<nlohmann::json> lookup_local_or_global_json(std::string_view key) = 0#
virtual std::optional<nlohmann::json> lookup_variable_json(std::string_view key) = 0#
virtual std::optional<std::vector<std::vector<double>>> get_waypoint_variable(std::string_view name) = 0#
virtual void emit_next(std::string_view step_id) = 0#
virtual void emit_done(std::string_view step_id) = 0#
virtual int get_folder_depth() = 0#
virtual void break_folder(int target_depth) = 0#
virtual bool eval_bool(const FlowValuePtr &expression) = 0#
virtual float eval_float(const FlowValuePtr &expression) = 0#
virtual void eval_action(const FlowValuePtr &expression) = 0#
virtual bool is_empty_string(const FlowValuePtr &expression) = 0#
inline virtual int add_stop_listener(std::function<void()> cb)#
inline virtual void remove_stop_listener(int token)#
class FlowManagerArgs#

Public Functions

virtual ~FlowManagerArgs() = default#
virtual FlowManagerContext &context() = 0#
virtual FlowValuePtr arg(std::string_view name) = 0#
virtual std::optional<std::string> string_arg(std::string_view name) = 0#
virtual std::optional<std::string> raw_data_field(std::string_view field_name) = 0#
virtual std::optional<std::string> raw_arg(std::string_view key) = 0#
virtual std::optional<nlohmann::json> raw_json_arg(std::string_view key) = 0#
virtual std::string current_step_id() = 0#
virtual bool is_main_task() = 0#
virtual void done() = 0#
virtual void run_advanced_script(std::string_view contents, const ProgramLogFn &rb_log) = 0#
class StopWake#

Public Functions

inline StopWake(FlowManagerContext &ctx, std::function<void()> wake)#
inline ~StopWake()#
StopWake(const StopWake&) = delete#
StopWake &operator=(const StopWake&) = delete#

Private Members

FlowManagerContext &ctx_#
int token_#
class PeriodicTicker#

Public Functions

inline PeriodicTicker(std::function<void()> fn, std::chrono::milliseconds period)#
inline ~PeriodicTicker()#
PeriodicTicker(const PeriodicTicker&) = delete#
PeriodicTicker &operator=(const PeriodicTicker&) = delete#

Private Members

std::mutex mu_#
std::condition_variable cv_#
bool stop_ = false#
std::thread thread_#

manipulate/manipulate_config.hpp#

class RBManipulateConfigSDK : public RBBaseSDK#

Public Functions

inline RBManipulateConfigSDK()#
IPC::Response_FunctionsT call_speedbar(const std::string &robot_model, const float alpha, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to set its speed bar multiplier (range: 0.0–1.0), which is displayed as a percentage (%) in the UI (e.g., 1.0 = 100%).

Parameters:
  • robot_model – Name of the robot model.

  • alpha – Speed bar value, 0.0-1.0. Multiplied against the robot’s final commanded speed: 0.0 means stop, 1.0 means the full intended speed.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the request result.

IPC::Response_CallConfigRobotArmT call_config_robotarm(const std::string &robot_model, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot’s full robot-arm configuration snapshot.

Returns the aggregate configuration written by this class’s various save_*/set_* arm-related calls: out/self collision settings, gravity compensation, direct-teach sensitivity, tool-flange special function/filter settings, joint kinematic limits, and deflection compensation mode.

Parameters:
  • robot_model – Name of the robot model.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_CallConfigRobotArmT containing the robot arm configuration snapshot.

IPC::Response_CallConfigControlBoxT call_config_controlbox(const std::string &robot_model, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot’s full control-box configuration snapshot.

Returns the aggregate configuration written by this class’s various save_*/set_* control-box-related calls: side/ext digital I/O special function and filter settings, the 8 area configs, and the 8 user frame configs.

Parameters:
  • robot_model – Name of the robot model.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_CallConfigControlBoxT containing the control box configuration snapshot.

IPC::Response_FunctionsT save_robot_code(const std::string &robot_model, const int32_t code, const int option, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to save its robot model/hardware code.

Warning

code identifies which hardware/kinematics parameter set the robot loads. It is written to persistent storage but does NOT take effect until the next reboot (the firmware source marks this “NO ADJUST” — no live re-apply happens). If code doesn’t match a known robot model, the parameter set loaded on next boot can be invalid, and the robot control program can fail to initialize / crash immediately on restart. Do not call this with a value that isn’t a known, correct model code for this physical robot.

Parameters:
  • robot_model – Name of the robot model.

  • code – Robot model/hardware code to save. Takes effect only after the robot control program is restarted.

  • option – Accepted but currently unused by the robot firmware.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the save request result.

IPC::Response_CallConfigToolListT call_config_toollist(const std::string &robot_model, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot’s saved tool list configuration.

Returns up to 8 tool slots (per save_tool_list_parameter), each with name, TCP offset, mass/center-of-mass, and bounding-box parameters.

Parameters:
  • robot_model – Name of the robot model.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails, no payload is returned, or the response’s return_value is nonzero.

Returns:

IPC::Response_CallConfigToolListT containing the tool list configuration.

IPC::Response_FunctionsT set_toollist_num(const std::string &robot_model, int target_tool_num, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to select the active tool from its saved tool list.

Parameters:
  • robot_model – Name of the robot model.

  • target_tool_num – Tool slot number to activate (see call_config_toollist / save_tool_list_parameter).

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the request result.

IPC::Response_FunctionsT save_tool_list_parameter(const std::string &robot_model, int tool_no, const std::string &tool_name, float tcp_x, float tcp_y, float tcp_z, float tcp_rx, float tcp_ry, float tcp_rz, float mass_m, float mass_x, float mass_y, float mass_z, int box_type, float box_para_0, float box_para_1, float box_para_2, float box_para_3, float box_para_4, float box_para_5, float box_para_6, float box_para_7, float box_para_8, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to save a tool’s parameters into its tool list.

Parameters:
  • robot_model – Name of the robot model.

  • tool_no – Tool slot number to save into, 0-7.

  • tool_name – Display name for the tool.

  • tcp_x – TCP offset from the flange along X, in mm.

  • tcp_y – TCP offset from the flange along Y, in mm.

  • tcp_z – TCP offset from the flange along Z, in mm.

  • tcp_rx – TCP orientation offset from the flange around X, in degrees.

  • tcp_ry – TCP orientation offset from the flange around Y, in degrees.

  • tcp_rz – TCP orientation offset from the flange around Z, in degrees.

  • mass_m – Tool mass.

  • mass_x – Tool center-of-mass offset from the flange along X.

  • mass_y – Tool center-of-mass offset from the flange along Y.

  • mass_z – Tool center-of-mass offset from the flange along Z.

  • box_type – Bounding-box shape used to interpret box_para_0 through box_para_8: 0 None, 1 Sphere, 2 Capsule, 3 Box.

  • box_para_0 – Bounding-box parameter 0, interpreted according to box_type.

  • box_para_1 – Bounding-box parameter 1, interpreted according to box_type.

  • box_para_2 – Bounding-box parameter 2, interpreted according to box_type.

  • box_para_3 – Bounding-box parameter 3, interpreted according to box_type.

  • box_para_4 – Bounding-box parameter 4, interpreted according to box_type.

  • box_para_5 – Bounding-box parameter 5, interpreted according to box_type.

  • box_para_6 – Bounding-box parameter 6, interpreted according to box_type.

  • box_para_7 – Bounding-box parameter 7, interpreted according to box_type.

  • box_para_8 – Bounding-box parameter 8, interpreted according to box_type.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the save request result.

IPC::Response_FunctionsT save_gripper_attachment(const std::string &robot_model, const int attach_option, const int pubdata_type_0, const int pubdata_type_1, const int pubdata_type_2, const int pubdata_type_3, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to save the gripper attachment settings.

Saves the default gripper attachment and the publish data types for the robot.

Parameters:
  • robot_model – Name of the robot model.

  • attach_option – Default gripper attachment.

    • -1: Not mounted

    • 0 or greater: Index in the gripper list of the Gripper function

  • pubdata_type_0 – Publish data type for slot 0.

  • pubdata_type_1 – Publish data type for slot 1.

  • pubdata_type_2 – Publish data type for slot 2.

  • pubdata_type_3 – Publish data type for slot 3. The pubdata_type_0 ~ pubdata_type_3 values are one of:

    • 0: Not assigned

    • 1: Position reference

    • 2: Position feedback

    • 3: Speed reference

    • 4: Speed feedback

    • 5: Force reference

    • 6: Force feedback

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the request fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the save request result.

IPC::Response_FunctionsT set_userframe_num(const std::string &robot_model, const int target_user_frame_num, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to select the active user frame.

Parameters:
  • robot_model – Name of the robot model.

  • target_user_frame_num – User frame slot number to activate, 0-7 (see save_user_frame_parameter).

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the request result.

IPC::Response_FunctionsT save_user_frame_parameter(const std::string &robot_model, int userf_no, const std::string &userf_name, float userf_x, float userf_y, float userf_z, float userf_rx, float userf_ry, float userf_rz, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to save a user frame’s parameters.

Parameters:
  • robot_model – Name of the robot model.

  • userf_no – User frame slot number to save into, 0-7.

  • userf_name – Display name for the user frame.

  • userf_x – User frame origin offset along X, in mm.

  • userf_y – User frame origin offset along Y, in mm.

  • userf_z – User frame origin offset along Z, in mm.

  • userf_rx – User frame orientation offset around X, in degrees.

  • userf_ry – User frame orientation offset around Y, in degrees.

  • userf_rz – User frame orientation offset around Z, in degrees.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the save request result.

IPC::Response_CallConfigGlobPinListT call_config_globpinlist(const std::string &robot_model, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot’s saved global pin list, including both pin joint (joint-space) and pin point (Cartesian-space) entries.

Returns each global pin’s name along with its joint-space (pin_j) and Cartesian-space (pin_l) target values (see save_globpin_parameter).

Parameters:
  • robot_model – Name of the robot model.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_CallConfigGlobPinListT containing the global pin list.

IPC::Response_FunctionsT save_globpin_parameter(const std::string &robot_model, int pin_num, const std::string &pin_name, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to capture its current pose into a named global pin slot.

Saves the robot’s current joint values and Cartesian pose (at the moment this is called) into the given pin slot under pin_name. call_move_home's home_type = 3 + pin_num moves the robot to this pin’s joint pose (Move-J) or Cartesian pose (Move-L).

Parameters:
  • robot_model – Name of the robot model.

  • pin_num – Global pin slot number, 0-15.

  • pin_name – Display name for the pin.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the save request result.

IPC::Response_CallConfigFlangeOptionT call_config_flangeoption(const std::string &robot_model, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot’s flange configuration options.

Returns the currently configured flange (end-effector mounting) option settings for the robot.

Parameters:
  • robot_model – Name of the robot model.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_CallConfigFlangeOptionT containing the flange option configuration.

IPC::Response_CallConfigNetworkT call_config_network(const std::string &robot_model, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot’s network configuration options.

Returns the currently configured network option settings for the robot.

Parameters:
  • robot_model – Name of the robot model.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_CallConfigNetworkT containing the flange option configuration.

IPC::Response_CallConfigGripperAttachT call_config_gripperattach(const std::string &robot_model, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot’s gripper attach configuration.

Returns the currently configured default gripper attachment and the publish data types for the robot.

Parameters:
  • robot_model – Name of the robot model.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_CallConfigGripperAttachT containing:

  • attach_option: Default gripper attachment. -1 means not mounted; 0 or greater is the index in the gripper list of the Gripper function.

  • pubdata_type_0 ~ pubdata_type_3: Publish data types (0: Not assigned, 1: Position reference, 2: Position feedback, 3: Speed reference, 4: Speed feedback, 5: Force reference, 6: Force feedback).

IPC::Response_FunctionsT set_userframe_6dof(const std::string &robot_model, int user_frame_num, int setting_option, int target_frame, float target_x, float target_y, float target_z, float target_rx, float target_ry, float target_rz, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to set a user frame directly via a 6-DOF pose.

Parameters:
  • robot_model – Name of the robot model.

  • user_frame_num – User frame slot number, 0-7.

  • setting_option – 0 restores the previously saved frame, 1 applies the given target temporarily, 2 applies and permanently saves the given target.

  • target_frame – Frame the given target is expressed in: 0 Global, 1 Local, 2 User.

  • target_x – Target position along X, in mm.

  • target_y – Target position along Y, in mm.

  • target_z – Target position along Z, in mm.

  • target_rx – Target orientation around X, in degrees.

  • target_ry – Target orientation around Y, in degrees.

  • target_rz – Target orientation around Z, in degrees.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the request result.

IPC::Response_FunctionsT set_userframe_tcp(const std::string &robot_model, const int user_frame_num, const int setting_option, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to set a user frame from the current TCP pose.

Parameters:
  • robot_model – Name of the robot model.

  • user_frame_num – User frame slot number, 0-7.

  • setting_option – 0 restores the previously saved frame, 1 applies the current TCP pose temporarily, 2 applies and permanently saves it.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the request result.

IPC::Response_FunctionsT set_userframe_3points(const std::string &robot_model, int user_frame_num, int setting_option, int order_option, float point_1_x, float point_1_y, float point_1_z, float point_2_x, float point_2_y, float point_2_z, float point_3_x, float point_3_y, float point_3_z, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to set a user frame from 3 taught points.

Parameters:
  • robot_model – Name of the robot model.

  • user_frame_num – User frame slot number, 0-7.

  • setting_option – 0 restores the previously saved frame, 1 applies the frame computed from the 3 points temporarily, 2 applies and permanently saves it.

  • order_option – How the 3 points define the frame’s axes: 0 Origin->X Axis->XY Plane, 1 Origin->Y Axis->YZ Plane, 2 Origin->Z Axis->ZX Plane.

  • point_1_x – First point’s X coordinate, in mm.

  • point_1_y – First point’s Y coordinate, in mm.

  • point_1_z – First point’s Z coordinate, in mm.

  • point_2_x – Second point’s X coordinate, in mm.

  • point_2_y – Second point’s Y coordinate, in mm.

  • point_2_z – Second point’s Z coordinate, in mm.

  • point_3_x – Third point’s X coordinate, in mm.

  • point_3_y – Third point’s Y coordinate, in mm.

  • point_3_z – Third point’s Z coordinate, in mm.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the request result.

IPC::Response_FunctionsT save_area_parameter(const std::string &robot_model, int area_no, const std::string &area_name, int area_type, float area_x, float area_y, float area_z, float area_rx, float area_ry, float area_rz, float area_para_0, float area_para_1, float area_para_2, int area_purpose, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to save a restricted area’s parameters.

Parameters:
  • robot_model – Name of the robot model.

  • area_no – Area slot number to save into, 0-7.

  • area_name – Display name for the area.

  • area_type – Area shape used to interpret area_para_0 through area_para_2 (same enum as save_tool_list_parameter's box_type): 0 None, 1 Sphere, 2 Capsule, 3 Box.

  • area_x – Area origin offset along X, in mm.

  • area_y – Area origin offset along Y, in mm.

  • area_z – Area origin offset along Z, in mm.

  • area_rx – Area orientation offset around X, in degrees.

  • area_ry – Area orientation offset around Y, in degrees.

  • area_rz – Area orientation offset around Z, in degrees.

  • area_para_0 – Area shape parameter 0, interpreted according to area_type.

  • area_para_1 – Area shape parameter 1, interpreted according to area_type.

  • area_para_2 – Area shape parameter 2, interpreted according to area_type.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

  • area_purpose – Purpose of the area:

    • 0: N/A

    • 1: Self collision detection

    • 2: PFL check area

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the save request result.

IPC::Response_FunctionsT save_gravity_parameter(const std::string &robot_model, const int mode, const float gx, const float gy, const float gz, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to save its gravity compensation parameters.

Effectively sets the robot’s installation/mounting angle, expressed as the direction of gravitational acceleration relative to the Global coordinate system.

Parameters:
  • robot_model – Name of the robot model.

  • mode – Gravity compensation mode: 0 Static, 1 Dynamic.

  • gx – Gravity direction vector X component (Global frame).

  • gy – Gravity direction vector Y component (Global frame).

  • gz – Gravity direction vector Z component (Global frame).

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the save request result.

IPC::Response_FunctionsT save_direct_teach_sensitivity(const std::string &robot_model, std::vector<float> sensitivity, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to save its direct-teach sensitivity.

Parameters:
  • robot_model – Name of the robot model.

  • sensitivity – Per-joint direct-teach sensitivity values (range: 0.0–2.0).

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the save request result.

IPC::Response_FunctionsT save_basic_joint_impedance(const std::string &robot_model, const int basic_impedance_mode, std::vector<float> basic_impedance_stiffness, std::vector<float> basic_impedance_torqelimit, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to save the basic joint impedance settings that are applied when the control box boots.

Parameters:
  • robot_model – Name of the robot model.

  • basic_impedance_mode – Boot-up joint impedance mode.

    • 0: Not use

    • 1: Activate after Real-Mode

  • basic_impedance_stiffness – Per-joint stiffness values (normalized range: 0.0–1.0; shown as 0–100% in the UI).

  • basic_impedance_torqelimit – Per-joint torque limit values (normalized range: 0.0–1.0; shown as 0–100% in the UI).

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the request fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the save request result.

IPC::Response_FunctionsT save_collision_parameter(const std::string &robot_model, const int onoff, const int react, const float threshold, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to save its out collision detection parameters.

Persist-and-apply counterpart to set_out_collision_para: writes to persistent storage and then applies it immediately, whereas set_out_collision_para only applies it for the current session (lost on restart). Same out_coll_onoff/out_coll_react/out_coll_limit fields reported by call_config_robotarm.

Parameters:
  • robot_model – Name of the robot model.

  • onoff – Enables/disables collision detection: 0 Off, 1 On.

  • react – Reaction behavior when a collision is detected: 0 Pause Movement, 1 Evasion Stop.

  • threshold – Collision detection sensitivity threshold (clamped to 0–1 by the robot); lower values trigger a stop at weaker impacts.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the save request result.

IPC::Response_FunctionsT save_selfcoll_parameter(const std::string &robot_model, const int mode, const float dist_internal, const float dist_external, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to save its self-collision detection parameters.

Persist-and-apply counterpart to set_self_collision_para: writes to persistent storage and then applies it immediately, whereas set_self_collision_para only applies it for the current session (lost on restart). Same self_coll_mode/self_coll_distance_inter/self_coll_distance_exter fields reported by call_config_robotarm.

Parameters:
  • robot_model – Name of the robot model.

  • mode – Self-collision detection mode: 0 stop just before self-collision, 1 control speed during self-collision.

  • dist_internal – Internal self-collision distance (mm) threshold, floored at 0 by the robot.

  • dist_external – External self-collision distance (mm) threshold, floored at 0 by the robot.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the save request result.

IPC::Response_FunctionsT save_joint_kinematic_limit(const std::string &robot_model, std::vector<float> position_low, std::vector<float> position_up, std::vector<float> speed_limit, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to save its per-joint kinematic limits.

Parameters:
  • robot_model – Name of the robot model.

  • position_low – Per-joint lower position limit, in degrees.

  • position_up – Per-joint upper position limit, in degrees.

  • speed_limit – Per-joint speed limit, in degrees/s.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the save request result.

IPC::Response_FunctionsT save_deflection_compensation(const std::string &robot_model, int mode, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to save its deflection compensation mode.

Parameters:
  • robot_model – Name of the robot model.

  • mode – Compensation mode: 0 Off, 1 Adjust Deflection.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the save request result.

IPC::Response_FunctionsT set_out_collision_para(const std::string &robot_model, int onoff, int react_mode, float threshold, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to set its out collision detection parameters.

Applies immediately for the current session only — not written to persistent storage, unlike save_collision_parameter (same fields), which also persists.

Parameters:
  • robot_model – Name of the robot model.

  • onoff – Enables/disables collision detection: 0 Off, 1 On.

  • react_mode – Reaction behavior when a collision is detected: 0 Pause Movement, 1 Evasion Stop.

  • threshold – Collision detection sensitivity threshold (clamped to 0–1 by the robot); lower values trigger a stop at weaker impacts.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the request result.

IPC::Response_FunctionsT set_self_collision_para(const std::string &robot_model, int mode, float dist_int, float dist_ext, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to set its self-collision detection parameters.

Applies immediately for the current session only — not written to persistent storage, unlike save_selfcoll_parameter (same fields), which also persists.

Parameters:
  • robot_model – Name of the robot model.

  • mode – Self-collision detection mode: 0 stop just before self-collision, 1 control speed during self-collision.

  • dist_int – Internal self-collision distance (mm) threshold.

  • dist_ext – External self-collision distance (mm) threshold.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the request result.

IPC::Response_FunctionsT set_master_mode(const std::string &robot_model, int mode, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to set its master (teleoperation) mode.

Parameters:
  • robot_model – Name of the robot model.

  • mode – 0 Off, 1 Reflected Joint Angle, 2 Synchronized Cartesian.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the request result.

IPC::Response_FunctionsT set_fixed_speed(const std::string &robot_model, int target_move, int vel_option, float vel_parameter, int acc_option, float acc_parameter, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to set a fixed speed/acceleration override for a move type.

Parameters:
  • robot_model – Name of the robot model.

  • target_move – Move type this override applies to: 0 J-Types, 1 L-Types (Position), 2 L-Types (Orientation).

  • vel_option – Velocity override mode: 0 Off, 1 Fixed mode (%), 2 Fixed mode (physical units).

  • vel_parameter – Velocity value, interpreted according to vel_option.

  • acc_option – Acceleration override mode: 0 Off, 1 Fixed mode (%), 2 Fixed mode (physical units).

  • acc_parameter – Acceleration value, interpreted according to acc_option.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the request result.

IPC::Response_FunctionsT set_shift(const std::string &robot_model, int shift_no, int shift_mode, IPC::MoveInput_TargetT target, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to set a target shift.

Parameters:
  • robot_model – Name of the robot model.

  • shift_no – Target shift slot number.

  • shift_mode – Shift mode: 0 Off, 1 Adjust L-Move, 2 Adjust L,J-Move, 3 Adjust J-Move.

  • target – Shift target position and frame information. tar_frame is -1 Joint, 0 Global, 1 Tool, 2 User, or 3 Target frame; tar_unit is 0 mm/deg, 1 m/rad, or 2 inch/deg.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the request result.

IPC::Response_FunctionsT set_timeconstraint(const std::string &robot_model, int option, float time_sec, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to set a move time constraint.

Parameters:
  • robot_model – Name of the robot model.

  • option – 0 Off, 1 Unit Move Time-Constraint, 2 Multi Move Time-Constraint.

  • time_sec – Target time, in seconds.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the request result.

IPC::Response_FunctionsT set_ascii_functioncall(const std::string &robot_model, int option, const std::string &message, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to run/queue an ASCII function call command.

Parameters:
  • robot_model – Name of the robot model.

  • option – 0 Direct Execution, 1 Queue Message.

  • message – ASCII command message.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the request result.

IPC::Response_FunctionsT set_joint_impedance(const std::string &robot_model, int onoff, std::vector<float> stiffness, std::vector<float> torquelimit, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to set per-joint impedance control parameters.

Parameters:
  • robot_model – Name of the robot model.

  • onoff – 0 Off, 1 On Joint Impedance.

  • stiffness – Per-joint stiffness, each value 0-1.

  • torquelimit – Per-joint torque limit, each value 0-1.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the request result.

IPC::Response_FunctionsT set_freedrive(const std::string &robot_model, int onoff, int extra_force_frame, float extra_force_fx, float extra_force_fy, float extra_force_fz, float sensitivity, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to enable/configure free-drive (hand guiding) mode.

Parameters:
  • robot_model – Name of the robot model.

  • onoff – 0 Off, 1 On Free Drive, 2 On When Button Clicked.

  • extra_force_frame – Frame the additional force is expressed in: 0 Global Frame, 1 Local TCP Frame, 2 User Frame.

  • extra_force_fx – Additional force along X, in Nm.

  • extra_force_fy – Additional force along Y, in Nm.

  • extra_force_fz – Additional force along Z, in Nm.

  • sensitivity – Operation sensitivity, 0-1.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the request result.

IPC::Response_FunctionsT set_shift_landmark(const std::string &robot_model, int shift_mode, float tolerance, IPC::MoveInput_TargetT reference_point_1, IPC::MoveInput_TargetT reference_point_2, IPC::MoveInput_TargetT reference_point_3, IPC::MoveInput_TargetT present_point_1, IPC::MoveInput_TargetT present_point_2, IPC::MoveInput_TargetT present_point_3, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to compute and set a target shift from landmark points.

Computes the shift between a reference set of 3 points and the corresponding present set of 3 points (e.g. touched up after a workpiece moved), then applies it as a target shift. For every reference/present point, tar_frame is -1 Joint, 0 Global, 1 Tool, 2 User, or 3 Target frame; tar_unit is 0 mm/deg, 1 m/rad, or 2 inch/deg.

Parameters:
  • robot_model – Name of the robot model.

  • shift_mode – Shift mode: 0 Off, 1 Adjust L-Move, 2 Adjust L,J-Move, 3 Adjust J-Move.

  • tolerance – Match tolerance between the reference and present point sets.

  • reference_point_1 – First reference-set point.

  • reference_point_2 – Second reference-set point.

  • reference_point_3 – Third reference-set point.

  • present_point_1 – First present-set point, corresponding to reference_point_1.

  • present_point_2 – Second present-set point, corresponding to reference_point_2.

  • present_point_3 – Third present-set point, corresponding to reference_point_3.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the request result.

IPC::Response_FunctionsT set_program_flow_manage(const std::string &robot_model, int target, int option, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to control program flow (stop/pause/resume/reset collision).

Parameters:
  • robot_model – Name of the robot model.

  • target – 0 All Robot Components, 1 This Component.

  • option – 0 Stop, 1 Pause, 2 Resume, 3 Reset Collision.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the request result.

IPC::Response_FunctionsT set_din_function_mask(const std::string &robot_model, int device, int port_num, int option, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to enable/disable a digital input port’s special function.

Parameters:
  • robot_model – Name of the robot model.

  • device – 0 Control Box I/O, 1 Extension I/O, 2 ToolFlange I/O.

  • port_num – Digital input port number, 0-15.

  • option – 0 Disable-Mask Off, 1 Disable-Mask On.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the request result.

IPC::Response_FunctionsT set_dout_function_mask(const std::string &robot_model, int device, int port_num, int option, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to enable/disable a digital output port’s special function.

Parameters:
  • robot_model – Name of the robot model.

  • device – 0 Control Box I/O, 1 Extension I/O, 2 ToolFlange I/O.

  • port_num – Digital output port number, 0-15.

  • option – 0 Disable-Mask Off, 1 Disable-Mask On.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the request result.

IPC::Response_FunctionsT set_jacob_speed_mode(const std::string &robot_model, int mode, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to enable/disable Jacobian-based speed control.

Parameters:
  • robot_model – Name of the robot model.

  • mode – 0 Active (default), 1 De-active.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the request result.

IPC::Response_FunctionsT set_self_vibration_mode(const std::string &robot_model, int mode, float time, float frequency, std::vector<float> magnitudes, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to enable/configure self-vibration.

Parameters:
  • robot_model – Name of the robot model.

  • mode – 0 Off, 1 On.

  • time – Vibration duration, in seconds.

  • frequency – Vibration frequency, in Hz.

  • magnitudes – Per-joint vibration magnitude, each value 0-1.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the request result.

IPC::Response_FunctionsT call_vibration_motion_on(const std::string &robot_model, int frame, float x_mag, float y_mag, float z_mag, float x_freq, float y_freq, float z_freq, float x_phase, float y_phase, float z_phase, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to start motion-based vibration.

Parameters:
  • robot_model – Name of the robot model.

  • frame – Frame the vibration is expressed in: 0 Global, 1 Local, 2 User, 3 Target, 4 Active Local.

  • x_mag – Vibration magnitude along X, in mm.

  • y_mag – Vibration magnitude along Y, in mm.

  • z_mag – Vibration magnitude along Z, in mm.

  • x_freq – Vibration frequency along X, in Hz.

  • y_freq – Vibration frequency along Y, in Hz.

  • z_freq – Vibration frequency along Z, in Hz.

  • x_phase – Vibration phase along X, in degrees.

  • y_phase – Vibration phase along Y, in degrees.

  • z_phase – Vibration phase along Z, in degrees.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the request result.

IPC::Response_FunctionsT call_vibration_motion_off(const std::string &robot_model, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to stop motion-based vibration.

Parameters:
  • robot_model – Name of the robot model.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the request result.

IPC::Response_FunctionsT set_external_axis_sync(const std::string &robot_model, int mode, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to enable/disable external axis synchronization.

Parameters:
  • robot_model – Name of the robot model.

  • mode – 0 Sync Off, 1 Sync On.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the request result.

IPC::Response_FunctionsT set_tcp_speed_bound(const std::string &robot_model, int mode, float speed_parameter, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to set a TCP speed bound.

Parameters:
  • robot_model – Name of the robot model.

  • mode – 0 Bound Off (system default), 1 Bound On.

  • speed_parameter – TCP speed limit, in mm/s.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the request result.

IPC::Response_FunctionsT set_move_break(const std::string &robot_model, int mode, float stopping_time, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to set move break/block behavior.

Parameters:
  • robot_model – Name of the robot model.

  • mode – 0 Off (release), 1 Continuous Block, 2 Break Once.

  • stopping_time – Stopping time, in seconds.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the request result.

IPC::Response_FunctionsT set_joint_reference_filter(const std::string &robot_model, int mode, float filter_percent, FlowManagerArgsPtr flow_manager_args = nullptr)#

Sets the joint reference filter mode and filter strength.

Configures the low-pass filter applied to joint reference (command) values, used to smooth joint motion commands before they are sent to the drives.

Parameters:
  • robot_model – Name of the robot model.

  • mode – Filter mode. 0: Off (System default), 1: On.

  • filter_percent – Filter strength as a percentage (0.0 ~ 1.0). Only effective when mode is 1.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the result of the request.

IPC::Response_FunctionsT set_self_collision_blind(const std::string &robot_model, float time, FlowManagerArgsPtr flow_manager_args = nullptr)#

Sets the self-collision detection blind time.

Configures the duration for which self-collision detection is temporarily disabled (blinded), used to suppress false-positive self-collision triggers during specific motions.

Parameters:
  • robot_model – Name of the robot model.

  • time – Self-collision detection blind time, in seconds.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the result of the request.

IPC::Response_FunctionsT set_realtime_index(const std::string &robot_model, int target_index, FlowManagerArgsPtr flow_manager_args = nullptr)#

Sets the realtime index of the robot.

Sends a request to change the realtime index of the specified robot model to target_index.

Parameters:
  • robot_model – Name of the robot model.

  • target_index – Realtime index value to apply.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the result of the request.

void pub_realtime_index(const std::string &robot_model, int target_index, FlowManagerArgsPtr flow_manager_args = nullptr)#

Publishes the realtime index of the robot.

Publishes a message to change the realtime index of the specified robot model to target_index. Unlike set_realtime_index(), this uses the publish/subscribe channel and does not wait for a response from the receiver.

Parameters:
  • robot_model – Name of the robot model.

  • target_index – Realtime index value to apply.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the message has been published.

Throws:

std::runtime_error – If the message cannot be published.

Returns:

IPC::Response_FunctionsT containing the result of the publish request.

IPC::Response_FunctionsT set_wrist_singularity_mode(const std::string &robot_model, int target_mode, FlowManagerArgsPtr flow_manager_args = nullptr)#

Sets the wrist singularity avoidance mode.

Configures how the robot handles wrist singularities during motion.

Parameters:
  • robot_model – Name of the robot model.

  • target_mode – Wrist singularity mode. 0: Default (System default), 1: Avoid Singularity.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the result of the request.

IPC::Response_FunctionsT set_oprange_check(const std::string &robot_model, int mode, int option, FlowManagerArgsPtr flow_manager_args = nullptr)#

Starts or finishes the operation range check.

Configures the operation range check state of the robot.

Parameters:
  • robot_model – Name of the robot model.

  • mode – Check mode. 0: Finish Check, 1: Start Check.

  • option – Data option. 0: Reference.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the result of the request.

IPC::Response_FunctionsT set_remote_tcp(const std::string &robot_model, int mode, std::vector<float> ref_setting, std::vector<float> ref_runtime, FlowManagerArgsPtr flow_manager_args = nullptr)#

Sets the remote TCP mode.

Configures the remote TCP (a TCP fixed in the robot’s external workspace rather than on the tool flange), so that motions are performed relative to that external point.

Parameters:
  • robot_model – Name of the robot model.

  • mode – Remote TCP mode. 0: Disable, 1: Enable.

  • ref_setting – Reference pose used to configure the remote TCP (e.g. [x, y, z, rx, ry, rz, aa]).

  • ref_runtime – Reference pose applied at runtime while the remote TCP mode is active (e.g. [x, y, z, rx, ry, rz, aa]).

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the result of the request.

IPC::Response_FunctionsT pop_gravity_vector(const std::string &robot_model, int gravity_option, FlowManagerArgsPtr flow_manager_args = nullptr)#

Retrieves the gravity vector of the robot.

Pops the gravity vector of the robot, either as measured or as currently configured, depending on the given option.

Parameters:
  • robot_model – Name of the robot model.

  • gravity_option – Gravity vector source. 0: Measured, 1: Configured (set value).

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the requested gravity vector.

IPC::Response_FunctionsT call_datalog_start(const std::string &robot_model, std::vector<std::string> names, FlowManagerArgsPtr flow_manager_args = nullptr)#

Starts data logging for the robot.

Begins recording the specified data items of the robot. Logging continues until the corresponding stop function is called.

Parameters:
  • robot_model – Name of the robot model.

  • names – List of data item (variable) names to be logged.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the data logging fails to start or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the result of the data logging start request.

IPC::Response_FunctionsT call_datalog_done(const std::string &robot_model, FlowManagerArgsPtr flow_manager_args = nullptr)#

Stops data logging for the robot.

Ends the data logging session previously started by call_datalog_start() and finalizes the recorded data.

Parameters:
  • robot_model – Name of the robot model.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the data logging fails to stop or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the result of the data logging stop request.

IPC::Response_FunctionsT save_coredata_pub_frequency(const std::string &robot_model, int freq_option, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to save its core data publication frequency.

Sets how often the robot publishes its periodic core-data stream. The frequency is chosen by index rather than as a raw Hz value.

Parameters:
  • robot_model – Name of the robot model.

  • freq_option – Publication frequency option.

    • 0: System default

    • 1: 1 Hz

    • 2: 5 Hz

    • 3: 10 Hz

    • 4: 20 Hz

    • 5: 50 Hz

    • 6: 100 Hz

    • 7: 200 Hz

    • 8: 250 Hz

    • 9: 500 Hz

    • 10: Fastest

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the request result.

IPC::Response_FunctionsT save_led_color_option(const std::string &robot_model, int rule, int color, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to save the LED color option for a given state.

Assigns an LED color (or blinking pattern) to the selected robot state rule. Both the rule and the color are chosen by index.

Parameters:
  • robot_model – Name of the robot model.

  • rule – Robot state to which the LED color applies.

    • 0: DC Engaged

    • 1: Servo Running

    • 2: Idle

    • 3: Moving

    • 4: Direct Teaching

    • 5: Collision

    • 6: Interlock

    • 7: N/A

  • color – LED color option.

    • 0: Off

    • 1: Red

    • 2: Green

    • 3: Blue

    • 4: Yellow

    • 5: Purple

    • 6: Cyan

    • 7: White

    • 8: Red - Blinking

    • 9: Green - Blinking

    • 10: Blue - Blinking

    • 11: Yellow - Blinking

    • 12: Purple - Blinking

    • 13: Cyan - Blinking

    • 14: White - Blinking

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the request result.

Public Static Functions

static inline std::string type_name()#

manipulate/manipulate_flange.hpp#

class RBManipulateFlangeSDK : public RBBaseSDK#

Public Functions

inline RBManipulateFlangeSDK()#
IPC::Response_FunctionsT save_flange_bootup_mount_tool(const std::string &robot_model, const int tool_num, FlowManagerArgsPtr flow_manager_args = nullptr)#

Saves the tool number to be automatically mounted on the flange at boot-up.

Configures which tool (from the saved tool list) is automatically mounted on the flange when the controller boots up.

Parameters:
  • robot_model – Name of the robot model.

  • tool_num – Tool number to mount at boot-up (0~7).

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the result of the request.

IPC::Response_FunctionsT save_flange_bootup_dc_voltage(const std::string &robot_model, const int voltage_value, FlowManagerArgsPtr flow_manager_args = nullptr)#

Saves the tool flange’s boot-up DC power output voltage.

Configures the DC voltage supplied through the tool flange when the controller boots up.

Parameters:
  • robot_model – Name of the robot model.

  • voltage_value – Boot-up DC voltage setting (0: 0V, 1: 12V, 2: 24V).

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the result of the request.

IPC::Response_FunctionsT save_flange_dt_button_role(const std::string &robot_model, const int working_mode, FlowManagerArgsPtr flow_manager_args = nullptr)#

Saves the role/usage setting of the tool flange’s direct teaching button.

Configures whether the direct teaching button mounted on the tool flange is enabled for use.

Parameters:
  • robot_model – Name of the robot model.

  • working_mode – Usage setting (0: Use, 1: Not use).

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the result of the request.

IPC::Response_FunctionsT save_flange_vibration_sensor(const std::string &robot_model, const int working_mode, FlowManagerArgsPtr flow_manager_args = nullptr)#

Saves the usage setting of the tool flange’s vibration sensor.

Configures whether the vibration sensor mounted on the tool flange is enabled for use.

Parameters:
  • robot_model – Name of the robot model.

  • working_mode – Usage setting (0: Use, 1: Not use).

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the result of the request.

Public Static Functions

static inline std::string type_name()#

manipulate/manipulate_get_data.hpp#

Typedefs

using Response_get_core_data_variant = std::optional<std::variant<float, std::vector<float>, std::string>>#
using Func_value_variant = std::variant<float, std::string, std::vector<float>, std::vector<std::string>>#
using Func_call = std::tuple<std::string, std::vector<Func_value_variant>, std::map<std::string, Func_value_variant>>#
using Func_call_result = std::pair<std::string, std::optional<Func_value_variant>>#
class RBManipulateGetDataSDK : public RBBaseSDK#

Public Functions

inline RBManipulateGetDataSDK()#
IPC::Response_Get_Relative_ValueT get_relative_value(const std::string &robot_model, const IPC::MoveInput_TargetT &relative_value, const IPC::MoveInput_TargetT &reference_value, int move_type, FlowManagerArgsPtr flow_manager_args = nullptr)#

Computes the coordinate a relative move would resolve to.

Given reference_value as the starting point, computes the absolute target that moving by relative_value from it resolves to. Used internally by the move-family functions’ relative-move calculation (e.g. call_move_j / call_move_l).

relative_value and reference_value do not need the same tar_frame: if one is Joint Space (tar_frame -1) and the other isn’t, the robot converts one to match the other (forward/inverse kinematics) before combining them, then converts the combined result again if needed to match move_type. This conversion can itself fail (e.g. an unreachable target), which surfaces as a nonzero calculated_result.

Note

This function does not throw on calculation failure — calculated_result nonzero must be checked by the caller (as the move-family functions do).

Parameters:
  • robot_model – Name of the robot model.

  • relative_value – Relative offset target and frame information. tar_values must have exactly 7 elements — this SDK passes it through unmodified, so callers must pad to 7 themselves (e.g. with 0 for a 6-axis model’s unused ArmAngle slot). tar_frame is -1 Joint, 0 Global, 1 Tool, 2 User, or 3 Target frame; tar_unit is 0 mm/deg, 1 m/rad, or 2 inch/deg.

  • reference_value – Reference target and frame information. tar_values must resolve to exactly 7 elements after this SDK truncates it to at most 7 — supplying fewer than 7 will not be padded and will fail the same way as an oversized/undersized relative_value. tar_frame is -1 Joint, 0 Global, 1 Tool, 2 User, or 3 Target frame; tar_unit is 0 mm/deg, 1 m/rad, or 2 inch/deg.

  • move_type – Move type the result is computed for: 0 Move J (joint-space), 1 Move L (Cartesian-space), 2 Move JB, 3 Move LB, 4 Move PB, 5 Move XB.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query itself fails (e.g. no reply).

Returns:

IPC::Response_Get_Relative_ValueT with calculated_result (0 on success) and calculated_value (the computed absolute target). If either tar_values doesn’t resolve to exactly 7 elements, the robot rejects the request before any calculation runs: calculated_result is nonzero and calculated_value is left unset.

Response_get_core_data_variant get_variable(const std::string &robot_model, const std::string &name)#

Looks up a named runtime variable/system value on the robot.

Parameters:
  • robot_model – Name of the robot model.

  • name – Variable name to query.

Throws:

std::runtime_error – If the query itself fails (e.g. no reply).

Returns:

The variable’s value as a float, a list of floats, or a string, depending on its reported type; std::nullopt if the response is invalid or the response’s type doesn’t match any of those. This matches the Python original.

std::map<std::string, Response_get_core_data_variant> get_variables(const std::string &robot_model, const std::vector<std::string> &names)#

Reads several core variables in a single query.

Same as calling get_variable once per name, but sends one get_core_data_multi query instead of one query per name, so the values also come from the same moment in time.

Parameters:
  • robot_model – Name of the robot model.

  • names – Variable names to read.

Throws:

std::runtime_error – If the query itself fails. A robot whose core does not serve get_core_data_multi answers nothing, which surfaces as rb_zenoh::ZenohNoReply; fall back to get_variable per name in that case.

Returns:

A map from variable name to its value (a float, a list of floats, or a string, depending on its reported type). A name the robot reports as invalid maps to std::nullopt, and a name missing from the response is absent from the map.

std::optional<Func_value_variant> call_function(const std::string &robot_model, const std::string &func, const std::vector<Func_value_variant> &args = {}, const std::map<std::string, Func_value_variant> &kwargs = {})#

Calls a core-side function by name (PyFM RB.func(...)).

Sends one Func_Call in a get_core_function query. Positional args and keyword kwargs are encoded as Func_Arg entries (a keyword argument carries its name in arg_name).

Parameters:
  • robot_model – Name of the robot model.

  • func – Core function name, e.g. "sum".

  • args – Positional arguments: each a float, a string, a list of floats, or a list of strings.

  • kwargs – Keyword arguments with the same value types.

Throws:

std::runtime_error – If the core reports a nonzero execution_result. The message is the core’s execution_error_msg when it gives one, otherwise the function name and the result code (-1 unknown function, -2 argument count/type mismatch, -3 exception inside the function). Also thrown when the query itself fails (e.g. no reply) or the reply carries no Func_Return.

Returns:

The function’s return value (a float, a string, a list of floats, or a list of strings), or std::nullopt when the core returns no value.

std::vector<Func_call_result> call_functions(const std::string &robot_model, const std::vector<Func_call> &calls, FlowManagerArgsPtr flow_manager_args = nullptr)#

Calls several core-side functions in one get_core_function query.

Each entry of calls becomes one Func_Call item; the core runs them independently and in order. Unlike call_function this never throws for a core-reported failure: the failure is returned per item so the caller can raise it at the point where that value is used (PyFM batches every RB.func(...) of one expression this way).

Parameters:
  • robot_model – Name of the robot model.

  • calls – (func, args, kwargs) per call, same value types as call_function.

  • flow_manager_args – Optional PyFM step context; done() is called once the reply has been received. If its args carry a “variable_name” (read raw, not substituted), the result is first stored under that name in the PyFM local variables: the value itself for a single call, a list of values for several calls (None for a call that returned no value). In that case a failed item throws its error instead of being stored.

Throws:

std::runtime_error – If the query itself fails (e.g. no reply), or if an item failed while storing into “variable_name”.

Returns:

One (error, value) per call, in call order. error is empty on success, otherwise the message call_function would have thrown (the core’s execution_error_msg, or the function name with the result code), and value is the return value or std::nullopt.

IPC::Response_Get_Absolute_ValueT get_absolute_value(const std::string &robot_model, const IPC::MoveInput_TargetT &reference_value, int move_type, FlowManagerArgsPtr flow_manager_args = nullptr)#

Computes the absolute coordinate a reference target resolves to.

Used internally for absolute (non-relative) target resolution, e.g. by set_pin_point_or_joint when no reference_target offset is given. reference_value's tar_frame does not need to match move_type: the robot always converts it (forward/inverse kinematics as needed) to the frame matching move_type. This conversion can itself fail (e.g. an unreachable target), which surfaces as a nonzero calculated_result.

Note

This function does not throw on calculation failure — calculated_result nonzero must be checked by the caller.

Parameters:
  • robot_model – Name of the robot model.

  • reference_value – Reference target and frame information. tar_values must resolve to exactly 7 elements — this SDK truncates it to at most 7, so supplying fewer than 7 will not be padded and the request will be rejected. tar_frame is -1 Joint, 0 Global, 1 Tool, 2 User, or 3 Target frame; tar_unit is 0 mm/deg, 1 m/rad, or 2 inch/deg.

  • move_type – Move type the result is computed for: 0 Move J / pin joint (joint-space), 1 Move L / pin point (Cartesian-space), 2 Move JB, 3 Move LB, 4 Move PB, 5 Move XB.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query itself fails (e.g. no reply).

Returns:

IPC::Response_Get_Absolute_ValueT with calculated_result (0 on success) and calculated_value (the computed absolute target). If tar_values doesn’t resolve to exactly 7 elements, the robot rejects the request before any calculation runs: calculated_result is nonzero and calculated_value is left unset.

Public Static Functions

static inline std::string type_name()#

manipulate/manipulate_io.hpp#

class RBManipulateIOSDK : public RBBaseSDK#

Public Functions

inline RBManipulateIOSDK()#
template<typename Req>
IPC::Response_FunctionsT call_multiple_common(std::function<IPC::Response_FunctionsT(const std::string&, const Req&, FlowManagerArgsPtr)> single_call_fn, const std::string &robot_model, const std::vector<Req> &request_list, FlowManagerArgsPtr flow_manager_args = nullptr, std::string error_title = "Multiple IO")#

Shared helper that applies a single-call IO function to a list of requests in order.

Calls single_call_fn once per entry in request_list, in order, passing flow_manager_args through to every one of those individual calls as-is — so each call’s own completion reporting (e.g. flow_manager_args.done()) fires on every iteration, not just once. After the loop, this itself also reports completion to flow_manager_args once more. Fails fast: if any call returns no result or a nonzero return_value, this throws immediately and does not process the remaining entries.

Note

Body lives in manipulate_io.cpp, explicitly instantiated there for every Req actually used by this class’s call_multiple_* methods (all calls are internal to this .cpp — Req is a closed set, so explicit instantiation is safe here unlike base.hpp’s public FBSType templates, which external plugin code instantiates with arbitrary types and therefore cannot be moved out of the header). single_call_fn used to be a deduced Func&& template parameter, but every call site passes a distinct anonymous lambda type, so there was no fixed set of Func types to instantiate — it is type-erased to std::function here instead (one small heap allocation per call, negligible next to the zenoh round trip each single_call_fn performs).

Parameters:
  • single_call_fn – Callable taking (robot_model, one request from request_list, flow_manager_args) and returning IPC::Response_FunctionsT — typically one of this class’s own single-item call_*/save_* methods.

  • robot_model – Name of the robot model.

  • request_list – Requests to apply in order.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once every request has succeeded.

  • error_title – Label used to prefix the exception message if any call in the list fails.

Throws:

std::runtime_error – If any call in request_list fails or returns a nonzero return_value.

Returns:

IPC::Response_FunctionsT with return_value 0 if request_list was empty, otherwise the last successful call’s result.

IPC::Response_FunctionsT call_side_dout(const std::string &robot_model, int port_num, int desired_out, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to set a side board digital output.

Parameters:
  • robot_model – Name of the robot model.

  • port_num – Side board digital output port number (0-15). A negative value applies desired_out to every side board digital output port.

  • desired_out – Desired output value. A negative value is a no-op (the robot returns success without changing any output).

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails, no payload is returned, or the response’s return_value is nonzero.

Returns:

IPC::Response_FunctionsT containing the request result.

IPC::Response_FunctionsT call_side_dout_toggle(const std::string &robot_model, int port_num, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to toggle a side board digital output.

Parameters:
  • robot_model – Name of the robot model.

  • port_num – Side board digital output port number (0-15). A negative value toggles every side board digital output port.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails, no payload is returned, or the response’s return_value is nonzero.

Returns:

IPC::Response_FunctionsT containing the request result.

IPC::Response_FunctionsT call_side_dout_bitcombination(const std::string &robot_model, int port_start, int port_end, int desired_value, int direction_option, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to set a range of side board digital outputs at once.

Ports that have a special function assigned (see save_side_dout_function) are rejected — this call only works on plain digital output ports.

Parameters:
  • robot_model – Name of the robot model.

  • port_start – First port number in the range (inclusive).

  • port_end – Last port number in the range (inclusive), must be >= port_start.

  • desired_value – Bit pattern of output values to apply across the port range. Let N = port_end - port_start + 1 (number of ports in the range); valid range is 0 to (2^N - 1), one bit per port.

  • direction_option – Direction to map bits to ports: 0 applies bit 0 to port_start (normal), 1 applies bit 0 to port_end (inverse).

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails, no payload is returned, or the response’s return_value is nonzero.

Returns:

IPC::Response_FunctionsT containing the request result.

IPC::Response_FunctionsT call_side_dout_pulse(const std::string &robot_model, int port_num, int block_mode, int direction, float time_1, float time_2, float time_3, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to pulse a side board digital output on a timing schedule.

Ports that have a special function assigned (see save_side_dout_function) are rejected — this call only works on plain digital output ports.

Note

The query timeout may increase based on the sum of the requested pulse times (time_1, time_2, and time_3).

Parameters:
  • robot_model – Name of the robot model.

  • port_num – Side board digital output port number (0-15).

  • block_mode – 0 blocks until the pulse sequence finishes (up to a 10-second internal wait) before returning; 1 returns immediately without waiting. Any value other than 1 is treated as 0.

  • direction – Pulse waveform pattern across the 3 time segments: 0 for off/on/off, 1 for on/off/on. Any value other than 1 is treated as 0.

  • time_1 – First timing parameter, in seconds (valid range 0-3).

  • time_2 – Second timing parameter, in seconds (valid range 0-3).

  • time_3 – Third timing parameter, in seconds (valid range 0-3). Values below 0.003 are silently raised to 0.003 by the robot (unlike time_1 / time_2, which are used as given).

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails, no payload is returned, or the response’s return_value is nonzero.

Returns:

IPC::Response_FunctionsT containing the request result.

IPC::Response_FunctionsT call_multiple_side_dout(const std::string &robot_model, std::vector<IPC::Request_SideDout_GeneralT> side_dout_args, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to set multiple side board digital outputs in order.

Applies call_side_dout once per entry in side_dout_args, in order; see call_multiple_common for the fail-fast/completion semantics.

Parameters:
  • robot_model – Name of the robot model.

  • side_dout_args – Side board digital output requests to apply in order.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once every request has succeeded.

Throws:

std::runtime_error – If any request in side_dout_args fails.

Returns:

IPC::Response_FunctionsT with return_value 0 if side_dout_args was empty, otherwise the last request’s result.

IPC::Response_FunctionsT call_multiple_side_dout_toggle(const std::string &robot_model, std::vector<IPC::Request_SideDout_ToggleT> side_dout_args, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to toggle multiple side board digital outputs in order.

Applies call_side_dout_toggle once per entry in side_dout_args, in order; see call_multiple_common for the fail-fast/completion semantics.

Parameters:
  • robot_model – Name of the robot model.

  • side_dout_args – Side board digital output toggle requests to apply in order.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once every request has succeeded.

Throws:

std::runtime_error – If any request in side_dout_args fails.

Returns:

IPC::Response_FunctionsT with return_value 0 if side_dout_args was empty, otherwise the last request’s result.

IPC::Response_FunctionsT call_multiple_side_dout_bitcombination(const std::string &robot_model, std::vector<IPC::Request_SideDout_BitcombinationT> side_dout_args, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to apply multiple side board digital output bit-combinations in order.

Applies call_side_dout_bitcombination once per entry in side_dout_args, in order; see call_multiple_common for the fail-fast/completion semantics.

Parameters:
  • robot_model – Name of the robot model.

  • side_dout_args – Side board digital output bit-combination requests to apply in order.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once every request has succeeded.

Throws:

std::runtime_error – If any request in side_dout_args fails.

Returns:

IPC::Response_FunctionsT with return_value 0 if side_dout_args was empty, otherwise the last request’s result.

IPC::Response_FunctionsT call_multiple_side_dout_pulse(const std::string &robot_model, std::vector<IPC::Request_SideDout_PulseT> side_dout_args, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to run multiple side board digital output pulses in order.

Applies call_side_dout_pulse once per entry in side_dout_args, in order; see call_multiple_common for the fail-fast/completion semantics.

Parameters:
  • robot_model – Name of the robot model.

  • side_dout_args – Side board digital output pulse requests to apply in order.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once every request has succeeded.

Throws:

std::runtime_error – If any request in side_dout_args fails.

Returns:

IPC::Response_FunctionsT with return_value 0 if side_dout_args was empty, otherwise the last request’s result.

IPC::Response_FunctionsT call_side_aout(const std::string &robot_model, int port_num, float desired_voltage, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to set a side board analog output.

Parameters:
  • robot_model – Name of the robot model.

  • port_num – Side board analog output port number (0-3). A negative value applies desired_voltage to every side analog output port.

  • desired_voltage – Desired output voltage. Unlike call_flange_power, there is no bypass convention here — this value is applied as given.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails, no payload is returned, or the response’s return_value is nonzero.

Returns:

IPC::Response_FunctionsT containing the request result.

IPC::Response_FunctionsT call_multiple_side_aout(const std::string &robot_model, std::vector<IPC::Request_SideAout_GeneralT> side_aout_args, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to set multiple side board analog outputs in order.

Applies call_side_aout once per entry in side_aout_args, in order; see call_multiple_common for the fail-fast/completion semantics.

Parameters:
  • robot_model – Name of the robot model.

  • side_aout_args – Side board analog output requests to apply in order.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once every request has succeeded.

Throws:

std::runtime_error – If any request in side_aout_args fails.

Returns:

IPC::Response_FunctionsT with return_value 0 if side_aout_args was empty, otherwise the last request’s result.

IPC::Response_FunctionsT call_flange_power(const std::string &robot_model, int desired_voltage, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to set the flange (tool) power voltage.

Only available while the robot is power-engaged.

Parameters:
  • robot_model – Name of the robot model.

  • desired_voltage – Desired flange power voltage, in volts. Valid values are:

    • 0: power off

    • 12: 12V

    • 24: 24V

    • any negative value (e.g. -1): bypass — leaves the current voltage unchanged instead of setting a new one Any other positive value (e.g. 5) is rejected by the robot’s firmware and the call fails (return_value nonzero) rather than being coerced to one of the values above.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails, no payload is returned, or the response’s return_value is nonzero (the exception message includes the numeric return_value code).

Returns:

IPC::Response_FunctionsT containing the request result.

IPC::Response_FunctionsT call_flange_dout(const std::string &robot_model, int port_num, int desired_out, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to set a flange (tool) digital output.

Only available while the robot is power-engaged.

Parameters:
  • robot_model – Name of the robot model.

  • port_num – Flange digital output port number (0-1). A negative value applies desired_out to every flange digital output port.

  • desired_out – Desired output value: 1 is on, any other positive value is treated as 0 (off). A negative value bypasses — re-applies the port’s current state instead of changing it.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails, no payload is returned, or the response’s return_value is nonzero.

Returns:

IPC::Response_FunctionsT containing the request result.

IPC::Response_FunctionsT call_multiple_flange_dout(const std::string &robot_model, std::vector<IPC::Request_Flange_Digital_OutT> flange_dout_args, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to set multiple flange (tool) digital outputs in order.

Applies call_flange_dout once per entry in flange_dout_args, in order; see call_multiple_common for the fail-fast/completion semantics.

Parameters:
  • robot_model – Name of the robot model.

  • flange_dout_args – Flange digital output requests to apply in order.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once every request has succeeded.

Throws:

std::runtime_error – If any request in flange_dout_args fails.

Returns:

IPC::Response_FunctionsT with return_value 0 if flange_dout_args was empty, otherwise the last request’s result.

IPC::Response_FunctionsT call_ext_dout(const std::string &robot_model, int port_num, int desired_out, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to set an extension board digital output.

Parameters:
  • robot_model – Name of the robot model.

  • port_num – Extension board digital output port number (0-15). A negative value applies desired_out to every extension board digital output port.

  • desired_out – Desired output value. A negative value is a no-op (the robot returns success without changing any output).

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails, no payload is returned, or the response’s return_value is nonzero.

Returns:

IPC::Response_FunctionsT containing the request result.

IPC::Response_FunctionsT call_ext_dout_toggle(const std::string &robot_model, int port_num, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to toggle an extension board digital output.

Parameters:
  • robot_model – Name of the robot model.

  • port_num – Extension board digital output port number (0-15). A negative value toggles every extension board digital output port.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails, no payload is returned, or the response’s return_value is nonzero.

Returns:

IPC::Response_FunctionsT containing the request result.

IPC::Response_FunctionsT call_ext_dout_bitcombination(const std::string &robot_model, int port_start, int port_end, int desired_value, int direction_option, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to set a range of extension board digital outputs at once.

Ports that have a special function assigned (see save_ext_dout_function) are rejected — this call only works on plain digital output ports.

Parameters:
  • robot_model – Name of the robot model.

  • port_start – First port number in the range (inclusive).

  • port_end – Last port number in the range (inclusive), must be >= port_start.

  • desired_value – Bit pattern of output values to apply across the port range. Let N = port_end - port_start + 1 (number of ports in the range); valid range is 0 to (2^N - 1), one bit per port.

  • direction_option – Direction to map bits to ports: 0 applies bit 0 to port_start (normal), 1 applies bit 0 to port_end (inverse).

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails, no payload is returned, or the response’s return_value is nonzero.

Returns:

IPC::Response_FunctionsT containing the request result.

IPC::Response_FunctionsT call_ext_dout_pulse(const std::string &robot_model, int port_num, int block_mode, int direction, float time_1, float time_2, float time_3, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to pulse an extension board digital output on a timing schedule.

Ports that have a special function assigned (see save_ext_dout_function) are rejected — this call only works on plain digital output ports.

Note

The query timeout may increase based on the sum of the requested pulse times (time_1, time_2, and time_3).

Parameters:
  • robot_model – Name of the robot model.

  • port_num – Extension board digital output port number (0-15).

  • block_mode – 0 blocks until the pulse sequence finishes (up to a 10-second internal wait) before returning; 1 returns immediately without waiting. Any value other than 1 is treated as 0.

  • direction – Pulse waveform pattern across the 3 time segments: 0 for off/on/off, 1 for on/off/on. Any value other than 1 is treated as 0.

  • time_1 – First timing parameter, in seconds (valid range 0-3).

  • time_2 – Second timing parameter, in seconds (valid range 0-3).

  • time_3 – Third timing parameter, in seconds (valid range 0-3). Values below 0.003 are silently raised to 0.003 by the robot (unlike time_1 / time_2, which are used as given).

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails, no payload is returned, or the response’s return_value is nonzero.

Returns:

IPC::Response_FunctionsT containing the request result.

IPC::Response_FunctionsT call_multiple_ext_dout(const std::string &robot_model, std::vector<IPC::Request_ExtDout_GeneralT> ext_dout_args, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to set multiple extension board digital outputs in order.

Applies call_ext_dout once per entry in ext_dout_args, in order; see call_multiple_common for the fail-fast/completion semantics.

Parameters:
  • robot_model – Name of the robot model.

  • ext_dout_args – Extension board digital output requests to apply in order.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once every request has succeeded.

Throws:

std::runtime_error – If any request in ext_dout_args fails.

Returns:

IPC::Response_FunctionsT with return_value 0 if ext_dout_args was empty, otherwise the last request’s result.

IPC::Response_FunctionsT call_multiple_ext_dout_toggle(const std::string &robot_model, std::vector<IPC::Request_ExtDout_ToggleT> ext_dout_args, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to toggle multiple extension board digital outputs in order.

Applies call_ext_dout_toggle once per entry in ext_dout_args, in order; see call_multiple_common for the fail-fast/completion semantics.

Parameters:
  • robot_model – Name of the robot model.

  • ext_dout_args – Extension board digital output toggle requests to apply in order.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once every request has succeeded.

Throws:

std::runtime_error – If any request in ext_dout_args fails.

Returns:

IPC::Response_FunctionsT with return_value 0 if ext_dout_args was empty, otherwise the last request’s result.

IPC::Response_FunctionsT call_multiple_ext_dout_bitcombination(const std::string &robot_model, std::vector<IPC::Request_ExtDout_BitcombinationT> ext_dout_args, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to apply multiple extension board digital output bit-combinations in order.

Applies call_ext_dout_bitcombination once per entry in ext_dout_args, in order; see call_multiple_common for the fail-fast/completion semantics.

Parameters:
  • robot_model – Name of the robot model.

  • ext_dout_args – Extension board digital output bit-combination requests to apply in order.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once every request has succeeded.

Throws:

std::runtime_error – If any request in ext_dout_args fails.

Returns:

IPC::Response_FunctionsT with return_value 0 if ext_dout_args was empty, otherwise the last request’s result.

IPC::Response_FunctionsT call_multiple_ext_dout_pulse(const std::string &robot_model, std::vector<IPC::Request_ExtDout_PulseT> ext_dout_args, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to run multiple extension board digital output pulses in order.

Applies call_ext_dout_pulse once per entry in ext_dout_args, in order; see call_multiple_common for the fail-fast/completion semantics.

Parameters:
  • robot_model – Name of the robot model.

  • ext_dout_args – Extension board digital output pulse requests to apply in order.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once every request has succeeded.

Throws:

std::runtime_error – If any request in ext_dout_args fails.

Returns:

IPC::Response_FunctionsT with return_value 0 if ext_dout_args was empty, otherwise the last request’s result.

IPC::Response_FunctionsT call_ext_aout(const std::string &robot_model, int port_num, float desired_voltage, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to set an extension board analog output.

Parameters:
  • robot_model – Name of the robot model.

  • port_num – Extension board analog output port number (0-3). A negative value applies desired_voltage to every extension board analog output port.

  • desired_voltage – Desired output voltage. Unlike call_flange_power, there is no bypass convention here — this value is applied as given.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails, no payload is returned, or the response’s return_value is nonzero.

Returns:

IPC::Response_FunctionsT containing the request result.

IPC::Response_FunctionsT call_multiple_ext_aout(const std::string &robot_model, std::vector<IPC::Request_ExtAout_GeneralT> ext_aout_args, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to set multiple extension board analog outputs in order.

Applies call_ext_aout once per entry in ext_aout_args, in order; see call_multiple_common for the fail-fast/completion semantics.

Parameters:
  • robot_model – Name of the robot model.

  • ext_aout_args – Extension board analog output requests to apply in order.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once every request has succeeded.

Throws:

std::runtime_error – If any request in ext_aout_args fails.

Returns:

IPC::Response_FunctionsT with return_value 0 if ext_aout_args was empty, otherwise the last request’s result.

IPC::Response_FunctionsT save_side_dout_function(const std::string &robot_model, int port_num, int desired_function, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to save a special-function assignment for a side board digital output port.

Parameters:
  • robot_model – Name of the robot model.

  • port_num – Side board digital output port number (0-15).

  • desired_function – Special function to assign to the port (H=digital output signal is High, L=digital output signal is Low):

    • 0: None

    • 1: H=System Ready

    • 2: H=Heart Beat 1sec

    • 3: H=Bypass Dout #

    • 4: H=Is Power On State

    • 5: H=Is Robot Servo On State

    • 6: H=Is RealMode

    • 7: H=Is Real Mode + Idle

    • 8: H=Is Idle Move State

    • 9: H=Is Pause State

    • 10: H=Is Out Collision State

    • 11: H=Is Self Collision State

    • 12: H=Is Collision State (Out+Self)

    • 13: H=Is FreeDrive State

    • 14: H=Is Program Loaded

    • 15: H=Is Program Running

    • 16-31: H=Joints In-Position Pin 0-15 respectively Out-of-range values are rejected.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails, no payload is returned, or the response’s return_value is nonzero.

Returns:

IPC::Response_FunctionsT containing the save request result.

IPC::Response_FunctionsT save_side_din_function(const std::string &robot_model, int port_num, int desired_function, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to save a special-function assignment for a side board digital input port.

Parameters:
  • robot_model – Name of the robot model.

  • port_num – Side board digital input port number (0-15).

  • desired_function – Special function to assign to the port (R=triggered on rising edge, F=triggered on falling edge):

    • 0: None

    • 1: R=Power On

    • 2: R=Power Off

    • 3: R=Servo On Robot

    • 4: R=Servo On Robot / F=Power Off

    • 5: R=Switch to Real Mode

    • 6: R=Switch to Simulation Mode

    • 7: R=Stop Move

    • 8: R=Pause Move

    • 9: R=Resume from Pause

    • 10: R=Pause Move / F=Resume Move

    • 11: R=Resume from Collision

    • 12: R=FreeDrive On / F=FreeDrive Off

    • 13: R=Load Default Program

    • 14: R=Stop Program

    • 15: R=Start Program

    • 16: R=Pause Program

    • 17: R=Resume Program

    • 18: R=Pause Program / F=Resume Program

    • 19: R=TCP 50mm/s / F=Release

    • 20: R=TCP 100mm/s / F=Release

    • 21: R=TCP 250mm/s / F=Release

    • 22: R=TCP 500mm/s / F=Release

    • 23: R=SpeedBar 0% / F=Recover

    • 24: R=SpeedBar 10% / F=Recover

    • 25: R=SpeedBar 20% / F=Recover

    • 26: R=SpeedBar 50% / F=Recover Out-of-range values are rejected.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails, no payload is returned, or the response’s return_value is nonzero.

Returns:

IPC::Response_FunctionsT containing the save request result.

IPC::Response_FunctionsT save_side_din_filter(const std::string &robot_model, int port_num, int desired_count, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to save a debounce filter count for a side board digital input port.

Parameters:
  • robot_model – Name of the robot model.

  • port_num – Side board digital input port number (0-15).

  • desired_count – Input signal delay (debounce) count for the port, 0-200.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails, no payload is returned, or the response’s return_value is nonzero.

Returns:

IPC::Response_FunctionsT containing the save request result.

IPC::Response_FunctionsT save_ext_dout_function(const std::string &robot_model, int port_num, int desired_function, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to save a special-function assignment for an extension board digital output port.

Parameters:
  • robot_model – Name of the robot model.

  • port_num – Extension board digital output port number (0-15).

  • desired_function – Special function to assign to the port; same 0-31 function list as save_side_dout_function. Out-of-range values are rejected.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails, no payload is returned, or the response’s return_value is nonzero.

Returns:

IPC::Response_FunctionsT containing the save request result.

IPC::Response_FunctionsT save_ext_din_function(const std::string &robot_model, int port_num, int desired_function, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to save a special-function assignment for an extension board digital input port.

Parameters:
  • robot_model – Name of the robot model.

  • port_num – Extension board digital input port number (0-15).

  • desired_function – Special function to assign to the port; same 0-26 function list as save_side_din_function. Out-of-range values are rejected.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails, no payload is returned, or the response’s return_value is nonzero.

Returns:

IPC::Response_FunctionsT containing the save request result.

IPC::Response_FunctionsT save_ext_din_filter(const std::string &robot_model, int port_num, int desired_count, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to save a debounce filter count for an extension board digital input port.

Parameters:
  • robot_model – Name of the robot model.

  • port_num – Extension board digital input port number (0-15).

  • desired_count – Input signal delay (debounce) count for the port, 0-200.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails, no payload is returned, or the response’s return_value is nonzero.

Returns:

IPC::Response_FunctionsT containing the save request result.

IPC::Response_FunctionsT save_flange_dout_function(const std::string &robot_model, int port_num, int desired_function, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to save a special-function assignment for a flange (tool) digital output port.

Parameters:
  • robot_model – Name of the robot model.

  • port_num – Flange digital output port number (0-1).

  • desired_function – Special function to assign to the port; same 0-31 function list as save_side_dout_function. Out-of-range values are rejected.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails, no payload is returned, or the response’s return_value is nonzero.

Returns:

IPC::Response_FunctionsT containing the save request result.

IPC::Response_FunctionsT save_flange_din_function(const std::string &robot_model, int port_num, int desired_function, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to save a special-function assignment for a flange (tool) digital input port.

Parameters:
  • robot_model – Name of the robot model.

  • port_num – Flange digital input port number (0-5).

  • desired_function – Special function to assign to the port; same 0-26 function list as save_side_din_function. Out-of-range values are rejected.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails, no payload is returned, or the response’s return_value is nonzero.

Returns:

IPC::Response_FunctionsT containing the save request result.

IPC::Response_FunctionsT save_flange_din_filter(const std::string &robot_model, int port_num, int desired_count, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to save a debounce filter count for a flange (tool) digital input port.

Parameters:
  • robot_model – Name of the robot model.

  • port_num – Flange digital input port number (0-5).

  • desired_count – Input signal delay (debounce) count for the port, 0-200.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails, no payload is returned, or the response’s return_value is nonzero.

Returns:

IPC::Response_FunctionsT containing the save request result.

IPC::Response_FunctionsT save_user_script(const std::string &robot_model, int script_no, const std::string &script_txt, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to save a user script.

Parameters:
  • robot_model – Name of the robot model.

  • script_no – User script slot number to save into, 0-15.

  • script_txt – Script text/content to save.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails, no payload is returned, or the response’s return_value is nonzero.

Returns:

IPC::Response_FunctionsT containing the save request result.

IPC::Response_FunctionsT save_after_action(const std::string &robot_model, int after_no, int after_option, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to save an “after action” assignment.

Parameters:
  • robot_model – Name of the robot model.

  • after_no – After-action slot number, 0-15, one of: 0 After System Boot, 1 After Servo On, 2 After Real Mode On, 3 After Simul Mode On, 4 After Arm DC Power On, 5 After Arm DC Power Off, 6 After Program Start, 7 After Program Stop, 8 After Direct Teaching On, 9 After Direct Teaching Off, 10 After Collision Occur, 11 After Collision Reset, 12 After Pause, 13 After Resume, 14 After Move Start, 15 After Move Done.

  • after_option – Action to run when the after_no event occurs: 0 (Do nothing), or 1-16 to run User Script 0 through User Script 15 respectively.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails, no payload is returned, or the response’s return_value is nonzero.

Returns:

IPC::Response_FunctionsT containing the save request result.

IPC::Response_FunctionsT save_network_parameter(const std::string &robot_model, int static_vs_dhcp, int addr_0, int addr_1, int addr_2, int addr_3, int mask_0, int mask_1, int mask_2, int mask_3, int gate_0, int gate_1, int gate_2, int gate_3, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to configure its network settings.

Parameters:
  • robot_model – Name of the robot model.

  • static_vs_dhcp – Network configuration mode (0: Static IP, 1: DHCP)

  • addr_0 – IP address, 1st octet.

  • addr_1 – IP address, 2nd octet.

  • addr_2 – IP address, 3rd octet.

  • addr_3 – IP address, 4th octet.

  • mask_0 – Subnet mask, 1st octet.

  • mask_1 – Subnet mask, 2nd octet.

  • mask_2 – Subnet mask, 3rd octet.

  • mask_3 – Subnet mask, 4th octet.

  • gate_0 – Gateway address, 1st octet.

  • gate_1 – Gateway address, 2nd octet.

  • gate_2 – Gateway address, 3rd octet.

  • gate_3 – Gateway address, 4th octet.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails, no payload is returned, or the response’s return_value is nonzero.

Returns:

IPC::Response_FunctionsT containing the save request result.

Public Static Functions

static inline std::string type_name()#

manipulate/manipulate_maintenance.hpp#

class RBManipulateMaintenanceSDK : public RBBaseSDK#

Public Functions

inline RBManipulateMaintenanceSDK()#
IPC::Response_FunctionsT pop_joint_infos(const std::string &robot_model, int board_no, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to log/broadcast a joint board’s info.

This does not return the joint info through the SDK call itself — the robot only reports success/failure here. The actual info is logged and broadcast as a general message on the robot side (visible on the teach-pendant/UI, not returned to this caller). Also powers the robot on if it isn’t already.

Parameters:
  • robot_model – Name of the robot model.

  • board_no – Joint board number to query. A negative value queries every joint board.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails, board_no is out of range, or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing only success/failure — no joint info payload.

IPC::Response_FunctionsT call_joint_brake(const std::string &robot_model, int board_no, int brake_optioin, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to set a joint board’s brake state.

If brake_optioin is 1 (Open, Hard) or 2 (Weak), this powers the robot on first if it isn’t already powered.

Parameters:
  • robot_model – Name of the robot model.

  • board_no – Joint board number to control. A negative value applies to every joint board.

  • brake_optioin – Brake option: 0 (Close), 1 (Open, Hard), 2 (Weak), or 3 (Close only). (Parameter name matches the underlying wire field’s spelling, including its typo.)

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails, board_no is out of range, or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the request result.

IPC::Response_FunctionsT call_joint_encoder_zero(const std::string &robot_model, int board_no, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to zero a joint board’s encoder.

Powers the robot on first if it isn’t already powered.

Parameters:
  • robot_model – Name of the robot model.

  • board_no – Joint board number to zero. A negative value applies to every joint board.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails, board_no is out of range, or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the request result.

IPC::Response_FunctionsT call_joint_sensor_reset(const std::string &robot_model, int board_no, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to run a joint board’s current-sensor calibration procedure.

This is a multi-stage physical calibration, not an instant reset: cycles the brake and runs DQ-axis alignment (3 tries), DQ save (2 tries), and current nulling (2 tries), with real delays between steps. Takes on the order of several seconds per joint. Powers the robot on first if it isn’t already powered.

Parameters:
  • robot_model – Name of the robot model.

  • board_no – Joint board number to calibrate. A negative value applies to every joint board (multiplying the total time).

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails, board_no is out of range, or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the request result.

IPC::Response_FunctionsT set_joint_gain_cur(const std::string &robot_model, int board_no, int pgain, int igain, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to set a joint board’s current-loop gains.

Powers the robot on first if it isn’t already powered.

Parameters:
  • robot_model – Name of the robot model.

  • board_no – Joint board number to configure. A negative value applies to every joint board.

  • pgain – Proportional gain of the current control loop.

  • igain – Integral gain of the current control loop.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails, board_no is out of range, or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the request result.

IPC::Response_FunctionsT set_joint_gain_pos(const std::string &robot_model, int board_no, int pgain, int igain, int dgain, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to set a joint board’s position-loop gains.

Powers the robot on first if it isn’t already powered.

Parameters:
  • robot_model – Name of the robot model.

  • board_no – Joint board number to configure. A negative value applies to every joint board.

  • pgain – Proportional gain of the position control loop.

  • igain – Integral gain of the position control loop.

  • dgain – Derivative gain of the position control loop.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails, board_no is out of range, or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the request result.

IPC::Response_FunctionsT pop_joint_gain_cur(const std::string &robot_model, int board_no, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to log/broadcast a joint board’s current-loop gains.

Counterpart to set_joint_gain_cur, but this does not return the gain values through the SDK call — the robot only reports success/failure here. The actual gains are logged and broadcast as a general message on the robot side (visible on the teach-pendant/UI, not returned to this caller). Also powers the robot on if it isn’t already.

Parameters:
  • robot_model – Name of the robot model.

  • board_no – Joint board number to query. A negative value queries every joint board.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails, board_no is out of range, or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing only success/failure — no gain payload.

IPC::Response_FunctionsT pop_joint_gain_pos(const std::string &robot_model, int board_no, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to log/broadcast a joint board’s position-loop gains.

Counterpart to set_joint_gain_pos, but this does not return the gain values through the SDK call — the robot only reports success/failure here. The actual gains are logged and broadcast as a general message on the robot side (visible on the teach-pendant/UI, not returned to this caller). Also powers the robot on if it isn’t already.

Parameters:
  • robot_model – Name of the robot model.

  • board_no – Joint board number to query. A negative value queries every joint board.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails, board_no is out of range, or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing only success/failure — no gain payload.

IPC::Response_FunctionsT call_joint_bno_change(const std::string &robot_model, int channel_no, int board_no, int target_no, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to change a joint board’s board-number assignment.

Powers the robot on first if it isn’t already powered.

Parameters:
  • robot_model – Name of the robot model.

  • channel_no – Channel the joint board is on.

  • board_no – Current joint board number. A negative value applies to every joint board.

  • target_no – New board number to assign.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails, board_no is out of range, or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the request result.

IPC::Response_FunctionsT set_joint_big_input(const std::string &robot_model, int board_no, int bigerr, int inputerr, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to set a joint board’s big-error/input-error pulse thresholds.

Powers the robot on first if it isn’t already powered.

Parameters:
  • robot_model – Name of the robot model.

  • board_no – Joint board number to configure. A negative value applies to every joint board.

  • bigerr – Big-error pulse threshold.

  • inputerr – Input-error pulse threshold.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails, board_no is out of range, or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the request result.

IPC::Response_FunctionsT pop_joint_big_input(const std::string &robot_model, int board_no, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to log/broadcast a joint board’s big-error/input-error pulse thresholds.

Counterpart to set_joint_big_input, but this does not return the threshold values through the SDK call — the robot only reports success/failure here. The actual values are logged and broadcast as a general message on the robot side (visible on the teach-pendant/UI, not returned to this caller). Also powers the robot on if it isn’t already.

Parameters:
  • robot_model – Name of the robot model.

  • board_no – Joint board number to query. A negative value queries every joint board.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails, board_no is out of range, or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing only success/failure — no threshold payload.

IPC::Response_FunctionsT set_joint_jam_over(const std::string &robot_model, int board_no, int jam_current, int jam_time, int ovr_current, int ovr_time, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to set a joint board’s jam/overcurrent error thresholds.

Powers the robot on first if it isn’t already powered.

Parameters:
  • robot_model – Name of the robot model.

  • board_no – Joint board number to configure. A negative value applies to every joint board.

  • jam_current – Jam-error current limit, in mA.

  • jam_time – Jam-error duration threshold, in units of 0.1s.

  • ovr_current – Overcurrent-error current limit, in mA.

  • ovr_time – Overcurrent-error duration threshold, in units of 0.1s

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails, board_no is out of range, or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the request result.

IPC::Response_FunctionsT pop_joint_jam_over(const std::string &robot_model, int board_no, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to log/broadcast a joint board’s jam/overcurrent error thresholds.

Counterpart to set_joint_jam_over, but this does not return the threshold values through the SDK call — the robot only reports success/failure here. The actual values are logged and broadcast as a general message on the robot side (visible on the teach-pendant/UI, not returned to this caller). Also powers the robot on if it isn’t already.

Parameters:
  • robot_model – Name of the robot model.

  • board_no – Joint board number to query. A negative value queries every joint board.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails, board_no is out of range, or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing only success/failure — no threshold payload.

IPC::Response_FunctionsT pop_joint_dq_axis(const std::string &robot_model, int board_no, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to log/broadcast a joint board’s DQ-axis encoder values.

This does not return the DQ-axis encoder values through the SDK call — the robot only reports success/failure here. The actual values are logged and broadcast as a general message on the robot side (visible on the teach-pendant/UI, not returned to this caller). Also powers the robot on if it isn’t already.

Parameters:
  • robot_model – Name of the robot model.

  • board_no – Joint board number to query. A negative value queries every joint board.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails, board_no is out of range, or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing only success/failure — no DQ-axis encoder payload.

IPC::Response_FunctionsT call_shortcircuit_check(const std::string &robot_model, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to run a short-circuit check.

The robot only reports success/failure of the request here. Detailed check results are not returned through the SDK call.

Parameters:
  • robot_model – Name of the robot model.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the check request fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing only success/failure — no short-circuit check payload.

IPC::Response_FunctionsT call_force_eater_on(const std::string &robot_model, float time_sec, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to force the bleeder on for a given duration.

Forces the bleeder (regenerative-energy dissipation circuit) on regardless of its normal activation condition. The robot only reports success/failure of the request here.

Parameters:
  • robot_model – Name of the robot model.

  • time_sec – Duration, in seconds, to keep the bleeder forced on.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the request fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing only success/failure.

IPC::Response_FunctionsT pop_can_message_check(const std::string &robot_model, int range_optoin, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to run a CAN message check and log/broadcast the result.

This does not return the check result through the SDK call — the robot only reports success/failure here. The actual result is logged and broadcast as a general message on the robot side (visible on the teach-pendant/UI, not returned to this caller).

Parameters:
  • robot_model – Name of the robot model.

  • range_optoin – Scope of the CAN message check:

    • 0: Control box only

    • 1: Control box + robot

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the check request fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing only success/failure — no CAN message check payload.

IPC::Response_FunctionsT call_persist_joint_erase(const std::string &robot_model, std::vector<float> target_angle, FlowManagerArgsPtr flow_manager_args = nullptr)#

Erases the cobot’s persisted last joint angle DB.

Clears the joint angles the robot has stored as its last known position for all joints at once, and resets the stored entries to target_angle.

Parameters:
  • robot_model – Name of the robot model.

  • target_angle – Joint angles, in degrees, to store in place of the erased values. One value per joint, covering every joint.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the erase request fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing only success/failure.

Public Static Functions

static inline std::string type_name()#

manipulate/manipulate_move.hpp#

class RBManipulateMoveSDK : public RBBaseSDK#

Public Functions

inline RBManipulateMoveSDK()#
IPC::Response_FunctionsT call_move_j(const std::string &robot_model, IPC::MoveInput_TargetT target, std::optional<std::vector<float>> reference_value, std::optional<MoveSpeedArg> speed, std::optional<std::vector<float>> ext_axis = std::nullopt, std::optional<std::vector<IPC::Move_Property_EntryT>> properties = std::nullopt, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to start a J-type (joint-space) movement.

Supports J-type (joint-space) movement of the cobot: the target is given as a per-joint angle set, and each joint moves independently toward its target angle, so the resulting end-effector path is not constrained to a straight line (as opposed to L-type movement). If reference joint values are provided, the target is calculated as a relative movement from the reference position.

Note

If speed is not provided, the default values are: spd_mode = 1 (absolute), spd_vel_para = 60, spd_acc_para = 120.

Note

If flow_manager_args is provided, this function returns immediately after submitting the request; a background monitor waits for the actual motion-completion signal from the robot before invoking the flow manager’s completion callback. If args[“variable”] is set, the final joint_q_ref is stored in that variable before completion.

Parameters:
  • robot_model – Name of the robot model.

  • target – Target position and frame information. When reference_value is provided, tar_values must have exactly 7 elements (the underlying relative-value calculation rejects any other length). tar_frame is -1 Joint, 0 Global, 1 Tool, 2 User, or 3 Target frame; tar_unit is 0 mm/deg, 1 m/rad, or 2 inch/deg.

  • reference_value – Optional reference joint values used for relative movement calculation. Must have exactly 7 elements when provided — e.g. [0, 0, 0, 0, 0, 0, 0].

  • speed – Optional movement speed parameters. spd_mode is 0 (%-based) or 1 (absolute/physical value).

  • ext_axis – Optional external axis values.

  • flow_manager_args – Optional PyFM step context. If provided, the movement result is reported to the flow manager and completion is handled asynchronously.

Throws:

std::runtime_error – If relative movement calculation fails, or if the movement result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the movement request result.

IPC::Response_FunctionsT call_move_l(const std::string &robot_model, IPC::MoveInput_TargetT target, std::optional<std::vector<float>> reference_value, std::optional<MoveSpeedArg> speed, std::optional<std::vector<float>> ext_axis = std::nullopt, std::optional<std::vector<IPC::Move_Property_EntryT>> properties = std::nullopt, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to start an L-type (linear/Cartesian-space) movement.

Supports L-type (linear/Cartesian-space) movement of the cobot: the target is given as a Cartesian pose, and the end-effector moves in a straight line to that pose (as opposed to J-type movement). If reference_value is provided, the target is calculated as a relative movement from the reference position.

Note

If speed is not provided, the default values are: spd_mode = 1 (absolute), spd_vel_para = 60, spd_acc_para = 120.

Note

If flow_manager_args is provided, this function returns immediately after submitting the request; a background monitor waits for the actual motion-completion signal from the robot before invoking the flow manager’s completion callback. If args[“variable”] is set, the final carte_x_ref is stored in that variable before completion.

Parameters:
  • robot_model – Name of the robot model.

  • target – Target position and frame information. tar_values is [x, y, z, rx, ry, rz, aa] for 7-axis models, or [x, y, z, rx, ry, rz] for 6-axis models (aa = ArmAngle). When reference_value is provided, tar_values must have exactly 7 elements regardless of axis count (pad with 0 for a 6-axis model’s unused aa slot) — the underlying relative-value calculation rejects any other length. tar_frame is -1 Joint, 0 Global, 1 Tool, 2 User, or 3 Target frame; tar_unit is 0 mm/deg, 1 m/rad, or 2 inch/deg.

  • reference_value – Optional reference target used for relative movement calculation, in the same [x, y, z, rx, ry, rz(, aa)] format as target. Must have exactly 7 elements when provided, regardless of axis count.

  • speed – Optional movement speed parameters. spd_mode is 0 (%-based) or 1 (absolute/physical value).

  • ext_axis – Optional external axis values.

  • flow_manager_args – Optional PyFM step context. If provided, the movement result is reported to the flow manager and completion is handled asynchronously.

Throws:

std::runtime_error – If relative movement calculation fails, or if the movement result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the movement request result.

IPC::Response_FunctionsT call_move_jb_clr(const std::string &robot_model, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to clear its queued joint-blend movement commands.

Clears the internal list of joint-blend move segments previously accumulated via call_move_jb_add, so a new joint-blend sequence can be started from scratch.

Parameters:
  • robot_model – Name of the robot model.

  • flow_manager_args – Optional PyFM step context. If provided, the blend command list is cleared and completion is reported to the flow manager immediately (synchronous), unlike move commands whose completion is tracked asynchronously.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the clear request result.

IPC::Response_FunctionsT call_move_jb_add(const std::string &robot_model, IPC::MoveInput_TargetT target, std::optional<std::vector<float>> reference_value, std::optional<MoveSpeedArg> speed, const IPC::MoveInput_TypeT &blend_type, std::optional<std::vector<float>> ext_axis = std::nullopt, std::optional<std::vector<IPC::Move_Property_EntryT>> properties = std::nullopt, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to add a segment to the queued joint-blend movement sequence.

Appends one joint-space segment to the internal blend list built up across successive calls; the queued segments run together once call_move_jb_run is invoked. If reference joint values are provided, the segment’s target is calculated as a relative movement from the reference position.

Note

If speed is not provided, the default values are: spd_mode = 1 (absolute), spd_vel_para = 60, spd_acc_para = 120.

Parameters:
  • robot_model – Name of the robot model.

  • target – Target position and frame information. When reference_value is provided, tar_values must have exactly 7 elements (the underlying relative-value calculation rejects any other length). tar_frame is -1 Joint, 0 Global, 1 Tool, 2 User, or 3 Target frame; tar_unit is 0 mm/deg, 1 m/rad, or 2 inch/deg.

  • reference_value – Optional reference joint values used for relative movement calculation. Must have exactly 7 elements when provided — e.g. [0, 0, 0, 0, 0, 0, 0].

  • speed – Optional movement speed parameters. spd_mode is 0 (%-based) or 1 (absolute/physical value).

  • blend_type – Blend transition parameters. pnt_type is 0 (Percentage) or 1 (Distance); pnt_para is a percentage when pnt_type is 0, or millimeters when pnt_type is 1.

  • ext_axis – Optional external axis values.

  • flow_manager_args – Optional PyFM step context. If provided, this segment is recorded for the blend sequence and completion is reported to the flow manager immediately (synchronous), unlike run commands whose completion is tracked asynchronously.

Throws:

std::runtime_error – If relative movement calculation fails, or if the add request result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the add request result.

IPC::Response_FunctionsT call_move_jb_run(const std::string &robot_model, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to execute the queued joint-blend movement sequence.

Runs the sequence of joint-space segments previously accumulated via call_move_jb_add.

Parameters:
  • robot_model – Name of the robot model.

  • flow_manager_args – Optional PyFM step context. If provided, the movement result is reported to the flow manager immediately, and a background monitor invokes its completion callback once the actual motion finishes, instead of blocking here until then.

Throws:

std::runtime_error – If the query fails or the run request result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the run request result.

IPC::Response_FunctionsT call_move_lb_clr(const std::string &robot_model, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to clear its queued linear-blend movement commands.

Clears the internal list of linear-blend (Cartesian-space) move segments previously accumulated via call_move_lb_add, so a new linear-blend sequence can be started from scratch.

Parameters:
  • robot_model – Name of the robot model.

  • flow_manager_args – Optional PyFM step context. If provided, the blend command list is cleared and completion is reported to the flow manager immediately (synchronous), unlike move commands whose completion is tracked asynchronously.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the clear request result.

IPC::Response_FunctionsT call_move_lb_add(const std::string &robot_model, IPC::MoveInput_TargetT target, std::optional<std::vector<float>> reference_value, std::optional<MoveSpeedArg> speed, const IPC::MoveInput_TypeT &blend_type, std::optional<std::vector<float>> ext_axis = std::nullopt, std::optional<std::vector<IPC::Move_Property_EntryT>> properties = std::nullopt, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to add a segment to the queued linear-blend movement sequence.

Appends one Cartesian-space segment to the internal blend list built up across successive calls; the queued segments run together once call_move_lb_run is invoked. If reference_value is provided, the segment’s target is calculated as a relative movement from the reference position.

Note

If speed is not provided, the default values are: spd_mode = 1 (absolute), spd_vel_para = 60, spd_acc_para = 120.

Parameters:
  • robot_model – Name of the robot model.

  • target – Target position and frame information. tar_values is [x, y, z, rx, ry, rz, aa] for 7-axis models, or [x, y, z, rx, ry, rz] for 6-axis models (aa = ArmAngle). When reference_value is provided, tar_values must have exactly 7 elements regardless of axis count (pad with 0 for a 6-axis model’s unused aa slot) — the underlying relative-value calculation rejects any other length. tar_frame is -1 Joint, 0 Global, 1 Tool, 2 User, or 3 Target frame; tar_unit is 0 mm/deg, 1 m/rad, or 2 inch/deg.

  • reference_value – Optional reference target used for relative movement calculation, in the same [x, y, z, rx, ry, rz(, aa)] format as target. Must have exactly 7 elements when provided, regardless of axis count.

  • speed – Optional movement speed parameters. spd_mode is 0 (%-based) or 1 (absolute/physical value).

  • blend_type – Blend transition parameters. pnt_type is 0 (Percentage), 1 (Distance), 2 (Linear Type), or 3 (Corner Type); pnt_para is a percentage when pnt_type is 0, or millimeters when pnt_type is 1.

  • ext_axis – Optional external axis values.

  • flow_manager_args – Optional PyFM step context. If provided, this segment is recorded for the blend sequence and completion is reported to the flow manager immediately (synchronous), unlike run commands whose completion is tracked asynchronously.

Throws:

std::runtime_error – If relative movement calculation fails, or if the add request result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the add request result.

IPC::Response_FunctionsT call_move_lb_run(const std::string &robot_model, const int orientation, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to execute the queued linear-blend movement sequence.

Runs the sequence of Cartesian-space segments previously accumulated via call_move_lb_add.

Parameters:
  • robot_model – Name of the robot model.

  • orientation – Orientation option for the blended path. (0: Intended, 1: Constant)

  • flow_manager_args – Optional PyFM step context. If provided, the movement result is reported to the flow manager immediately, and a background monitor invokes its completion callback once the actual motion finishes, instead of blocking here until then.

Throws:

std::runtime_error – If the query fails or the run request result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the run request result.

IPC::Response_FunctionsT call_move_pb_clr(const std::string &robot_model, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to clear its queued point-blend movement commands.

Clears the internal list of point-blend (Cartesian-space) move segments previously accumulated via call_move_pb_add, so a new point-blend sequence can be started from scratch.

Parameters:
  • robot_model – Name of the robot model.

  • flow_manager_args – Optional PyFM step context. If provided, the point-blend list is cleared and completion is reported to the flow manager immediately (synchronous), unlike move commands whose completion is tracked asynchronously.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the clear request result.

IPC::Response_FunctionsT call_move_pb_add(const std::string &robot_model, IPC::MoveInput_TargetT target, std::optional<std::vector<float>> reference_value, std::optional<MoveSpeedArg> speed, const IPC::MoveInput_TypeT &blend_type, std::optional<std::vector<float>> ext_axis = std::nullopt, std::optional<std::vector<IPC::Move_Property_EntryT>> properties = std::nullopt, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to add a point to the queued point-blend movement sequence.

Appends one Cartesian-space point to the internal point-blend list built up across successive calls; the queued points run together as a single blended path once call_move_pb_run is invoked. If reference_value is provided, the point’s target is calculated as a relative movement from the reference position.

Note

If speed is not provided, the default values are: spd_mode = 1 (absolute), spd_vel_para = 60, spd_acc_para = 120.

Parameters:
  • robot_model – Name of the robot model.

  • target – Target position and frame information. tar_values is [x, y, z, rx, ry, rz, aa] for 7-axis models, or [x, y, z, rx, ry, rz] for 6-axis models (aa = ArmAngle). When reference_value is provided, tar_values must have exactly 7 elements regardless of axis count (pad with 0 for a 6-axis model’s unused aa slot) — the underlying relative-value calculation rejects any other length. tar_frame is -1 Joint, 0 Global, 1 Tool, 2 User, or 3 Target frame; tar_unit is 0 mm/deg, 1 m/rad, or 2 inch/deg.

  • reference_value – Optional reference target used for relative movement calculation, in the same [x, y, z, rx, ry, rz(, aa)] format as target. Must have exactly 7 elements when provided, regardless of axis count.

  • speed – Optional movement speed parameters. spd_mode is 0 (%-based) or 1 (absolute/physical value).

  • blend_type – Blend parameters applied at this point. pnt_type is 0 (Percentage), 1 (Distance), 2 (Linear Type), or 3 (Corner Type); pnt_para is a percentage when pnt_type is 0, or millimeters when pnt_type is 1.

  • ext_axis – Optional external axis values.

  • properties – Optional move property entries for this point.

  • flow_manager_args – Optional PyFM step context. If provided, this point is recorded for the point-blend sequence and completion is reported to the flow manager immediately (synchronous), unlike run commands whose completion is tracked asynchronously.

Throws:

std::runtime_error – If relative movement calculation fails, or if the add request result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the add request result.

IPC::Response_FunctionsT call_move_pb_run(const std::string &robot_model, const int orientation, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to execute the queued point-blend movement sequence.

Runs the sequence of Cartesian-space points previously accumulated via call_move_pb_add as a single blended path.

Parameters:
  • robot_model – Name of the robot model.

  • orientation – Orientation option for the blended path. (0: Intended, 1: Constant)

  • flow_manager_args – Optional PyFM step context. If provided, the movement result is reported to the flow manager immediately, and a background monitor invokes its completion callback once the actual motion finishes, instead of blocking here until then.

Throws:

std::runtime_error – If the query fails or the run request result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the run request result.

IPC::Response_FunctionsT call_move_xb_clr(const std::string &robot_model, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to clear its queued XB-type blend movement commands.

Clears the internal list of XB-type blend move segments previously accumulated via call_move_xb_add, so a new blend sequence can be started from scratch.

Parameters:
  • robot_model – Name of the robot model.

  • flow_manager_args – Optional PyFM step context. If provided, the blend command list is cleared and completion is reported to the flow manager immediately (synchronous), unlike move commands whose completion is tracked asynchronously.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the clear request result.

IPC::Response_FunctionsT call_move_xb_add(const std::string &robot_model, IPC::MoveInput_TargetT target, const MoveSpeedArg &speed, const IPC::MoveInput_TypeT &blend_type, const int method, std::optional<std::vector<IPC::Move_Property_EntryT>> properties = std::nullopt, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to add a segment to the queued XB-type blend movement sequence.

Appends one segment to the internal blend list built up across successive calls; the queued segments run together once call_move_xb_run is invoked.

Parameters:
  • robot_model – Name of the robot model.

  • target – Target position and frame information. tar_frame is -1 Joint, 0 Global, 1 Tool, 2 User, or 3 Target frame; tar_unit is 0 mm/deg, 1 m/rad, or 2 inch/deg.

  • speed – Movement speed parameters. spd_mode is 0 (%-based) or 1 (absolute/physical value).

  • blend_type – Blend transition parameters. pnt_type is 0 (Percentage) or 1 (Distance); pnt_para is a percentage when pnt_type is 0, or millimeters when pnt_type is 1.

  • method – Motion (movement) type option (0: Joint movement, 1: Linear movement).

  • flow_manager_args – Optional PyFM step context. If provided, this segment is recorded for the blend sequence and completion is reported to the flow manager immediately (synchronous), unlike run commands whose completion is tracked asynchronously.

Throws:

std::runtime_error – If the add request result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the add request result.

IPC::Response_FunctionsT call_move_xb_run(const std::string &robot_model, int running_mode, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to execute the queued XB-type blend movement sequence.

Runs the sequence of segments previously accumulated via call_move_xb_add.

Parameters:
  • robot_model – Name of the robot model.

  • running_mode – Execution mode option for the blended run. (0: Velocity Blending, 1: Position Blending)

  • flow_manager_args – Optional PyFM step context. If provided, the movement result is reported to the flow manager immediately, and a background monitor invokes its completion callback once the actual motion finishes, instead of blocking here until then.

Throws:

std::runtime_error – If the query fails or the run request result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the run request result.

IPC::Response_FunctionsT call_smoothjog_j(const std::string &robot_model, IPC::MoveInput_TargetT target, std::optional<std::vector<float>> ext_axis = std::nullopt, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to start continuous joint-space jog motion toward a target.

Starts jog-style motion in joint space toward target; unlike a regular move command, motion continues until stopped via call_smoothjog_stop.

Parameters:
  • robot_model – Name of the robot model.

  • target – Target position and frame information. tar_frame is -1 Joint, 0 Global, 1 Tool, 2 User, or 3 Target frame; tar_unit is 0 mm/deg, 1 m/rad, or 2 inch/deg.

  • ext_axis – Optional external axis values.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the jog command is accepted.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the jog request result.

IPC::Response_FunctionsT call_smoothjog_l(const std::string &robot_model, IPC::MoveInput_TargetT target, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to start continuous Cartesian-space jog motion toward a target.

Starts jog-style motion in Cartesian space toward target; unlike a regular move command, motion continues until stopped via call_smoothjog_stop.

Parameters:
  • robot_model – Name of the robot model.

  • target – Target position and frame information. tar_values is [x, y, z, rx, ry, rz, aa] for 7-axis models, or [x, y, z, rx, ry, rz] for 6-axis models (aa = ArmAngle). tar_frame is -1 Joint, 0 Global, 1 Tool, 2 User, or 3 Target frame; tar_unit is 0 mm/deg, 1 m/rad, or 2 inch/deg.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the jog command is accepted.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the jog request result.

IPC::Response_FunctionsT call_smoothjog_stop(const std::string &robot_model, const float stop_time, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to decelerate and stop an active smooth-jog motion.

Stops motion previously started by call_smoothjog_j / call_smoothjog_l.

Parameters:
  • robot_model – Name of the robot model.

  • stop_time – Deceleration time, in seconds, used to bring the jog motion to a stop.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the stop command is accepted.

Throws:

std::runtime_error – If the query fails, no payload is returned, or the response’s return_value is nonzero.

Returns:

IPC::Response_FunctionsT containing the stop request result.

IPC::Response_FunctionsT call_tickjog_j(const std::string &robot_model, IPC::MoveInput_TargetT target, const MoveSpeedArg &speed, std::optional<std::vector<float>> ext_axis = std::nullopt, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to move a single joint-space tick step toward a target.

Unlike call_smoothjog_j's continuous motion, this moves the cobot by a single discrete tick increment in joint space toward target.

Parameters:
  • robot_model – Name of the robot model.

  • target – Target position and frame information. tar_frame is -1 Joint, 0 Global, 1 Tool, 2 User, or 3 Target frame; tar_unit is 0 mm/deg, 1 m/rad, or 2 inch/deg.

  • speed – Movement speed parameters. spd_mode is 0 (%-based) or 1 (absolute/physical value).

  • ext_axis – Optional external axis values.

  • flow_manager_args – Optional PyFM step context. If provided, the movement result is reported to the flow manager immediately, and a background monitor invokes its completion callback once the actual motion finishes, instead of blocking here until then.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the tick-jog request result.

IPC::Response_FunctionsT call_tickjog_l(const std::string &robot_model, IPC::MoveInput_TargetT target, const MoveSpeedArg &speed, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to move a single Cartesian-space tick step toward a target.

Unlike call_smoothjog_l's continuous motion, this moves the cobot by a single discrete tick increment in Cartesian space toward target.

Parameters:
  • robot_model – Name of the robot model.

  • target – Target position and frame information. tar_values is [x, y, z, rx, ry, rz, aa] for 7-axis models, or [x, y, z, rx, ry, rz] for 6-axis models (aa = ArmAngle). tar_frame is -1 Joint, 0 Global, 1 Tool, 2 User, or 3 Target frame; tar_unit is 0 mm/deg, 1 m/rad, or 2 inch/deg.

  • speed – Movement speed parameters. spd_mode is 0 (%-based) or 1 (absolute/physical value).

  • flow_manager_args – Optional PyFM step context. If provided, the movement result is reported to the flow manager immediately, and a background monitor invokes its completion callback once the actual motion finishes, instead of blocking here until then.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the tick-jog request result.

IPC::Response_FunctionsT call_approach_j(const std::string &robot_model, IPC::MoveInput_TargetT target, const MoveSpeedArg &speed, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to start an Approach-J joint-space movement.

Sends the same underlying request shape as call_move_j; the two are distinguished only by the calling context.

Parameters:
  • robot_model – Name of the robot model.

  • target – Target position and frame information. tar_frame is -1 Joint, 0 Global, 1 Tool, 2 User, or 3 Target frame; tar_unit is 0 mm/deg, 1 m/rad, or 2 inch/deg.

  • speed – Movement speed parameters. spd_mode is 0 (%-based) or 1 (absolute/physical value).

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the movement result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the movement request result.

IPC::Response_FunctionsT call_approach_l(const std::string &robot_model, IPC::MoveInput_TargetT target, const MoveSpeedArg &speed, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to start an Approach-L Cartesian-space movement.

Sends the same underlying request shape as call_move_l; the two are distinguished only by the calling context.

Parameters:
  • robot_model – Name of the robot model.

  • target – Target position and frame information. tar_values is [x, y, z, rx, ry, rz, aa] for 7-axis models, or [x, y, z, rx, ry, rz] for 6-axis models (aa = ArmAngle). tar_frame is -1 Joint, 0 Global, 1 Tool, 2 User, or 3 Target frame; tar_unit is 0 mm/deg, 1 m/rad, or 2 inch/deg.

  • speed – Movement speed parameters. spd_mode is 0 (%-based) or 1 (absolute/physical value).

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the movement result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the movement request result.

IPC::Response_FunctionsT call_approach_stop(const std::string &robot_model, const float stop_time, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to stop an active Approach movement.

Sends the same underlying request shape as call_smoothjog_stop; the two are distinguished only by the calling context.

Parameters:
  • robot_model – Name of the robot model.

  • stop_time – Deceleration time, in seconds, used to bring the movement to a stop.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the stop command is accepted.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the stop request result.

IPC::Response_FunctionsT call_tcp_weaving_off(const std::string &robot_model, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to stop TCP weaving.

Parameters:
  • robot_model – Name of the robot model.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the request result.

IPC::Response_FunctionsT call_tcp_weaving_on(const std::string &robot_model, const int type, const int axis_torch, const int axis_weave, const int plane_option, const float user_rx, const float user_ry, const float user_rz, const float magnitude_1, const float magnitude_2, const float phase_1, const float phase_2, const float time_1, const float time_2, const float time_3, const float time_4, const float time_5, const float time_6, const float time_7, const float time_8, const float scale_rate, const float offset_torch, const float offset_weave, const float swing_ang, const float distortion, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to start TCP weaving on the current move.

Parameters:
  • robot_model – Name of the robot model.

  • type – Weave pattern: 0 None, 1 Trapezoidal, 2 Sine wave, 3 Polynomial, 4 Ellipse, 5 8-Shape, 6 Lissajous, 7 C-Shape, 8 Diagonal.

  • axis_torch – Torch direction axis.

  • axis_weave – Weaving direction axis.

  • plane_option – Weaving plane: 0 Present TCP Frame, 1 Follow base-trajectory.

  • user_rx – User orientation Rx, in degrees.

  • user_ry – User orientation Ry, in degrees.

  • user_rz – User orientation Rz, in degrees.

  • magnitude_1 – First weave magnitude, in mm.

  • magnitude_2 – Second weave magnitude, in mm.

  • phase_1 – First weave phase.

  • phase_2 – Second weave phase.

  • time_1 – Time schedule segment 1, in seconds.

  • time_2 – Time schedule segment 2, in seconds.

  • time_3 – Time schedule segment 3, in seconds.

  • time_4 – Time schedule segment 4, in seconds.

  • time_5 – Time schedule segment 5, in seconds.

  • time_6 – Time schedule segment 6, in seconds.

  • time_7 – Time schedule segment 7, in seconds.

  • time_8 – Time schedule segment 8, in seconds.

  • scale_rate – Weave scale multiplier (default 1).

  • offset_torch – Offset along the torch direction, in mm.

  • offset_weave – Offset along the weaving direction, in mm.

  • swing_ang – Swing angle, in degrees.

  • distortion – Distortion angle, in degrees.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the request result.

IPC::Response_FunctionsT call_tcp_weaving_bezier_off(const std::string &robot_model, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to stop Bezier TCP weaving (Weaving 2).

Counterpart to call_tcp_weaving_bezier_on. Has no effect on the classic pattern weaving started by call_tcp_weaving_on; use call_tcp_weaving_off for that.

Parameters:
  • robot_model – Name of the robot model.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the request result.

IPC::Response_FunctionsT call_tcp_weaving_bezier_on(const std::string &robot_model, const int axis_torch, const int axis_weave, const int plane_option, const float user_rx, const float user_ry, const float user_rz, const std::vector<IPC::Weave_Bezier_Point> &points, const float scale_rate, const float offset_torch, const float offset_weave, const float swing_ang, const float smooth_delta, const float dir_update_dist, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to start Bezier TCP weaving (Weaving 2) on the current move.

Unlike call_tcp_weaving_on, which picks one of the fixed patterns (sine, trapezoidal, …), this weaves along a free-form shape described by a cubic Bezier spline. points defines one period of the shape in a 2D weave plane: x is the travel direction (along the base trajectory) and y is the weave (side-to-side) direction. The shape is repeated for as long as the robot keeps moving. Like the other wrapper functions (call_tcp_weaving_on, call_base_conveyor_on), it is layered on top of the main move, so call it before/while issuing the moves to weave along, and stop it with call_tcp_weaving_bezier_off.

Note

Constraints on points, dir_update_dist, and the axes are validated by the controller, not by this SDK; a rejected request comes back as a nonzero return_value.

Parameters:
  • robot_model – Name of the robot model.

  • axis_torch – Torch direction axis: 0 TCP +X, 1 TCP +Y, 2 TCP +Z, 3 TCP -X, 4 TCP -Y, 5 TCP -Z. Must differ from axis_weave (and not be its opposite).

  • axis_weave – Weaving (side-to-side, y of points) direction axis: 0 TCP +X, 1 TCP +Y, 2 TCP +Z, 3 TCP -X, 4 TCP -Y, 5 TCP -Z.

  • plane_option – Weaving plane: 0 Present TCP Frame (the plane is fixed to the TCP frame at start), 1 Follow base-trajectory (the plane is re-oriented along the travel direction, updated every dir_update_dist mm).

  • user_rx – User orientation Rx applied to the weave plane, in degrees.

  • user_ry – User orientation Ry applied to the weave plane, in degrees.

  • user_rz – User orientation Rz applied to the weave plane, in degrees.

  • points – One period of the weave shape, 2 to 64 Bezier points in order. Each point is {anchor_x, anchor_y, in_x, in_y, out_x, out_y, dwell}: anchor_x/anchor_y is the point the curve passes through (mm); in_x/in_y is the incoming handle and out_x/out_y the outgoing handle, both in absolute weave-plane coordinates (mm), not relative to the anchor (set a handle equal to its anchor for a sharp corner); dwell is the time to stay at the anchor, in seconds (ignored on the first point). The first anchor must be (0, 0) and the last anchor (L, 0) with 0 < L <= 100; L is the travel distance of one period. In Python, pass a list of dicts with these keys, e.g. [{“anchor_x”: 0, “anchor_y”: 0, “in_x”: 0, “in_y”: 0, “out_x”: 1, “out_y”: 3, “dwell”: 0}, …].

  • scale_rate – Weave scale multiplier (schema default 1.0). Applied to the width (y) only; the period length L is not scaled.

  • offset_torch – Constant offset along the torch direction, in mm.

  • offset_weave – Constant offset along the weaving direction, in mm.

  • swing_ang – Torch swing angle at the widest point, in degrees. The actual swing is proportional to y / Ymax, where Ymax is the largest |y| of the shape.

  • smooth_delta – Corner smoothing width, in mm (schema default 0.3). 0 disables smoothing.

  • dir_update_dist – Travel-direction update distance when plane_option is 1, in mm (schema default 0.5, minimum 0.05). Ignored when plane_option is 0.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the request result.

IPC::Response_FunctionsT call_base_conveyor_off(const std::string &robot_model, const float stop_time_sec, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to stop base conveyor tracking.

Parameters:
  • robot_model – Name of the robot model.

  • stop_time_sec – Deceleration time, in seconds.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the request result.

IPC::Response_FunctionsT call_base_conveyor_speed(const std::string &robot_model, const float conv_speed, const float conv_acc_time_sec, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to change the base conveyor’s tracking speed.

Parameters:
  • robot_model – Name of the robot model.

  • conv_speed – Conveyor speed, in mm/s.

  • conv_acc_time_sec – Speed adjustment time, in seconds.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the request result.

IPC::Response_FunctionsT call_base_conveyor_on(const std::string &robot_model, const int conv_type, const float conv_speed, const float conv_acc_time_sec, const std::vector<MoveTargetValuesArg> &conv_ref_points, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to start base conveyor tracking.

Parameters:
  • robot_model – Name of the robot model.

  • conv_type – 0 No Conveyor, 1 Linear Conveyor, 2 Circular Conveyor.

  • conv_speed – Conveyor speed, in mm/s.

  • conv_acc_time_sec – Speed adjustment time, in seconds.

  • conv_ref_points – Conveyor reference points; each point’s values are rounded to 3 decimal places and padded/truncated to 7 elements.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the request result.

IPC::Response_FunctionsT call_move_cir_axis(const std::string &robot_model, const SafeMoveTargetArg &center, const SafeMoveTargetArg &axis, const float angle, const int mode, std::optional<MoveSpeedArg> speed, const int radius_option, const float radius_para, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to move in a circle defined by a center and rotation axis.

Parameters:
  • robot_model – Name of the robot model.

  • center – Rotation center. Resolved through the same relative-value calculation as get_relative_value before being sent. tar_frame is -1 Joint, 0 Global, 1 Tool, 2 User, or 3 Target frame; tar_unit is 0 mm/deg, 1 m/rad, or 2 inch/deg.

  • axis – Rotation axis. Resolved the same way as center. tar_frame is -1 Joint, 0 Global, 1 Tool, 2 User, or 3 Target frame; tar_unit is 0 mm/deg, 1 m/rad, or 2 inch/deg.

  • angle – Rotation angle, in degrees.

  • mode – Orientation mode: 0 Sync, 1 Constant, 2 Intended.

  • speed – Movement speed parameters (same concept as move-L speed). spd_mode is 0 (%-based) or 1 (absolute/physical value).

  • radius_option – Radius option: 0 None, 1 Rate per revolution, 2 Size per revolution.

  • radius_para – Radius parameter, interpreted according to radius_option.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails, the center/axis relative-value calculation fails, or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the request result.

IPC::Response_FunctionsT call_move_cir_threepoint(const std::string &robot_model, const SafeMoveTargetArg &via_p, const SafeMoveTargetArg &goal_p, const int mode, std::optional<MoveSpeedArg> speed, const int radius_option, const float radius_para, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to move in a circle defined by a via point and a goal point.

Parameters:
  • robot_model – Name of the robot model.

  • via_p – A point the circular path passes through. Resolved through the same relative-value calculation as get_relative_value before being sent. tar_frame is -1 Joint, 0 Global, 1 Tool, 2 User, or 3 Target frame; tar_unit is 0 mm/deg, 1 m/rad, or 2 inch/deg.

  • goal_p – The circular path’s end point. Resolved the same way as via_p. tar_frame is -1 Joint, 0 Global, 1 Tool, 2 User, or 3 Target frame; tar_unit is 0 mm/deg, 1 m/rad, or 2 inch/deg.

  • mode – Orientation mode: 0 Sync, 1 Constant, 2 Intended.

  • speed – Movement speed parameters (same concept as move-L speed). spd_mode is 0 (%-based) or 1 (absolute/physical value).

  • radius_option – Radius option: 0 None, 1 Rate per revolution, 2 Size per revolution.

  • radius_para – Radius parameter, interpreted according to radius_option.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails, the via/goal point relative-value calculation fails, or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the request result.

IPC::Response_FunctionsT call_move_home(const std::string &robot_model, const int home_type, const int move_type, const MoveSpeedArg &speed, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to move to a home position.

Parameters:
  • robot_model – Name of the robot model.

  • home_type – Home position: 0 Top-Level (Main) Project, 1 Currently running (Sub) Project, 2 Zero Posture, or 3 + N (3-18) for Global Pin N (0-15, see save_globpin_parameter).

  • move_type – Movement type used to reach the home position: 0 Move-J, 1 Move-L.

  • speed – Movement speed parameters. spd_mode is 0 (%-based) or 1 (absolute/physical value).

  • flow_manager_args – Optional PyFM step context. If provided, the movement result is reported to the flow manager immediately, and a background monitor invokes its completion callback once the actual motion finishes, instead of blocking here until then.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the request result.

IPC::Response_FunctionsT call_arc_sensing_off(const std::string &robot_model, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to stop arc sensing (weld seam tracking).

Parameters:
  • robot_model – Name of the robot model.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the request result.

IPC::Response_FunctionsT call_arc_sensing_on(const std::string &robot_model, const int control_type, const int data_grab_point, const int data_grab_saturation_mode, const float data_grab_saturation_l, const float data_grab_saturation_u, const float data_grab_filter_hz, const int data_grab_weighting_mode, const float t1, const float t2, const int dep_target_method, const float dep_target_a, const int sid_target_method, const float sid_target_a, const float gain_dep_p, const float gain_dep_i, const float gain_dep_a, const float max_dep_dev, const float gain_sid_p, const float gain_sid_i, const float gain_sid_a, const float max_sid_dev, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to start arc sensing (weld seam tracking).

Parameters:
  • robot_model – Name of the robot model.

  • control_type – Control mode: 0 RT (Full Cycle), 1 RT (Half Cycle), 2 Every Full Cycle, 3 Every Half Cycle.

  • data_grab_point – Sensing data source: 0-3 for Analog Input 0-3.

  • data_grab_saturation_mode – Sensing saturation mode: 0 No Saturation, 1 Saturation with Lower/Upper limit, 2 Saturation with hold.

  • data_grab_saturation_l – Sensing saturation lower limit.

  • data_grab_saturation_u – Sensing saturation upper limit.

  • data_grab_filter_hz – Sensing data low-pass filter, in Hz (default 20).

  • data_grab_weighting_mode – Sensing weighting mode: 0 Curve Weight (default), 1 Even Weight, 2 Linear Weight, 3 Reduced Linear Weight.

  • t1 – T1 time, in seconds.

  • t2 – T2 time, in seconds.

  • dep_target_method – Depth-direction target method: 0 Desired Value, 1 Average between T1/T2 (default).

  • dep_target_a – Depth-direction desired value (default 0), interpreted when dep_target_method is 0.

  • sid_target_method – Weave-direction target method: 0 Desired Value (default), 1 Average between T1/T2.

  • sid_target_a – Weave-direction desired value (default 0), interpreted when sid_target_method is 0.

  • gain_dep_p – Depth-direction P gain (default 0).

  • gain_dep_i – Depth-direction I gain (default 0).

  • gain_dep_a – Depth-direction anti-windup gain (default 0).

  • max_dep_dev – Depth-direction max deviation, in mm (default 10).

  • gain_sid_p – Weave-direction P gain (default 0).

  • gain_sid_i – Weave-direction I gain (default 0).

  • gain_sid_a – Weave-direction anti-windup gain (default 0).

  • max_sid_dev – Weave-direction max deviation, in mm (default 10).

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the request result.

IPC::Response_FunctionsT call_arc_sensing_change_target(const std::string &robot_model, const float t1, const float t2, const int dep_target_method, const float dep_target_a, const int sid_target_method, const float sid_target_a, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to change active arc sensing’s target parameters.

Parameters:
  • robot_model – Name of the robot model.

  • t1 – T1 time, in seconds.

  • t2 – T2 time, in seconds.

  • dep_target_method – Depth-direction target method: 0 Desired Value, 1 Average between T1/T2 (default).

  • dep_target_a – Depth-direction desired value (default 0), interpreted when dep_target_method is 0.

  • sid_target_method – Weave-direction target method: 0 Desired Value (default), 1 Average between T1/T2.

  • sid_target_a – Weave-direction desired value (default 0), interpreted when sid_target_method is 0.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the request result.

IPC::Response_FunctionsT call_arc_sensing_change_gain(const std::string &robot_model, const float gain_dep_p, const float gain_dep_i, const float gain_dep_a, const float max_dep_dev, const float gain_sid_p, const float gain_sid_i, const float gain_sid_a, const float max_sid_dev, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to change active arc sensing’s gain parameters.

Parameters:
  • robot_model – Name of the robot model.

  • gain_dep_p – Depth-direction P gain (default 0).

  • gain_dep_i – Depth-direction I gain (default 0).

  • gain_dep_a – Depth-direction anti-windup gain (default 0).

  • max_dep_dev – Depth-direction max deviation, in mm (default 10).

  • gain_sid_p – Weave-direction P gain (default 0).

  • gain_sid_i – Weave-direction I gain (default 0).

  • gain_sid_a – Weave-direction anti-windup gain (default 0).

  • max_sid_dev – Weave-direction max deviation, in mm (default 10).

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the request result.

IPC::Response_FunctionsT call_admittance_force_off(const std::string &robot_model, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to stop admittance force control.

Parameters:
  • robot_model – Name of the robot model.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the request result.

IPC::Response_FunctionsT call_admittance_force_on(const std::string &robot_model, const int frame, const int enable_x, const int enable_y, const int enable_z, const int enable_rx, const int enable_ry, const int enable_rz, const float target_x, const float target_y, const float target_z, const float target_rx, const float target_ry, const float target_rz, const float pgain_x, const float pgain_y, const float pgain_z, const float pgain_rx, const float pgain_ry, const float pgain_rz, const float igain_x, const float igain_y, const float igain_z, const float igain_rx, const float igain_ry, const float igain_rz, const float spdlim_x, const float spdlim_y, const float spdlim_z, const float spdlim_rx, const float spdlim_ry, const float spdlim_rz, const float max_dev_pos, const float max_dev_rot, const int sensor_type, const float sensor_cutoffhz, const int sensor_handle, const float contact_force, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to start admittance force control.

Parameters:
  • robot_model – Name of the robot model.

  • frame – Target frame: 0 Global, 1 Local, 2 User, 3 Target.

  • enable_x – Enable X axis (0/1, default 0/unchecked).

  • enable_y – Enable Y axis (0/1, default 0/unchecked).

  • enable_z – Enable Z axis (0/1, default 0/unchecked).

  • enable_rx – Enable Rx axis (0/1, default 0/unchecked).

  • enable_ry – Enable Ry axis (0/1, default 0/unchecked).

  • enable_rz – Enable Rz axis (0/1, default 0/unchecked).

  • target_x – Target force/torque along X (default 0).

  • target_y – Target force/torque along Y (default 0).

  • target_z – Target force/torque along Z (default 0).

  • target_rx – Target force/torque around Rx (default 0).

  • target_ry – Target force/torque around Ry (default 0).

  • target_rz – Target force/torque around Rz (default 0).

  • pgain_x – X-axis P gain (default 1).

  • pgain_y – Y-axis P gain (default 1).

  • pgain_z – Z-axis P gain (default 1).

  • pgain_rx – Rx-axis P gain (default 1).

  • pgain_ry – Ry-axis P gain (default 1).

  • pgain_rz – Rz-axis P gain (default 1).

  • igain_x – X-axis I gain (default 0).

  • igain_y – Y-axis I gain (default 0).

  • igain_z – Z-axis I gain (default 0).

  • igain_rx – Rx-axis I gain (default 0).

  • igain_ry – Ry-axis I gain (default 0).

  • igain_rz – Rz-axis I gain (default 0).

  • spdlim_x – X-axis speed limit (default 0).

  • spdlim_y – Y-axis speed limit (default 0).

  • spdlim_z – Z-axis speed limit (default 0).

  • spdlim_rx – Rx-axis speed limit (default 0).

  • spdlim_ry – Ry-axis speed limit (default 0).

  • spdlim_rz – Rz-axis speed limit (default 0).

  • max_dev_pos – Position max deviation, in mm.

  • max_dev_rot – Rotation max deviation, in degrees.

  • sensor_type – Force/torque sensor source: 0 External F/T, 1 Internal F/T, 2-5 Analog Input 0-3, 6 Custom.

  • sensor_cutoffhz – Sensor low-pass filter, in Hz (default 20).

  • sensor_handle – Sensor signal option: 0 Auto Nulling, 1 Raw Value.

  • contact_force – Contact detection force, in N (default 5).

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the request result.

IPC::Response_FunctionsT call_admittance_force_change(const std::string &robot_model, const int frame, const int enable_x, const int enable_y, const int enable_z, const int enable_rx, const int enable_ry, const int enable_rz, const float target_x, const float target_y, const float target_z, const float target_rx, const float target_ry, const float target_rz, const float pgain_x, const float pgain_y, const float pgain_z, const float pgain_rx, const float pgain_ry, const float pgain_rz, const float igain_x, const float igain_y, const float igain_z, const float igain_rx, const float igain_ry, const float igain_rz, const float spdlim_x, const float spdlim_y, const float spdlim_z, const float spdlim_rx, const float spdlim_ry, const float spdlim_rz, const float max_dev_pos, const float max_dev_rot, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to change active admittance force control’s parameters.

Same fields as call_admittance_force_on except sensor/contact-force settings, which cannot be changed while active.

Parameters:
  • robot_model – Name of the robot model.

  • frame – Target frame: 0 Global, 1 Local, 2 User, 3 Target.

  • enable_x – Enable X axis (0/1, default 0/unchecked).

  • enable_y – Enable Y axis (0/1, default 0/unchecked).

  • enable_z – Enable Z axis (0/1, default 0/unchecked).

  • enable_rx – Enable Rx axis (0/1, default 0/unchecked).

  • enable_ry – Enable Ry axis (0/1, default 0/unchecked).

  • enable_rz – Enable Rz axis (0/1, default 0/unchecked).

  • target_x – Target force/torque along X (default 0).

  • target_y – Target force/torque along Y (default 0).

  • target_z – Target force/torque along Z (default 0).

  • target_rx – Target force/torque around Rx (default 0).

  • target_ry – Target force/torque around Ry (default 0).

  • target_rz – Target force/torque around Rz (default 0).

  • pgain_x – X-axis P gain (default 1).

  • pgain_y – Y-axis P gain (default 1).

  • pgain_z – Z-axis P gain (default 1).

  • pgain_rx – Rx-axis P gain (default 1).

  • pgain_ry – Ry-axis P gain (default 1).

  • pgain_rz – Rz-axis P gain (default 1).

  • igain_x – X-axis I gain (default 0).

  • igain_y – Y-axis I gain (default 0).

  • igain_z – Z-axis I gain (default 0).

  • igain_rx – Rx-axis I gain (default 0).

  • igain_ry – Ry-axis I gain (default 0).

  • igain_rz – Rz-axis I gain (default 0).

  • spdlim_x – X-axis speed limit (default 0).

  • spdlim_y – Y-axis speed limit (default 0).

  • spdlim_z – Z-axis speed limit (default 0).

  • spdlim_rx – Rx-axis speed limit (default 0).

  • spdlim_ry – Ry-axis speed limit (default 0).

  • spdlim_rz – Rz-axis speed limit (default 0).

  • max_dev_pos – Position max deviation, in mm.

  • max_dev_rot – Rotation max deviation, in degrees.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the request result.

IPC::Response_FunctionsT call_servo_j(const std::string &robot_model, IPC::MoveInput_TargetT target, const float t1, const float t2, const float gain, const float filter, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to queue a joint-space servo target segment.

Streaming/realtime joint control: each call queues one target segment to move smoothly toward from wherever the previous segment left off, rather than performing one discrete move. Intended to be called repeatedly (e.g. once per control tick) to stream a trajectory.

Parameters:
  • robot_model – Name of the robot model.

  • target – Target joint position and frame information. tar_frame is -1 Joint, 0 Global, 1 Tool, 2 User, or 3 Target frame; tar_unit is 0 mm/deg, 1 m/rad, or 2 inch/deg.

  • t1 – Time to move from the previous target to this one, in seconds (must be >= 0).

  • t2 – Additional hold/settle time after reaching the target, in seconds (valid range (0, 5]).

  • gain – Speed scaling gain applied to this segment (must be > 0).

  • filter – Output low-pass filter strength.

  • flow_manager_args – Optional PyFM step context. If provided, the movement result is reported to the flow manager immediately, and a background monitor invokes its completion callback once the actual motion finishes, instead of blocking here until then.

Throws:

std::runtime_error – If the query fails, t1 / t2 / gain are out of their valid ranges, or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the request result.

void pub_servo_j(const std::string &robot_model, IPC::MoveInput_TargetT target, const float t1, const float t2, const float gain, const float filter, FlowManagerArgsPtr flow_manager_args = nullptr)#

Publishes a joint-space servo target segment without waiting for a response.

Fire-and-forget counterpart to call_servo_j: queues one target segment the same way, but publishes it (real-time priority, dropping under congestion) instead of querying and does not report failures back to the caller.

Parameters:
  • robot_model – Name of the robot model.

  • target – Target joint position and frame information. tar_frame is -1 Joint, 0 Global, 1 Tool, 2 User, or 3 Target frame; tar_unit is 0 mm/deg, 1 m/rad, or 2 inch/deg.

  • t1 – Time to move from the previous target to this one, in seconds (must be >= 0).

  • t2 – Additional hold/settle time after reaching the target, in seconds (valid range (0, 5]).

  • gain – Speed scaling gain applied to this segment (must be > 0).

  • filter – Output low-pass filter strength.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) right after publishing, without confirming the robot received or accepted it.

IPC::Response_FunctionsT call_servo_l(const std::string &robot_model, IPC::MoveInput_TargetT target, const float t1, const float t2, const float gain, const float filter, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to queue a Cartesian-space servo target segment.

Streaming/realtime Cartesian control: each call queues one target segment to move smoothly toward from wherever the previous segment left off, rather than performing one discrete move. Intended to be called repeatedly (e.g. once per control tick) to stream a trajectory.

Parameters:
  • robot_model – Name of the robot model.

  • target – Target position and frame information. tar_frame is -1 Joint, 0 Global, 1 Tool, 2 User, or 3 Target frame; tar_unit is 0 mm/deg, 1 m/rad, or 2 inch/deg.

  • t1 – Time to move from the previous target to this one, in seconds (must be >= 0).

  • t2 – Additional hold/settle time after reaching the target, in seconds (must be > 0).

  • gain – Speed scaling gain applied to this segment (must be > 0).

  • filter – Output low-pass filter strength.

  • flow_manager_args – Optional PyFM step context. If provided, the movement result is reported to the flow manager immediately, and a background monitor invokes its completion callback once the actual motion finishes, instead of blocking here until then.

Throws:

std::runtime_error – If the query fails, t1 / t2 / gain are out of their valid ranges, or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the request result.

void pub_servo_l(const std::string &robot_model, IPC::MoveInput_TargetT target, const float t1, const float t2, const float gain, const float filter, FlowManagerArgsPtr flow_manager_args = nullptr)#

Publishes a Cartesian-space servo target segment without waiting for a response.

Fire-and-forget counterpart to call_servo_l: queues one target segment the same way, but publishes it (real-time priority, dropping under congestion) instead of querying and does not report failures back to the caller.

Parameters:
  • robot_model – Name of the robot model.

  • target – Target position and frame information. tar_frame is -1 Joint, 0 Global, 1 Tool, 2 User, or 3 Target frame; tar_unit is 0 mm/deg, 1 m/rad, or 2 inch/deg.

  • t1 – Time to move from the previous target to this one, in seconds (must be >= 0).

  • t2 – Additional hold/settle time after reaching the target, in seconds (must be > 0).

  • gain – Speed scaling gain applied to this segment (must be > 0).

  • filter – Output low-pass filter strength.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) right after publishing, without confirming the robot received or accepted it.

IPC::Response_FunctionsT call_online_j(const std::string &robot_model, const IPC::MoveInput_TargetT &target, const MoveSpeedArg &speed, const float timeout, const float filter, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to queue a joint-space online-tracking target.

Streaming/realtime joint control, intended to be called repeatedly (e.g. once per communication cycle) to keep feeding a moving target; if only one target is queued when the robot’s control loop next reads it, older undelivered targets are discarded and the latest one wins.

Parameters:
  • robot_model – Name of the robot model.

  • target – Target joint position and frame information. tar_frame is -1 Joint, 0 Global, 1 Tool, 2 User, or 3 Target frame; tar_unit is 0 mm/deg, 1 m/rad, or 2 inch/deg.

  • speed – Movement speed parameters — spd_vel_para/spd_acc_para act as the max velocity/acceleration for this segment and must be positive (not near zero). spd_mode is 0 (%-based) or 1 (absolute/physical value).

  • timeout – Communication-loss timeout, in seconds (range 0-10): if no new target is queued within this time after the last one was consumed, the motion is considered finished. Rule of thumb: (1 / your call rate) + a small margin — e.g. 0.02 for 100Hz, 0.01 for 200Hz. Too small a value can trigger a false finish from ordinary communication jitter.

  • filter – Output smoothing filter value.

  • flow_manager_args – Optional PyFM step context. If provided, the movement result is reported to the flow manager immediately, and a background monitor invokes its completion callback once the actual motion finishes, instead of blocking here until then.

Throws:

std::runtime_error – If the query fails, any input is non-finite or out of range, or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the request result.

void pub_online_j(const std::string &robot_model, const IPC::MoveInput_TargetT &target, const MoveSpeedArg &speed, const float timeout, const float filter, FlowManagerArgsPtr flow_manager_args = nullptr)#

Publishes a joint-space online-tracking target without waiting for a response.

Fire-and-forget counterpart to call_online_j: queues the target the same way, but publishes it (real-time priority, dropping under congestion) instead of querying and does not report failures back to the caller.

Parameters:
  • robot_model – Name of the robot model.

  • target – Target joint position and frame information. tar_frame is -1 Joint, 0 Global, 1 Tool, 2 User, or 3 Target frame; tar_unit is 0 mm/deg, 1 m/rad, or 2 inch/deg.

  • speed – Movement speed parameters — spd_vel_para/spd_acc_para act as the max velocity/acceleration for this segment and must be positive (not near zero). spd_mode is 0 (%-based) or 1 (absolute/physical value).

  • timeout – Communication-loss timeout, in seconds (range 0-10); see call_online_j for the full explanation.

  • filter – Output smoothing filter value.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) right after publishing, without confirming the robot received or accepted it.

IPC::Response_FunctionsT call_online_l(const std::string &robot_model, const IPC::MoveInput_TargetT &target, const MoveSpeedArg &speed, const float timeout, const float filter, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to queue a Cartesian-space online-tracking target.

Streaming/realtime Cartesian control, intended to be called repeatedly (e.g. once per communication cycle) to keep feeding a moving target; if only one target is queued when the robot’s control loop next reads it, older undelivered targets are discarded and the latest one wins.

Parameters:
  • robot_model – Name of the robot model.

  • target – Target position and frame information. tar_frame is -1 Joint, 0 Global, 1 Tool, 2 User, or 3 Target frame; tar_unit is 0 mm/deg, 1 m/rad, or 2 inch/deg.

  • speed – Movement speed parameters — spd_vel_para/spd_acc_para act as the max velocity/acceleration for this segment and must be positive (not near zero). spd_mode is 0 (%-based) or 1 (absolute/physical value).

  • timeout – Communication-loss timeout, in seconds (range 0-10): if no new target is queued within this time after the last one was consumed, the motion is considered finished. Rule of thumb: (1 / your call rate) + a small margin — e.g. 0.02 for 100Hz, 0.01 for 200Hz. Too small a value can trigger a false finish from ordinary communication jitter.

  • filter – Output smoothing filter value.

  • flow_manager_args – Optional PyFM step context. If provided, the movement result is reported to the flow manager immediately, and a background monitor invokes its completion callback once the actual motion finishes, instead of blocking here until then.

Throws:

std::runtime_error – If the query fails, any input is non-finite or out of range, or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the request result.

void pub_online_l(const std::string &robot_model, const IPC::MoveInput_TargetT &target, const MoveSpeedArg &speed, const float timeout, const float filter, FlowManagerArgsPtr flow_manager_args = nullptr)#

Publishes a Cartesian-space online-tracking target without waiting for a response.

Fire-and-forget counterpart to call_online_l: queues the target the same way, but publishes it (real-time priority, dropping under congestion) instead of querying and does not report failures back to the caller.

Parameters:
  • robot_model – Name of the robot model.

  • target – Target position and frame information. tar_frame is -1 Joint, 0 Global, 1 Tool, 2 User, or 3 Target frame; tar_unit is 0 mm/deg, 1 m/rad, or 2 inch/deg.

  • speed – Movement speed parameters — spd_vel_para/spd_acc_para act as the max velocity/acceleration for this segment and must be positive (not near zero). spd_mode is 0 (%-based) or 1 (absolute/physical value).

  • timeout – Communication-loss timeout, in seconds (range 0-10); see call_online_l for the full explanation.

  • filter – Output smoothing filter value.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) right after publishing, without confirming the robot received or accepted it.

IPC::Response_FunctionsT call_timestamp_j(const std::string &robot_model, const IPC::MoveInput_TargetT &j_ang, const IPC::MoveInput_TargetT &j_vel, const IPC::MoveInput_TargetT &j_acc, const int polynomial, const float timestamp, const float timeout, const float filter, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to queue a keyframe-timed joint-space target.

Streaming/realtime joint control: each call queues one keyframe (angle, velocity, and acceleration) at a given timestamp along a continuous internal timeline, and the robot interpolates a polynomial trajectory between consecutive keyframes. This differs from call_servo_j, which specifies each segment as a relative duration (t1) from wherever the previous segment left off — here timestamp is a point on an absolute, ever-accumulating clock, so keyframes must be queued with strictly increasing timestamps.

Parameters:
  • robot_model – Name of the robot model.

  • j_ang – Target joint angles for this keyframe.

  • j_vel – Target joint velocities for this keyframe. Ignored when polynomial is 2 (linear).

  • j_acc – Target joint accelerations for this keyframe. Only used when polynomial is 1 (5th order).

  • polynomial – Trajectory interpolation order between this keyframe and the previous one: 0 3rd order (uses j_ang and j_vel), 1 5th order (uses j_ang, j_vel, and j_acc), 2 1st order/linear (uses j_ang only).

  • timestamp – Absolute time, in seconds on the internal motion timeline, at which this keyframe should be reached.

  • timeout – Communication-loss timeout, in seconds: if no new keyframe is queued within this time after the last one was reached, the motion is considered finished.

  • filter – Output low-pass filter strength.

  • flow_manager_args – Optional PyFM step context. If provided, the movement result is reported to the flow manager immediately, and a background monitor invokes its completion callback once the actual motion finishes, instead of blocking here until then.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the request result.

void pub_timestamp_j(const std::string &robot_model, const IPC::MoveInput_TargetT &j_ang, const IPC::MoveInput_TargetT &j_vel, const IPC::MoveInput_TargetT &j_acc, const int polynomial, const float timestamp, const float timeout, const float filter, FlowManagerArgsPtr flow_manager_args = nullptr)#

Publishes a keyframe-timed joint-space target without waiting for a response.

Fire-and-forget counterpart to call_timestamp_j: queues one keyframe the same way, but publishes it (real-time priority, dropping under congestion) instead of querying and does not report failures back to the caller.

Parameters:
  • robot_model – Name of the robot model.

  • j_ang – Target joint angles for this keyframe.

  • j_vel – Target joint velocities for this keyframe. Ignored when polynomial is 2 (linear).

  • j_acc – Target joint accelerations for this keyframe. Only used when polynomial is 1 (5th order).

  • polynomial – Trajectory interpolation order between this keyframe and the previous one; see call_timestamp_j for the full explanation.

  • timestamp – Absolute time, in seconds on the internal motion timeline, at which this keyframe should be reached.

  • timeout – Communication-loss timeout, in seconds; see call_timestamp_j for the full explanation.

  • filter – Output low-pass filter strength.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) right after publishing, without confirming the robot received or accepted it.

IPC::Response_FunctionsT call_servo_t(const std::string &robot_model, std::optional<std::vector<float>> target, const float time_out, const int option, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to start joint-space torque (compliance) control.

Unlike the position-based servo/online/timestamp motions above, this commands per-joint target torques directly rather than a target pose. The robot must be idle (no other motion in progress) when this is called, or the request is rejected.

Parameters:
  • robot_model – Name of the robot model.

  • target – Target torque for each joint, in the same order as the robot’s joints. Must have exactly as many elements as the robot has joints, or the firmware rejects the request.

  • time_out – Maximum duration to hold this torque command, in seconds (valid range [0.0001, 10]).

  • option – Which compensation terms are combined with target: 0 Gravity + Friction feedforward + User target, 1 Gravity + User target, 2 Friction feedforward + User target, 3 User target only.

  • flow_manager_args – Optional PyFM step context. If provided, the movement result is reported to the flow manager immediately, and a background monitor invokes its completion callback once the actual motion finishes, instead of blocking here until then.

Throws:

std::runtime_error – If target is not provided, the query fails, or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the request result.

void pub_servo_t(const std::string &robot_model, std::optional<std::vector<float>> target, const float time_out, const int option, FlowManagerArgsPtr flow_manager_args = nullptr)#

Publishes a joint-space torque (compliance) control target without waiting for a response.

Fire-and-forget counterpart to call_servo_t: sends the same torque command, but publishes it (real-time priority, dropping under congestion) instead of querying and does not report failures back to the caller.

Parameters:
  • robot_model – Name of the robot model.

  • target – Target torque for each joint; see call_servo_t for the full explanation.

  • time_out – Maximum duration to hold this torque command, in seconds (valid range [0.0001, 10]).

  • option – Which compensation terms are combined with target; see call_servo_t for the full explanation.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) right after publishing, without confirming the robot received or accepted it.

Throws:

std::runtime_error – If target is not provided.

IPC::Response_FunctionsT call_wrapper_servo_l_on(const std::string &robot_model, const IPC::MoveInput_TargetT &target, float time_gap, const float filter, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to start (or queue a target for) wrapper-layer Cartesian servo tracking.

Streaming/realtime Cartesian control, similar in purpose to call_servo_l, but runs in the firmware’s separate “wrapper” motion layer (the same layer used by call_tcp_weaving_on, call_admittance_force_on, and call_base_conveyor_on) rather than the main move sequencer. Each call queues one target to move smoothly toward from wherever the previous target left off; intended to be called repeatedly (e.g. once per control tick) to stream a trajectory. Call call_wrapper_servo_l_off to stop tracking.

Parameters:
  • robot_model – Name of the robot model.

  • target – Target position and frame information. tar_frame is -1 Joint, 0 Global, 1 Tool, 2 User, or 3 Target frame; tar_unit is 0 mm/deg, 1 m/rad, or 2 inch/deg.

  • time_gap – Time to move from the previous target to this one, in seconds (valid range [0, 30]).

  • filter – Output low-pass filter strength.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails, time_gap is out of range, or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the request result.

IPC::Response_FunctionsT call_wrapper_servo_l_off(const std::string &robot_model, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to stop wrapper-layer Cartesian servo tracking.

Stops the tracking started by call_wrapper_servo_l_on.

Parameters:
  • robot_model – Name of the robot model.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the request result.

void pub_wrapper_servo_l_on(const std::string &robot_model, const IPC::MoveInput_TargetT &target, float time_gap, const float filter, FlowManagerArgsPtr flow_manager_args = nullptr)#

Publishes a wrapper-layer Cartesian servo target without waiting for a response.

Fire-and-forget counterpart to call_wrapper_servo_l_on: queues one target the same way, but publishes it (real-time priority, dropping under congestion) instead of querying and does not report failures back to the caller.

Parameters:
  • robot_model – Name of the robot model.

  • target – Target position and frame information. tar_frame is -1 Joint, 0 Global, 1 Tool, 2 User, or 3 Target frame; tar_unit is 0 mm/deg, 1 m/rad, or 2 inch/deg.

  • time_gap – Time to move from the previous target to this one, in seconds (valid range [0, 30]).

  • filter – Output low-pass filter strength.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) right after publishing, without confirming the robot received or accepted it.

void pub_wrapper_servo_l_off(const std::string &robot_model, FlowManagerArgsPtr flow_manager_args = nullptr)#

Publishes a stop request for wrapper-layer Cartesian servo tracking without waiting for a response.

Fire-and-forget counterpart to call_wrapper_servo_l_off.

Parameters:
  • robot_model – Name of the robot model.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) right after publishing, without confirming the robot received or accepted it.

IPC::Response_Move_WaitT call_move_wait(const std::string &robot_model, float timeout_sec, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to block until the current motion finishes.

Waits, on the robot side, until whatever motion is currently running reaches completion (or no motion is running, in which case this returns immediately).

Parameters:
  • robot_model – Name of the robot model.

  • timeout_sec – Maximum time to wait, in seconds. A negative value (e.g. -1) waits indefinitely, with no timeout.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the response is received, provided its motion_result is 0; a nonzero motion_result raises before flow_manager_args.done() is reached.

Throws:

std::runtime_error – If the query fails, the result cannot be retrieved, or (when flow_manager_args is not provided) motion_result is nonzero.

Returns:

IPC::Response_Move_WaitT whose motion_result field is 0 on success, -1 if the wait timed out, or another value giving the underlying motion’s execution result code.

IPC::Response_FunctionsT call_move_align_tcp(const std::string &robot_model, const MoveSpeedArg &speed, const int target_frame, const float tolerance, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to align its TCP.

Parameters:
  • robot_model – Name of the robot model.

  • speed – Movement speed parameters. spd_mode is 0 (%-based) or 1 (absolute/physical value).

  • target_frame – Reference frame for alignment: 0 Global, 1 Local, or 2 User.

  • tolerance – Align tolerance angle, in degrees.

  • flow_manager_args – Optional PyFM step context. If provided, the movement result is reported to the flow manager immediately, and a background monitor invokes its completion callback once the actual motion finishes, instead of blocking here until then.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the request result.

IPC::Response_FunctionsT call_wrapper_online_l_on(const std::string &robot_model, const IPC::MoveInput_TargetT &target, const MoveSpeedArg &speed, const float timeout, const float filter, FlowManagerArgsPtr flow_manager_args = nullptr)#

Enables online Cartesian offset mode and queues an offset to be added to the currently executing base trajectory.

Intended to be called repeatedly (e.g. once per communication cycle) to keep updating the offset. If multiple offsets are queued before the robot’s control loop reads them, only the latest one is applied and older ones are discarded.

Parameters:
  • robot_model – Name of the robot model.

  • target – Offset added to the base trajectory (x, y, z, rx, ry, rz, (a)) and its frame information. tar_frame is 0 Global, 1 Tool, 2 User, or 3 Target frame; tar_unit is 0 mm/deg, 1 m/rad, or 2 inch/deg.

  • speed – Velocity/acceleration limits for changing the offset. spd_vel_para/spd_acc_para must be positive (not near zero). spd_mode is 0 (%-based) or 1 (absolute/physical value).

  • timeout – Communication-loss timeout, in seconds, range (0, 10]. If no new offset is queued within this time after the last one, online offset mode is automatically turned off. Rule of thumb: (1 / your call rate) + a small margin, e.g. 0.02 for 100 Hz, 0.01 for 200 Hz. Too small a value can turn the mode off unexpectedly due to ordinary communication jitter.

  • filter – Output smoothing filter value, range [0, 1].

  • flow_manager_args – Optional PyFM step context. If provided, the request result is reported to the flow manager immediately, and a background monitor invokes its completion callback once the online offset mode ends, instead of blocking here until then.

Throws:

std::runtime_error – If the query fails, any input is non-finite or out of range, or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the request result.

void pub_wrapper_online_l_on(const std::string &robot_model, const IPC::MoveInput_TargetT &target, const MoveSpeedArg &speed, const float timeout, const float filter, FlowManagerArgsPtr flow_manager_args = nullptr)#

Publishes an online Cartesian offset without waiting for a response.

Fire-and-forget counterpart to call_wrapper_online_l_on(): enables online offset mode and queues the offset the same way, but publishes it (real-time priority, dropped under congestion) instead of querying, and does not report failures back to the caller.

Parameters:
  • robot_model – Name of the robot model.

  • target – Offset added to the base trajectory (x, y, z, rx, ry, rz, (a)) and its frame information. tar_frame is 0 Global, 1 Tool, 2 User, or 3 Target frame; tar_unit is 0 mm/deg, 1 m/rad, or 2 inch/deg.

  • speed – Velocity/acceleration limits for changing the offset. spd_vel_para/spd_acc_para must be positive (not near zero). spd_mode is 0 (%-based) or 1 (absolute/physical value).

  • timeout – Communication-loss timeout, in seconds, range (0, 10]. If no new offset is queued within this time after the last one, online offset mode is automatically turned off. See call_wrapper_online_l_on() for the full explanation.

  • filter – Output smoothing filter value, range [0, 1].

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) right after publishing, without confirming the robot received or accepted it.

IPC::Response_FunctionsT call_wrapper_online_l_off(const std::string &robot_model, FlowManagerArgsPtr flow_manager_args = nullptr)#

Disables online Cartesian offset mode.

Turns off the online offset mode enabled by call_wrapper_online_l_on() without waiting for its timeout to expire. After this call, new offsets are no longer applied to the base trajectory.

Parameters:
  • robot_model – Name of the robot model.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the request result.

void pub_wrapper_online_l_off(const std::string &robot_model, FlowManagerArgsPtr flow_manager_args = nullptr)#

Publishes a request to disable online Cartesian offset mode without waiting for a response.

Fire-and-forget counterpart to call_wrapper_online_l_off(): turns off the online offset mode the same way, but publishes the request (real-time priority, dropped under congestion) instead of querying, and does not report failures back to the caller.

Parameters:
  • robot_model – Name of the robot model.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) right after publishing, without confirming the robot received or accepted it.

Public Static Functions

static inline std::string type_name()#

manipulate/manipulate_point.hpp#

class RBManipulatePointSDK : public RBBaseSDK#

Public Functions

inline RBManipulatePointSDK()#
IPC::Response_FunctionsT set_point(std::string &robot_model, std::string_view move_type, std::optional<std::vector<float>> tar_frame_reference_point, std::optional<float> pnt_para, std::optional<int> pnt_type, int tar_frame, int tar_unit, std::vector<float> tar_values, int spd_mode, float spd_vel_para, float spd_acc_para, std::optional<std::vector<float>> ext_axis, std::optional<int> method, std::optional<std::vector<IPC::Move_Property_EntryT>> properties = std::nullopt, int tcp_num = -1, FlowManagerArgsPtr flow_manager_args = nullptr)#

Dispatches a single-point move request to the matching move function in RBManipulateMoveSDK, keyed by move_type.

This is a thin routing layer: it builds the shared target and speed structs from the flat parameter list below and forwards the call to call_move_j, call_move_l, call_move_jb_add, call_move_lb_add, call_move_pb_add, or call_move_xb_add, matching move_type against the string constants in MoveType (J, L, JB, LB, PB, XB). See those functions’ docstrings for the full behavior of each move type (relative-move * handling, default speed, flow-manager completion semantics, etc.).

Note

For the XB route, method is read via .value() without a null check; passing None for method while using “XB” raises a different, less descriptive error than the explicit checks used for pnt_para / pnt_type.

Parameters:
  • robot_model – Name of the robot model.

  • move_type – Move type selector; must be one of the MoveType constants: “J” (joint-space), “L” (linear/Cartesian-space), “JB” (joint-blend add), “LB” (linear-blend add), “PB” (point-blend add), or “XB” (XB-type blend add). Any other value is rejected.

  • tar_frame_reference_point – Optional reference position used for relative movement calculation, forwarded as the reference_value argument to the J / L / JB / LB / PB routes. Not used for the XB route.

  • pnt_para – Blend parameter, interpreted according to pnt_type. Required (together with pnt_type) for the JB, LB, PB, and XB routes; unused for J and L.

  • pnt_type – Blend type: 0 (Percentage), 1 (Distance), 2 (Linear Type, LB/PB only), or 3 (Corner Type, LB/PB only); pnt_para is a percentage when pnt_type is 0, or millimeters when pnt_type is 1. Required (together with pnt_para) for the JB, LB, PB, and XB routes; unused for J and L.

  • tar_frame – Target coordinate frame: -1 Joint Space, 0 Global Frame, 1 Tool Frame, 2 User Frame, 3 Target Frame.

  • tar_unit – Target coordinate unit: 0 mm/degree, 1 meter/radian, 2 inch/degree.

  • tar_values – Target coordinate values, interpreted according to tar_frame and tar_unit.

  • spd_mode – Speed mode: 0 percentage-based, 1 absolute (physical) values.

  • spd_vel_para – Speed parameter: a percentage when spd_mode is 0, or mm/s (L-type) / degree/s (J-type) when spd_mode is 1.

  • spd_acc_para – Acceleration parameter: a percentage when spd_mode is 0, or mm/s^2 (L-type) / degree/s^2 (J-type) when spd_mode is 1.

  • ext_axis – Optional external axis values, forwarded to the J / L / JB / LB / PB routes. Not used for the XB route.

  • method – Blend method option (0: Joint movement, 1: Linear movement), required for the XB route only; unused for J, L, JB, LB, and PB.

  • tcp_num – Tool slot number to activate before issuing the move, via set_toollist_num. -1 (default) leaves the currently active tool unchanged.

  • flow_manager_args – Optional PyFM step context, forwarded unchanged to the underlying move function; see that function’s docstring for its completion semantics.

Throws:

std::runtime_error – If move_type is not one of the MoveType constants, or if pnt_para / pnt_type is missing for the JB, LB, PB, or XB route.

Returns:

IPC::Response_FunctionsT containing the underlying move function’s request result.

Public Static Functions

static inline std::string type_name()#

manipulate/manipulate_program.hpp#

Enums

enum class Posture#

Values:

enumerator ZERO#
enumerator ONE#
struct SettingOptions#

Public Static Attributes

static constexpr std::string_view USER_FRAME_SELECTION = "USER_FRAME_SELECTION"#
static constexpr std::string_view OUT_COLLISION = "OUT_COLLISION"#
static constexpr std::string_view SELF_COLLISION = "SELF_COLLISION"#
static constexpr std::string_view FIXED_SPEED = "FIXED_SPEED"#
static constexpr std::string_view TARGET_SHIFT = "TARGET_SHIFT"#
static constexpr std::string_view SPEED_BAR = "SPEED_BAR"#
static constexpr std::string_view TIME_CONSTRAINT = "TIME_CONSTRAINT"#
static constexpr std::string_view ASCII_FUNCTION_CALL = "ASCII_FUNCTION_CALL"#
static constexpr std::string_view JOINT_IMPEDANCE = "JOINT_IMPEDANCE"#
static constexpr std::string_view FREE_DRIVE = "FREE_DRIVE"#
static constexpr std::string_view MASTER_MODE = "MASTER_MODE"#
static constexpr std::string_view USER_FRAME_6DOF = "USER_FRAME_6DOF"#
static constexpr std::string_view USER_FRAME_TCP = "USER_FRAME_TCP"#
static constexpr std::string_view USER_FRAME_3POINTS = "USER_FRAME_3POINTS"#
static constexpr std::string_view TARGET_SHIFT_LANDMARK = "TARGET_SHIFT_LANDMARK"#
static constexpr std::string_view PROGRAM_FLOW_MANAGE = "PROGRAM_FLOW_MANAGE"#
static constexpr std::string_view DIN_FUNCTION_MASK = "DIN_FUNCTION_MASK"#
static constexpr std::string_view DOUT_FUNCTION_MASK = "DOUT_FUNCTION_MASK"#
static constexpr std::string_view JACOBIAN_BASED_SPEED_CONTROL = "JACOBIAN_BASED_SPEED_CONTROL"#
static constexpr std::string_view SELF_VIBRATION_MODE = "SELF_VIBRATION_MODE"#
static constexpr std::string_view VIBRATION_MOTION_BASED = "VIBRATION_MOTION_BASED"#
static constexpr std::string_view EXTERNAL_AXIS_SYNC = "EXTERNAL_AXIS_SYNC"#
static constexpr std::string_view TCP_SPEED_BOUND = "TCP_SPEED_BOUND"#
static constexpr std::string_view MOVE_BREAK_BLOCK = "MOVE_BREAK_BLOCK"#
static constexpr std::string_view JOINT_REFERENCE_FILTER = "JOINT_REFERENCE_FILTER"#
static constexpr std::string_view SELF_COLL_DETECT_BLIND = "SELF_COLL_DETECT_BLIND"#
static constexpr std::string_view JOINT_ORIGIN_CALIBRATION = "JOINT_ORIGIN_CALIBRATION"#
static constexpr std::string_view WRIST_SINGULARITY_MODE = "WRIST_SINGULARITY_MODE"#
static constexpr std::string_view OPERATION_RANGE_CHECK = "OPERATION_RANGE_CHECK"#
static constexpr std::string_view EXTFT_SOFTWARE_NULLING = "EXTFT_SOFTWARE_NULLING"#
static constexpr std::string_view SAVE_DATALOG = "SAVE_DATALOG"#
struct PinType#

Public Static Attributes

static constexpr std::string_view POINT = "POINT"#
static constexpr std::string_view JOINT = "JOINT"#
struct Project#

Public Static Attributes

static constexpr std::string_view MAIN = "MAIN"#
static constexpr std::string_view SUB = "SUB"#
class RBManipulateProgramSDK : public RBBaseSDK#

Public Functions

inline RBManipulateProgramSDK()#
IPC::Response_FunctionsT call_resume(const std::string &robot_model)#

Requests the cobot to resume motion.

Resumes motion previously paused via call_pause, so the in-progress move/program can continue from where it left off.

Parameters:

robot_model – Name of the robot model.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the resume request result.

IPC::Response_FunctionsT call_pause(const std::string &robot_model)#

Requests the cobot to pause motion.

Temporarily pauses in-progress motion; call call_resume afterward to continue from where it was paused.

Parameters:

robot_model – Name of the robot model.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the pause request result.

IPC::Response_FunctionsT call_halt(const std::string &robot_model)#

Requests the cobot to stop motion entirely.

Fully stops in-progress motion, as opposed to call_pause's temporary pause (which can be continued via call_resume).

Parameters:

robot_model – Name of the robot model.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the halt request result.

std::optional<IPC::Response_FunctionsT> call_program_before(const std::string &robot_model, const int option, std::optional<std::vector<std::string>> monitoring_name)#

Requests the cobot to run setup before a program starts.

Called before a program begins execution: the firmware stops all in-progress motion, clears special DIN/DOUT masks, speed saturation, move-break, jacobian reflection mode, manual/landmark target shift, fixed speed/time, and arc-sensing/pattern state, resetting the robot to a clean state for the new program. Also registers the given system variables to monitor while the program runs.

Note

Does not throw on a Zenoh no-reply or peer error response. Other runtime errors still propagate because they usually indicate local decode/SDK bugs rather than a silent robot.

Note

monitoring_name is optional; when omitted it is sent as an empty list

Note

The firmware requires the robot to be idle; if motion is still in progress it returns a warning result instead of performing the reset (this SDK call does not itself throw on that warning — only on a missing/failed response).

Parameters:
  • robot_model – Name of the robot model.

  • option – Currently ignored by the firmware (received but cast away unused); no option values are assigned or documented anywhere in the request schema.

  • monitoring_name – Names of the system variables to monitor.

Returns:

IPC::Response_FunctionsT containing the request result, or std::nullopt if the robot did not reply (or replied with an error) — that case is logged and swallowed so a silent robot does not block the program from starting.

std::optional<IPC::Response_FunctionsT> call_program_after(const std::string &robot_model, const int option)#

Requests the cobot to run teardown after a program ends.

Called after a program finishes execution, pairing with call_program_before which runs beforehand. The firmware resumes any paused motion, stops all in-progress motion, restores the user-frame, area, out/self-collision, and TCP parameters that were in effect before the program ran, clears special DIN/DOUT masks, speed saturation, move-break, jacobian reflection mode, manual/landmark target shift, and fixed speed/time, and stops any running pattern.

Note

Does not throw on a Zenoh no-reply or peer error response. Other runtime errors still propagate because they usually indicate local decode/SDK bugs rather than a silent robot.

Parameters:
  • robot_model – Name of the robot model.

  • option – Currently ignored by the firmware (received but cast away unused); no option values are assigned or documented anywhere in the request schema.

Returns:

IPC::Response_FunctionsT containing the request result, or std::nullopt if the robot did not reply (or replied with an error) — that case is logged and swallowed so a silent robot does not block the program from finishing.

std::optional<IPC::Response_FunctionsT> set_begin(const std::string &robot_model, std::optional<std::vector<float>> position, std::optional<float> speed_ratio, FlowManagerArgsPtr flow_manager_args = nullptr)#

Captures the robot’s current pose into PyFM local variables as the task’s “begin” position.

Only operates within a PyFM step context: if flow_manager_args is not provided, this performs no action and immediately returns std::nullopt. Reads the robot’s current joint/Cartesian reference pose from the {robot_model}/state_core topic and stores it under MANIPULATE_BEGIN_JOINTS/MANIPULATE_BEGIN_CARTES in the PyFM local variables; if the current step is not inside a sub-task (its PyFM context has an empty sub_task_list), the same values are also stored under MAIN_MANIPULATE_BEGIN_JOINTS/MAIN_MANIPULATE_BEGIN_CARTES. If position / speed_ratio are given, they override MANIPULATE_BEGIN_JOINTS / MANIPULATE_BEGIN_SPEED_RATIO (and, for a main task, the corresponding MAIN_* variant) instead of the values read from the robot. Finally registers the resulting joint pose with the robot as its home joint info (set_home_joint_info: home_type 0 for a main task, 1 otherwise) so position_home can later move back to it.

Note

On failure (state_core read error or a failed set_home_joint_info result), MANIPULATE_BEGIN_JOINTS and MANIPULATE_BEGIN_CARTES are reset to seven zeros, the exception is caught and not re-thrown, and flow_manager_args.done() is still called so the PyFM step completes.

Parameters:
  • robot_model – Name of the robot model.

  • position – Optional joint-angle override for MANIPULATE_BEGIN_JOINTS (and MAIN_MANIPULATE_BEGIN_JOINTS for a main task); if omitted, the joint pose read from state_core is used.

  • speed_ratio – Optional override for MANIPULATE_BEGIN_SPEED_RATIO (and MAIN_MANIPULATE_BEGIN_SPEED_RATIO for a main task).

  • flow_manager_args – PyFM step context. Required in practice — despite the optional type, omitting it makes this function a no-op that returns std::nullopt.

Returns:

IPC::Response_FunctionsT wrapping the set_home_joint_info result, or std::nullopt if flow_manager_args was not provided, or if reading state_core / setting the home joint info failed (in which case the begin-position local variables are instead reset to a seven-value zero pose).

void position_home(const std::string &robot_model, std::string_view move_type, Posture posture, std::string_view project, float spd_vel_ratio, float spd_acc_ratio, FlowManagerArgsPtr flow_manager_args = nullptr)#

Moves the robot back to the begin position previously captured by set_begin.

Reads the MANIPULATE_BEGIN_* / MAIN_MANIPULATE_BEGIN_* PyFM local variables set by set_begin and issues a call_move_j or call_move_l back to that pose, scaled by the speed ratio also captured by set_begin. If none of those local variables were ever set (i.e. set_begin never ran successfully in this task), or if the specific pose requested by posture / move_type / project is missing, this is a no-op that only calls flow_manager_args.done(). A posture other than Posture::ZERO moves to the zero pose rather than to a captured one.

Parameters:
  • robot_model – Name of the robot model.

  • move_type – Move type: MoveType::J for a joint-space move back to MANIPULATE_BEGIN_JOINTS, or MoveType::L for a Cartesian move back to MANIPULATE_BEGIN_CARTES.

  • posture – Posture::ZERO (Project Home Posture) reads the captured begin position and performs the move described above. Any other value (Posture::ONE = Joint Zero Posture) moves to a seven-value zero pose instead, without consulting the captured begin variables.

  • project – Project::MAIN reads the MAIN_MANIPULATE_BEGIN_* / MAIN_MANIPULATE_BEGIN_SPEED_RATIO variables (the outermost task’s begin position); Project::SUB reads the plain MANIPULATE_BEGIN_* / MANIPULATE_BEGIN_SPEED_RATIO variables (the current task’s own begin position, main or sub).

  • spd_vel_ratio – Velocity scale factor, multiplied by the speed ratio captured by set_begin (defaults to 1.0 if none was captured) to form the move’s spd_vel_para.

  • spd_acc_ratio – Acceleration scale factor, multiplied by the same captured speed ratio to form the move’s spd_acc_para.

  • flow_manager_args – PyFM step context. Required: passing nullptr raises std::runtime_error, matching the RuntimeError the legacy Python implementation raises for the same case.

Throws:

std::runtime_error – If flow_manager_args is not provided, or if the underlying call_move_j / call_move_l fails.

std::optional<IPC::Response_Get_ValueT> set_pin_point_or_joint(std::string &robot_model, IPC::MoveInput_TargetT target, std::optional<std::vector<float>> reference_target, std::string_view pin_type, FlowManagerArgsPtr flow_manager_args = nullptr)#

Computes and stores a pin’s target value into the PyFM execution context.

Only operates within a PyFM step context: if flow_manager_args is not provided, this performs no calculation and immediately returns std::nullopt. When reference_target is given, the pin value is computed relative to it (via the SDK’s relative-value calculation); otherwise it is computed as an absolute value. If flow_manager_args carries a “variable_name” entry in its args, the resulting tar_values are stored under that name in the PyFM local variables.

Parameters:
  • robot_model – Name of the robot model.

  • target – Target position/joint values and frame information used as the pin’s (relative) target. tar_frame is -1 Joint, 0 Global, 1 Tool, 2 User, or 3 Target frame; tar_unit is 0 mm/deg, 1 m/rad, or 2 inch/deg.

  • reference_target – Optional reference values used for relative calculation; if omitted, an absolute value is computed instead.

  • pin_type – Pin type: “POINT” for a Cartesian-space pin, or “JOINT” for a joint-space pin.

  • flow_manager_args – PyFM step context. Required in practice — despite the optional type, omitting it makes this function a no-op that returns std::nullopt.

Throws:

std::runtime_error – If the relative or absolute value calculation fails.

Returns:

IPC::Response_Get_ValueT containing the calculated value, or std::nullopt if flow_manager_args was not provided.

std::optional<IPC::Response_FunctionsT> tool_out(const std::string &robot_model, const int tool_voltage, std::vector<IPC::Request_Flange_Digital_OutT> tool_dout_args, FlowManagerArgsPtr flow_manager_args = nullptr)#

Sets the tool (flange) power voltage and digital outputs.

Only operates within a PyFM step context: if flow_manager_args is not provided, this performs no action and immediately returns std::nullopt.

Parameters:
  • robot_model – Name of the robot model.

  • tool_voltage – Desired flange power voltage, forwarded to call_flange_power: 0 power off, 12 12V, 24 24V, or a negative value to leave the current voltage unchanged.

  • tool_dout_args – Digital output arguments to apply to the flange.

  • flow_manager_args – PyFM step context. Required in practice — despite the optional type, omitting it makes this function a no-op that returns std::nullopt. On success, completion is reported to the flow manager immediately (synchronous).

Throws:

std::runtime_error – If either underlying flange call fails; the original message is wrapped as “Tool Out failed: …”. The failure must propagate — swallowing it would leave the PyFM step waiting on a done() that never comes.

Returns:

IPC::Response_FunctionsT containing the digital-out request result, or std::nullopt if flow_manager_args was not provided.

IPC::Response_FunctionsT setting(const std::string &robot_model, std::string_view option, std::optional<IPC::Request_Set_Out_Collision_ParaT> out_collision, std::optional<IPC::Request_Set_Self_Collision_ParaT> self_collision, std::optional<UserFrameSelectionArg> user_frame_selection, std::optional<IPC::Request_Set_Fixed_Speed_ModeT> fixed_speed, std::optional<IPC::Request_Set_ShiftT> target_shift, std::optional<IPC::Request_MotionSpeedBarT> speed_bar, std::optional<IPC::Request_Set_TimeConstraintT> time_constraint, std::optional<IPC::Request_Set_AsciiFunctionCallT> ascii_function_call, std::optional<IPC::Request_Set_Joint_ImpedanceT> joint_impedance, std::optional<IPC::Request_Set_Free_DriveT> free_drive, std::optional<IPC::Request_Set_Master_ModeT> master_mode, std::optional<IPC::Request_Set_User_Frame_6DofT> user_frame_6dof, std::optional<IPC::Request_Set_User_Frame_TCPT> user_frame_tcp, std::optional<IPC::Request_Set_User_Frame_3PointsT> user_frame_3points, std::optional<ShiftLandMarkArg> target_shift_landmark, std::optional<IPC::Request_Set_ProgramFlowManageT> program_flow_manage, std::optional<IPC::Request_Set_DinFunctionMaskT> din_function_mask, std::optional<IPC::Request_Set_DoutFunctionMaskT> dout_function_mask, std::optional<IPC::Request_Set_JacobSpeedModeT> jacobian_based_speed_control, std::optional<IPC::Request_Set_SelfVibrationModeT> self_vibration_mode, std::optional<VibrationMotionBasedArg> vibration_motion_based, std::optional<IPC::Request_Set_ExternalAxisSyncT> external_axis_sync, std::optional<IPC::Request_Set_TcpSpeedBoundT> tcp_speed_bound, std::optional<IPC::Request_Set_MoveBreakT> move_break, std::optional<IPC::Request_Set_JointRef_FilterT> joint_reference_filter, std::optional<IPC::Request_Set_SelfCollBlindT> self_collision_blind, std::optional<JointOriginCalibArg> joint_origin_calibration, std::optional<IPC::Request_Set_WristSingular_ModeT> wrist_singular_mode, std::optional<IPC::Request_Set_Range_CheckT> operation_range_check, std::optional<IPC::Request_EXTFT_Software_NullingT> extft_software_nulling, std::optional<SaveDataLogArg> save_datalog, FlowManagerArgsPtr flow_manager_args = nullptr)#

Dispatches to the appropriate robot configuration setter based on option.

A single unified entry point for the many set_*/call_* configuration calls on RBManipulateConfigSDK: pass one of the SettingOptions::* constants as option, populate the single corresponding parameter below, and leave every other parameter unset. Throws if the parameter matching option is not provided, or if option matches none of the known SettingOptions values.

Parameters:
  • robot_model – Name of the robot model.

  • option – One of the SettingOptions::* constants selecting which setter to invoke.

  • out_collision – Required when option is SettingOptions::OUT_COLLISION; forwarded to RBManipulateConfigSDK::set_out_collision_para.

  • self_collision – Required when option is SettingOptions::SELF_COLLISION; forwarded to RBManipulateConfigSDK::set_self_collision_para.

  • user_frame_selection – Required when option is SettingOptions::USER_FRAME_SELECTION; forwarded to RBManipulateConfigSDK::set_userframe_num. Both “user_frame_num” and the legacy program-args key “target_user_frame_num” are accepted; neither present throws rather than silently selecting user frame 0. That resolution runs in the dedicated type_caster at the pybind boundary (binding/glue/program_setting_caster.hpp); this function only sees the resolved UserFrameSelectionArg.

  • fixed_speed – Required when option is SettingOptions::FIXED_SPEED; forwarded to RBManipulateConfigSDK::set_fixed_speed.

  • target_shift – Required when option is SettingOptions::TARGET_SHIFT; forwarded to RBManipulateConfigSDK::set_shift.

  • speed_bar – Required when option is SettingOptions::SPEED_BAR; forwarded to RBManipulateConfigSDK::call_speedbar.

  • time_constraint – Required when option is SettingOptions::TIME_CONSTRAINT; forwarded to RBManipulateConfigSDK::set_timeconstraint.

  • ascii_function_call – Required when option is SettingOptions::ASCII_FUNCTION_CALL; forwarded to RBManipulateConfigSDK::set_ascii_functioncall.

  • joint_impedance – Required when option is SettingOptions::JOINT_IMPEDANCE; forwarded to RBManipulateConfigSDK::set_joint_impedance.

  • free_drive – Required when option is SettingOptions::FREE_DRIVE; forwarded to RBManipulateConfigSDK::set_freedrive.

  • master_mode – Required when option is SettingOptions::MASTER_MODE; forwarded to RBManipulateConfigSDK::set_master_mode.

  • user_frame_6dof – Required when option is SettingOptions::USER_FRAME_6DOF; forwarded to RBManipulateConfigSDK::set_userframe_6dof.

  • user_frame_tcp – Required when option is SettingOptions::USER_FRAME_TCP; forwarded to RBManipulateConfigSDK::set_userframe_tcp.

  • user_frame_3points – Required when option is SettingOptions::USER_FRAME_3POINTS; forwarded to RBManipulateConfigSDK::set_userframe_3points.

  • target_shift_landmark – Required when option is SettingOptions::TARGET_SHIFT_LANDMARK; the 6 reference/present points are rounded to 3 decimal places and padded to 7 values before being forwarded to RBManipulateConfigSDK::set_shift_landmark. Each point may be either a MoveInput_Target dict or, as legacy program args store them, a bare list of coordinates (taken as frame 0 / unit 0); that discrimination and the null check run in the dedicated type_caster at the pybind boundary (binding/glue/program_setting_caster.hpp), so this function only sees the resolved ShiftLandMarkArg.

  • program_flow_manage – Required when option is SettingOptions::PROGRAM_FLOW_MANAGE; forwarded to RBManipulateConfigSDK::set_program_flow_manage.

  • din_function_mask – Required when option is SettingOptions::DIN_FUNCTION_MASK; forwarded to RBManipulateConfigSDK::set_din_function_mask.

  • dout_function_mask – Required when option is SettingOptions::DOUT_FUNCTION_MASK; forwarded to RBManipulateConfigSDK::set_dout_function_mask.

  • jacobian_based_speed_control – Required when option is SettingOptions::JACOBIAN_BASED_SPEED_CONTROL; forwarded to RBManipulateConfigSDK::set_jacob_speed_mode.

  • self_vibration_mode – Required when option is SettingOptions::SELF_VIBRATION_MODE; forwarded to RBManipulateConfigSDK::set_self_vibration_mode.

  • vibration_motion_based – Required when option is SettingOptions::VIBRATION_MOTION_BASED. Passed from Python as a flat dict {“onoff”: 1/0, “frame”:, “x_mag”:, …}, matching the Request_Wrapper_VibrationMotion schema table and what the FE actually sends — not the wire request shape (Request_Wrapper_VibrationMotion_On / _Off, sent as two separate RPCs; “onoff” only selects which one to call). When onoff == 1, all 10 of frame/x_mag/y_mag/z_mag/x_freq/y_freq/ z_freq/x_phase/y_phase/z_phase must be present (each parsed via rb_glue::to_int / to_double, tolerating string-typed values from loosely-typed program args) or the request is rejected — the auto dict-to-struct caster would otherwise silently fill missing fields with 0. That validation runs in the dedicated type_caster at the pybind boundary (binding/glue/vibration_motion_caster.hpp); this function only sees the resolved VibrationMotionBasedArg. Forwarded to RBManipulateConfigSDK::call_vibration_motion_on / call_vibration_motion_off.

  • external_axis_sync – Required when option is SettingOptions::EXTERNAL_AXIS_SYNC; forwarded to RBManipulateConfigSDK::set_external_axis_sync.

  • tcp_speed_bound – Required when option is SettingOptions::TCP_SPEED_BOUND; forwarded to RBManipulateConfigSDK::set_tcp_speed_bound.

  • move_break – Required when option is SettingOptions::MOVE_BREAK_BLOCK; forwarded to RBManipulateConfigSDK::set_move_break.

  • joint_reference_filter – Required when option is SettingOptions::JOINT_REFERENCE_FILTER; forwarded to RBManipulateConfigSDK::set_joint_reference_filter.

  • self_collision_blind – Required when option is SettingOptions::SELF_COLL_DETECT_BLIND; forwarded to RBManipulateConfigSDK::set_self_collision_blind.

  • joint_origin_calibration – Required when option is SettingOptions::JOINT_ORIGIN_CALIBRATION. The underlying dict’s “table_option” key (0: Clear, 1: Add, 2: Run (Calculate), 3: Reflect) selects which of RBManipulateMaintenanceSDK::call_origin_calib_clr, call_origin_calib_add, call_origin_calib_run, or call_origin_calib_reflect is invoked; missing “table_option” or a case’s own required fields throws. That resolution runs in the dedicated type_caster at the pybind boundary (binding/glue/program_setting_caster.hpp); this function only sees the resolved JointOriginCalibArg.

  • wrist_singular_mode – Required when option is SettingOptions::WRIST_SINGULARITY_MODE; forwarded to RBManipulateConfigSDK::set_wrist_singularity_mode.

  • flow_manager_args – Optional PyFM step context, forwarded as-is to whichever underlying setter is invoked.

Throws:

std::runtime_error – If the parameter matching option is not provided, if option matches no known SettingOptions value, or if the chosen setter’s own validation fails.

Returns:

IPC::Response_FunctionsT containing the underlying setter’s result.

IPC::Response_FunctionsT call_coredata_pub_frequency(const std::string &robot_model, const float frequency)#

Requests the cobot to set its core data publication frequency.

Sets how often the robot publishes its periodic core-data state stream on the {robot_model}/state_core topic (IPC::State_Core — joint/ Cartesian refs, encoder values, etc.) that other parts of this SDK subscribe to (e.g. folder_finish_at).

Parameters:
  • robot_model – Name of the robot model.

  • frequency – Publication frequency, in Hz. The firmware clamps this to the range [0.1, 500.0] before applying it; the default rate before any call is 20 Hz.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the request result.

void folder_finish_at(const std::string &robot_model, FlowManagerArgsPtr flow_manager_args = nullptr)#

Starts background monitoring that breaks a Folder step’s children once its finish_at condition becomes true.

Used in PyFM: when a Folder step’s flow_manager_args carries a finish_at expression, this subscribes to the robot’s state_core topic and evaluates that expression against the PyFM context on every state update. As soon as it evaluates true, this calls call_smoothjog_stop with the evaluated stop_time, then breaks the folder (via the context’s break_folder) at the depth captured on entry, terminating the moves underneath that folder. Monitoring also stops on its own once execution has already exited the target folder depth. This is a no-op if flow_manager_args is not provided, or if its args do not have a finish_at value set.

Note

flow_manager_args.done() is called immediately once monitoring starts, before finish_at ever becomes true — the PyFM step itself completes right away (so children can proceed) while the finish_at watch continues running in the background.

Note

Exceptions from the background monitor (e.g. from evaluating finish_at/stop_time) are caught and logged to stderr rather than propagated, since they run asynchronously in a subscription callback.

Parameters:
  • robot_model – Name of the robot model.

  • flow_manager_args – PyFM step context. Expected args:

    • finish_at: expression evaluated on every state update; monitoring only starts if this is set to a non-empty value.

    • stop_time: expression evaluated for the deceleration time passed to call_smoothjog_stop once finish_at becomes true (defaults to 0.0 if not set).

IPC::Response_FunctionsT call_shared_memory_follow(const std::string &robot_model, const int onoff)#

Requests the cobot to turn shared memory follow on or off.

Parameters:
  • robot_model – Name of the robot model.

  • onoff – Shared memory follow switch.

    • 0: off

    • 1: on

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the request result.

Public Static Functions

static inline std::string type_name()#

manipulate/manipulate_safety.hpp#

class RBManipulateSafetySDK : public RBBaseSDK#

Public Functions

inline RBManipulateSafetySDK()#
IPC::Response_CallConfigSafetyT call_config_safety(const std::string &robot_model, const int safety_addr, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot’s safety configuration entries.

Pass a specific address in safety_addr to fetch a single entry, or -1 to fetch all safety configuration entries. Reads go through the same register table that save_safety_parameter writes to.

Parameters:
  • robot_model – Name of the robot model.

  • safety_addr – Safety config register address to query, or -1 to request all entries.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_CallConfigSafetyT containing parallel list_name/list_addr/list_value arrays: the name, address, and value of each matching safety configuration entry.

IPC::Response_FunctionsT save_safety_parameter(std::string &robot_model, int target_addr, int target_value, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to save a safety configuration parameter.

Writes target_value to the safety configuration register at target_addr — the write counterpart to call_config_safety's read. The firmware writes the value out over RS485 and, once acknowledged, persists it into the safety register table immediately (no separate commit step).

Parameters:
  • robot_model – Name of the robot model.

  • target_addr – Safety config register address to write. The firmware rejects addresses at or beyond the total number of safety registers.

  • target_value – Value to write to that address.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the save request result.

Public Static Functions

static inline std::string type_name()#

manipulate/manipulate_service.hpp#

class RBManipulateServiceSDK : public RBBaseSDK#

Public Functions

inline RBManipulateServiceSDK()#
IPC::Response_FunctionsT call_replay_motion_rec_start(const std::string &robot_model, const int mode, const float frequency, const std::string &filename, FlowManagerArgsPtr flow_manager_args = nullptr)#

Starts recording the cobot’s motion to a file.

Captures the robot’s motion trajectory while recording is active, and stores it under the given file name. Call call_replay_motion_rec_stop to end the recording, call_replay_motion_list to see saved files, and call_replay_motion_run to play a recorded file back.

Parameters:
  • robot_model – Name of the robot model.

  • mode – Recording mode. 0 = No Save (record without persisting to disk), 1 = Real Time (save every sample at a fixed frequency), 2 = Mile Stone (save only at key waypoints).

  • frequency – Sampling frequency (Hz) used in Real Time / Mile Stone mode.

  • filename – Name of the file the recording is saved under.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronously) once the response is received, provided its return_value is 0; a nonzero return_value raises before flow_manager_args.done() is reached.

Throws:

std::runtime_error – If the query fails or no payload is returned.

Returns:

IPC::Response_FunctionsT containing the record-start result.

IPC::Response_FunctionsT call_replay_motion_rec_stop(const std::string &robot_model, FlowManagerArgsPtr flow_manager_args = nullptr)#

Stops the currently active motion recording.

Ends a recording previously started by call_replay_motion_rec_start.

Parameters:
  • robot_model – Name of the robot model.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronously) once the response is received, provided its return_value is 0; a nonzero return_value raises before flow_manager_args.done() is reached.

Throws:

std::runtime_error – If the query fails or no payload is returned.

Returns:

IPC::Response_FunctionsT containing the record-stop result.

IPC::Response_Replay_Motion_ListT call_replay_motion_list(const std::string &robot_model, FlowManagerArgsPtr flow_manager_args = nullptr)#

Lists the motion recording files saved on the robot.

Parameters:
  • robot_model – Name of the robot model.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronously) after the response is received.

Throws:

std::runtime_error – If the query fails or no payload is returned.

Returns:

IPC::Response_FunctionsT containing the query result.

IPC::Response_FunctionsT call_replay_motion_run(const std::string &robot_model, const std::string &filename, const int type, MoveSpeedArg speed, FlowManagerArgsPtr flow_manager_args = nullptr)#

Replays a previously recorded motion file.

Note

If flow_manager_args is provided, this function returns immediately after submitting the request; a background monitor waits for the actual motion-completion signal from the robot before invoking the flow manager’s completion callback.

Parameters:
  • robot_model – Name of the robot model.

  • filename – Name of the recorded motion file to replay (as listed by call_replay_motion_list).

  • type – Move type used during replay. 0 = J-type (joint motion), 1 = L-type (linear motion).

  • speed – Movement speed parameters used during replay.

  • flow_manager_args – Optional PyFM step context. If provided, the replay result is reported to the flow manager and completion is handled asynchronously.

Throws:

std::runtime_error – If the query fails or no payload is returned.

Returns:

IPC::Response_FunctionsT containing the replay-start result.

IPC::Response_FunctionsT call_weld_arc_off(const std::string &robot_model, float time_start, int cond_mode, int cond_option, int cond_jobno, float cond_current, float cond_voltage, float cond_feedrate, float cond_arccontrol, float cond_arclength, float cond_para1, float cond_para2, float time_crator, float time_ending, FlowManagerArgsPtr flow_manager_args = nullptr)#

Stops welding: runs the crater-fill sequence and turns the arc off.

Runs the counterpart shutdown sequence to call_weld_arc_on: holds a crater condition for time_crator seconds, then turns the arc off and waits time_ending seconds before returning.

Parameters:
  • robot_model – Name of the robot model.

  • time_start – Initial wait time before the crater sequence starts (sec).

  • cond_mode – Crater condition setting method. 0 = keep current condition, 1 = set current + voltage, 2 = set feed rate + voltage, 3 = call job number.

  • cond_option – Condition option (dropdown). 0 = N/A.

  • cond_jobno – Job number to call when cond_mode is 3 (call job number).

  • cond_current – Welding current to apply (A).

  • cond_voltage – Welding voltage to apply (V).

  • cond_feedrate – Wire feed rate (m/min).

  • cond_arccontrol – Arc control value.

  • cond_arclength – Arc length value.

  • cond_para1 – Welder-specific parameter 1.

  • cond_para2 – Welder-specific parameter 2.

  • time_crator – Crater (arc end point) holding time (sec).

  • time_ending – Follow-up time to hold position/state after the arc is turned off (sec).

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronously) once the response is received, provided its return_value is 0; a nonzero return_value raises before flow_manager_args.done() is reached.

Throws:

std::runtime_error – If the query fails or no payload is returned.

Returns:

IPC::Response_FunctionsT containing the arc-off result.

IPC::Response_FunctionsT call_weld_arc_on(const std::string &robot_model, float time_start, float robot_vel, float robot_acc, int cond_mode, int cond_option, int cond_jobno, float cond_current, float cond_voltage, float cond_feedrate, float cond_arccontrol, float cond_arclength, float cond_para1, float cond_para2, float time_pregas, int detect_try_num, float detect_timeout, float detect_timegap, float time_ending, FlowManagerArgsPtr flow_manager_args = nullptr)#

Starts welding: turns the arc on with the given condition and detection settings.

Runs the arc-start sequence: waits time_start, moves at (robot_vel, robot_acc), applies the requested welding condition, purges gas for time_pregas, then attempts to detect the arc signal (retrying up to detect_try_num times with detect_timegap between attempts, each bounded by detect_timeout), and finally waits time_ending before returning. Call call_weld_arc_off to end welding.

Parameters:
  • robot_model – Name of the robot model.

  • time_start – Initial wait time before the sequence starts (sec).

  • robot_vel – Robot movement speed during the arc-on motion (mm/s).

  • robot_acc – Robot movement acceleration during the arc-on motion (mm/s^2).

  • cond_mode – Welding condition setting method. 0 = keep current condition, 1 = set current + voltage, 2 = set feed rate + voltage, 3 = call job number.

  • cond_option – Condition option (dropdown). 0 = N/A.

  • cond_jobno – Job number to call when cond_mode is 3 (call job number).

  • cond_current – Welding current to apply (A).

  • cond_voltage – Welding voltage to apply (V).

  • cond_feedrate – Wire feed rate (m/min).

  • cond_arccontrol – Arc control value.

  • cond_arclength – Arc length value.

  • cond_para1 – Welder-specific parameter 1.

  • cond_para2 – Welder-specific parameter 2.

  • time_pregas – Pre-gas purge time before arc start (sec).

  • detect_try_num – Number of retry attempts for arc signal detection.

  • detect_timeout – Timeout duration for a single arc signal detection attempt (sec).

  • detect_timegap – Interval time between arc signal detection retries (sec).

  • time_ending – Follow-up time to hold position/state after the arc is confirmed on (sec).

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronously) once the response is received, provided its return_value is 0; a nonzero return_value raises before flow_manager_args.done() is reached.

Throws:

std::runtime_error – If the query fails or no payload is returned.

Returns:

IPC::Response_FunctionsT containing the arc-on result.

IPC::Response_CallConfigWeldT call_config_weld(const std::string &robot_model, FlowManagerArgsPtr flow_manager_args = nullptr)#

Reads the saved welding device configuration (Settings > Devices > Welding).

Returns the device I/O mapping and current/voltage conversion maps previously saved via save_weld_parameter.

Parameters:
  • robot_model – Name of the robot model.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronously) after the response is received.

Throws:

std::runtime_error – If the query fails or no payload is returned.

Returns:

IPC::Response_CallConfigWeldT containing the saved welding device configuration.

IPC::Response_FunctionsT call_weld_wire(const std::string &robot_model, const int direction, FlowManagerArgsPtr flow_manager_args = nullptr)#

Jogs the welding wire feeder forward or backward, or stops it.

Parameters:
  • robot_model – Name of the robot model.

  • direction – Wire feed direction. -1 = backward, 0 = stop, 1 = forward.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronously) once the response is received, provided its return_value is 0; a nonzero return_value raises before flow_manager_args.done() is reached.

Throws:

std::runtime_error – If the query fails or no payload is returned.

Returns:

IPC::Response_FunctionsT containing the command result.

IPC::Response_FunctionsT call_weld_gas(const std::string &robot_model, const int gas_onoff, FlowManagerArgsPtr flow_manager_args = nullptr)#

Turns the welding shield gas purge on or off.

Parameters:
  • robot_model – Name of the robot model.

  • gas_onoff – Gas purge state. 0 = off, 1 = on.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronously) once the response is received, provided its return_value is 0; a nonzero return_value raises before flow_manager_args.done() is reached.

Throws:

std::runtime_error – If the query fails or no payload is returned.

Returns:

IPC::Response_FunctionsT containing the command result.

IPC::Response_FunctionsT save_weld_parameter(const std::string &robot_model, int dev_id, int dev_ip_0, int dev_ip_1, int dev_ip_2, int dev_ip_3, int dev_port, int out_pno_arc, int out_pno_touch, int out_pno_gas, int out_pno_inch, int out_pno_reinch, int out_pno_current, int out_pno_voltage, int in_pno_ready, int in_pno_arc, int in_pno_touch, int in_pno_gas, int in_pno_feeder, int in_pno_error, int in_pno_current, int in_pno_voltage, int hw_process_type, int hw_wire_type, int hw_wire_size, int hw_gas_type, std::vector<float> current_map_value, std::vector<float> current_map_output, std::vector<float> voltage_map_value, std::vector<float> voltage_map_output, FlowManagerArgsPtr flow_manager_args = nullptr)#

Saves the welding device configuration (Settings > Devices > Welding).

Configures which digital/analog I/O ports the welding device is wired to, and the current/voltage conversion maps used to translate a requested welding current/voltage into the corresponding raw analog output value (and vice versa for feedback). Read back with call_config_weld.

Parameters:
  • robot_model – Name of the robot model.

  • dev_id – Welding device type. 0 = None, 1 = I/O Signal, 2 = Miller M.Bus, 3 = Aotai M.Bus.

  • dev_ip_0 – First octet of the welding device IP address.

  • dev_ip_1 – Second octet of the welding device IP address.

  • dev_ip_2 – Third octet of the welding device IP address.

  • dev_ip_3 – Fourth octet of the welding device IP address.

  • dev_port – Communication port of the welding device.

  • out_pno_arc – Digital output port number for the Arc On signal. -1 = none, 0-15 = Digital Output 0-15.

  • out_pno_touch – Digital output port number for the Touch On signal. -1 = none, 0-15 = Digital Output 0-15.

  • out_pno_gas – Digital output port number for the Gas On signal. -1 = none, 0-15 = Digital Output 0-15.

  • out_pno_inch – Digital output port number for the Wire Inch signal. -1 = none, 0-15 = Digital Output 0-15.

  • out_pno_reinch – Digital output port number for the Wire Re-Inch signal. -1 = none, 0-15 = Digital Output 0-15.

  • out_pno_current – Analog output port number for the current setting. -1 = none, 0-3 = Analog Output 0-3.

  • out_pno_voltage – Analog output port number for the voltage setting. -1 = none, 0-3 = Analog Output 0-3.

  • in_pno_ready – Digital input port number for the Welder Ready feedback signal. -1 = none, 0-15 = Digital Input 0-15.

  • in_pno_arc – Digital input port number for the Arc Generated feedback signal. -1 = none, 0-15 = Digital Input 0-15.

  • in_pno_touch – Digital input port number for the Touch Signal feedback. -1 = none, 0-15 = Digital Input 0-15.

  • in_pno_gas – Digital input port number for the Gas Signal feedback. -1 = none, 0-15 = Digital Input 0-15.

  • in_pno_feeder – Digital input port number for the Feeder Signal feedback. -1 = none, 0-15 = Digital Input 0-15.

  • in_pno_error – Digital input port number for the Welder Error signal. -1 = none, 0-15 = Digital Input 0-15.

  • in_pno_current – Analog input port number for the current feedback. -1 = none, 0-3 = Analog Input 0-3.

  • in_pno_voltage – Analog input port number for the voltage feedback. -1 = none, 0-3 = Analog Input 0-3.

  • current_map_value – Input (raw) value list for the welding current conversion map.

  • current_map_output – Output (converted) value list for the welding current conversion map, paired index-for-index with current_map_value.

  • voltage_map_value – Input (raw) value list for the welding voltage conversion map.

  • voltage_map_output – Output (converted) value list for the welding voltage conversion map, paired index-for-index with voltage_map_value.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronously) once the response is received, provided its return_value is 0; a nonzero return_value raises before flow_manager_args.done() is reached.

Throws:

std::runtime_error – If the query fails or no payload is returned.

Returns:

IPC::Response_FunctionsT containing the save result.

IPC::Response_FunctionsT call_move_macro(const std::string &robot_model, int type, std::vector<MoveTargetValuesArg> corner_pnts, std::optional<MoveSpeedArg> speed, int rotation_mode, int gap_num, float margin_h_1, float margin_h_2, float margin_w_1, float margin_w_2, float margin_over, float margin_over_para, FlowManagerArgsPtr flow_manager_args = nullptr)#

Runs a Motion Macro: a pre-built multi-segment move pattern (flat surface / round / triangle / 3D round) derived from a small set of corner points.

Rounds each point in corner_pnts to 3 decimal places, pads or truncates it to the 7-value tar_values format expected by the firmware, and forwards the request. The number of points required in corner_pnts depends on type: Flat Surface = 4, Round (R) = 6, Round (H) = 6, Triangle = 3, 3D Round = 9.

Note

If flow_manager_args is provided, this function returns immediately after submitting the request; a background monitor waits for the actual motion-completion signal from the robot before invoking the flow manager’s completion callback.

Parameters:
  • robot_model – Name of the robot model.

  • type – Motion Macro type. 0 = Flat Surface, 1 = Round (R), 2 = Round (H), 3 = Triangle, 4 = 3D Round.

  • corner_pnts – Corner points defining the macro shape, each a [x, y, z, rx, ry, rz, aa]-style value list (up to 7 elements; shorter lists are zero-padded). The number of points required depends on type (see above).

  • speed – Movement speed parameters used to run the macro.

  • rotation_mode – Orientation option. 0 = Intended, 1 = Constant.

  • gap_num – Gap number between macro segments.

  • margin_h_1 – Margin height 1 (mm).

  • margin_h_2 – Margin height 2 (mm).

  • margin_w_1 – Margin width 1 (mm).

  • margin_w_2 – Margin width 2 (mm).

  • margin_over – Margin over (mm).

  • margin_over_para – Margin over parameter, in the range [0, 1].

  • flow_manager_args – Optional PyFM step context. If provided, the macro’s motion result is reported to the flow manager and completion is handled asynchronously.

Throws:

std::runtime_error – If the query fails or no payload is returned.

Returns:

IPC::Response_FunctionsT containing the macro-start result.

IPC::Response_FunctionsT call_pattern_off(const std::string &robot_model, const int id, FlowManagerArgsPtr flow_manager_args = nullptr)#

Stops an active repeating Pattern by ID.

Parameters:
  • robot_model – Name of the robot model.

  • id – Pattern ID to stop, in the range [0, 29].

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronously) once the response is received, provided its return_value is 0; a nonzero return_value raises before flow_manager_args.done() is reached.

Throws:

std::runtime_error – If the query fails or no payload is returned.

Returns:

IPC::Response_FunctionsT containing the command result.

IPC::Response_FunctionsT call_pattern_on(const std::string &robot_model, int id, int type, std::optional<std::vector<MoveTargetValuesArg>> corner_pnts, std::optional<std::vector<MoveTargetValuesArg>> random_pnts, int count_x, int count_y, int count_z, MoveTargetValuesArg anchor_pnt, int incremental, FlowManagerArgsPtr flow_manager_args = nullptr)#

Starts a repeating Pattern move: a grid or randomized sweep of points around an anchor point.

Builds the target point list from corner_pnts (for Line / Plane / Cube patterns) or random_pnts (when type is 3, Random), rounding each point to 3 decimal places and padding/truncating it to the 7-value tar_values format. The number of points required in corner_pnts depends on type: Line (X) = 2, Plane (X-Y) = 4, Cube (X-Y-Z) = 8; Random patterns instead take random_pnts, whose point count is caller-defined. Call call_pattern_off to stop.

Parameters:
  • robot_model – Name of the robot model.

  • id – Pattern ID to run, in the range [0, 29]. Running a new pattern on an ID already in use is expected to replace it.

  • type – Pattern type. 0 = Line (X), 1 = Plane (X-Y), 2 = Cube (X-Y-Z), 3 = Random.

  • corner_pnts – Corner points defining the pattern grid, each a [x, y, z, rx, ry, rz, aa]-style value list (up to 7 elements; shorter lists are zero-padded). Used when type is not 3 (Random); ignored otherwise.

  • random_pnts – Explicit point list used only when type is 3 (Random), in the same per-point format as corner_pnts. Ignored for the other pattern types.

  • count_x – Number of points to generate along the X axis.

  • count_y – Number of points to generate along the Y axis.

  • count_z – Number of points to generate along the Z axis.

  • anchor_pnt – Reference point the pattern grid is built around, as a [x, y, z, rx, ry, rz, aa]-style value list (up to 7 elements; shorter lists are zero-padded).

  • incremental – Whether the pattern advances incrementally between activations (nonzero) or restarts from the first point each time (0).

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronously) once the response is received, provided its return_value is 0; a nonzero return_value raises before flow_manager_args.done() is reached.

Throws:

std::runtime_error – If the query fails or no payload is returned.

Returns:

IPC::Response_FunctionsT containing the pattern-start result.

IPC::Response_FunctionsT call_calib_tcp_position(const std::string &robot_model, std::vector<IPC::MoveInput_TargetT> joints, FlowManagerArgsPtr flow_manager_args = nullptr)#

Runs automatic TCP position calibration from a set of joint poses (Move > Calibration > TCP Position).

The robot is moved through the given joint poses and the TCP offset is computed from the resulting motion. Each entry in joints is rounded to 3 decimal places and padded/truncated to 7 values before being sent.

Parameters:
  • robot_model – Name of the robot model.

  • joints – Joint poses to calibrate from. Each target’s tar_frame must be Joint (-1) — the values are joint angles, not Cartesian coordinates.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronously) once the response is received, provided its return_value is 0; a nonzero return_value raises before flow_manager_args.done() is reached.

Throws:

std::runtime_error – If the query fails or no payload is returned.

Returns:

IPC::Response_FunctionsT containing the calibration result.

IPC::Response_FunctionsT call_calib_tcp_orientation(const std::string &robot_model, int frame_option, FlowManagerArgsPtr flow_manager_args = nullptr)#

Runs automatic TCP orientation calibration (Move > Calibration > TCP Orientation).

Parameters:
  • robot_model – Name of the robot model.

  • frame_option – Alignment frame used for the calibration. 0 = Global frame, 1 = Local frame, 2 = User frame.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronously) once the response is received, provided its return_value is 0; a nonzero return_value raises before flow_manager_args.done() is reached.

Throws:

std::runtime_error – If the query fails or no payload is returned.

Returns:

IPC::Response_FunctionsT containing the calibration result.

IPC::Response_FunctionsT call_gripper_action(const std::string &robot_model, int gripper_type, int function_list, std::vector<float> payload, FlowManagerArgsPtr flow_manager_args = nullptr)#

Sends an Initialize command, plus any additional configured commands (e.g., Set-position, Action), to a configured gripper or end-of-arm tool.

A single generic entry point for all supported gripper models (Dynamixel, DH PG/CG/AG, Robotiq E-Pick/2F/Hand-E, Baumer LDS, OnRobot 2FG/RG/3FG/VG/VGC/MG/SoftGripper/VGP20/Sander, JRT JEG series, and others). function_list is model-specific: index 0 is always Initialize, and later indices are model-specific actions (e.g. Set Goal Position, Set Goal Pos/Spd/Force, Reset, Suction). The meaning of each payload slot depends on both gripper_type and function_list — each of the 23 supported gripper types has its own per-function payload layout (slot index, unit, and default value), too large to reproduce here in full; consult the gripper’s setup UI or vendor documentation for the exact slot mapping of the model in use.

Parameters:
  • robot_model – Name of the robot model.

  • gripper_type – Gripper/tool model selector. 0 = Dynamixel Motor, 1 = DH PG/CG Series, 2 = DH AG Series, 3 = Robotiq E-Pick, 4 = Robotiq 2F Series, 5 = Robotiq Hand-E Series, 6 = Baumer LDS, 7 = OnRobot 2FG7, 8 = OnRobot 2FG14, 9 = OnRobot RG2, 10 = OnRobot RG6, 11 = OnRobot 3FG15, 12 = OnRobot 3FG25, 13 = OnRobot VG10, 14 = OnRobot VGC10, 15 = OnRobot MG10, 16 = OnRobot SoftGripper, 17 = OnRobot VGP20, 18 = OnRobot Sander, 19 = JRT JEGB, 20 = JRT JEGG, 21 = JRT JEGC, 22 = JRT JEGH, 23 = AG2-P70.

  • function_list – Action to run for the selected gripper_type. 0 is Initialize for every model; the meaning of other indices is model-specific (see schema).

  • payload – Positional argument list for the selected gripper_type / function_list combination (e.g. connection port, device ID, target position/speed/force). Layout is model- and function-specific — see schema.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronously) once the response is received, provided its return_value is 0; a nonzero return_value raises before flow_manager_args.done() is reached.

Throws:

std::runtime_error – If the query fails or no payload is returned.

Returns:

IPC::Response_FunctionsT containing the command result.

void pub_gripper_action(const std::string &robot_model, int gripper_type, int function_list, std::vector<float> payload, FlowManagerArgsPtr flow_manager_args = nullptr)#

Publishes a gripper action command.

Same request as call_gripper_action() (same gripper_type, function_list and payload layout), but sent over the publish/subscribe channel without waiting for a response from the receiver.

Parameters:
  • robot_model – Name of the robot model.

  • gripper_type – Gripper model selector (see call_gripper_action()).

  • function_list – Action to run for the selected gripper_type.

  • payload – Positional argument list for the selected gripper_type / function_list combination.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the message has been published.

Throws:

std::runtime_error – If the message cannot be published.

IPC::Response_FunctionsT call_timer_function(const std::string &robot_model, int timer_no, float reset_time, int option_increase, int option_action, FlowManagerArgsPtr flow_manager_args = nullptr)#

Resets/configures one of the robot’s 10 general-purpose program timers.

Parameters:
  • robot_model – Name of the robot model.

  • timer_no – Timer index to configure, in the range [0, 9].

  • reset_time – Value the timer is reset to (sec).

  • option_increase – Timing option. 0 = Default, 1 = Sync with Speed Bar.

  • option_action – Action option. 0 = Default, 1 = Stop at Pause State.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronously) once the response is received, provided its return_value is 0; a nonzero return_value raises before flow_manager_args.done() is reached.

Throws:

std::runtime_error – If the query fails or no payload is returned.

Returns:

IPC::Response_FunctionsT containing the command result.

IPC::Response_FunctionsT call_move_gcode(const std::string &robot_model, const std::string &filename, int gcodeframe, float feed_spd_default, float feed_spd_rapid, float feed_spd_limit, float feed_spd_rotation, int default_plane, float offset_x, float offset_y, float offset_z, int will_const_sped, int will_ignore_unknown, FlowManagerArgsPtr flow_manager_args = nullptr)#

Executes a G-code file as a robot motion program.

Note

If flow_manager_args is provided, this function returns immediately after submitting the request; a background monitor waits for the actual motion-completion signal from the robot before invoking the flow manager’s completion callback.

Parameters:
  • robot_model – Name of the robot model.

  • filename – Name of the G-code file to run.

  • gcodeframe – Reference frame the G-code coordinates are interpreted in. 0 = Global, 1 = Local, 2 = User.

  • feed_spd_default – Default feed speed (mm/s).

  • feed_spd_rapid – Rapid (non-cutting) feed speed (mm/s).

  • feed_spd_limit – Maximum feed speed allowed (mm/s).

  • feed_spd_rotation – Feed rotation speed (deg/s).

  • default_plane – Default working plane. 0 = XY-Plane, 1 = ZX-Plane, 2 = YZ-Plane.

  • offset_x – X offset applied to all G-code coordinates (mm).

  • offset_y – Y offset applied to all G-code coordinates (mm).

  • offset_z – Z offset applied to all G-code coordinates (mm).

  • will_const_sped – Whether to run at constant speed. 0 = off, 1 = constant speed.

  • will_ignore_unknown – Whether to ignore unrecognized G-code commands instead of failing. 0 = off, 1 = ignore unknown code.

  • flow_manager_args – Optional PyFM step context. If provided, the run result is reported to the flow manager and completion is handled asynchronously.

Throws:

std::runtime_error – If the query fails or no payload is returned.

Returns:

IPC::Response_FunctionsT containing the run-start result.

IPC::Response_CallConfigEXTFTT call_config_extft(const std::string &robot_model, FlowManagerArgsPtr flow_manager_args = nullptr)#

Reads the saved external F/T (force/torque) sensor configuration (Settings > Devices > External F/T).

Parameters:
  • robot_model – Name of the robot model.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronously) after the response is received.

Throws:

std::runtime_error – If the query fails or no payload is returned.

Returns:

IPC::Response_CallConfigEXTFTT containing the saved external F/T sensor configuration.

IPC::Response_FunctionsT save_extft_parameter(const std::string &robot_model, int dev_type, int dev_mount_opt, float dev_mount_rx, float dev_mount_ry, float dev_mount_rz, float dev_filer_hz, FlowManagerArgsPtr flow_manager_args = nullptr)#

Saves the external F/T (force/torque) sensor configuration (Settings > Devices > External F/T).

Parameters:
  • robot_model – Name of the robot model.

  • dev_type – External F/T sensor model. 0 = No Sensor, 1 = AIDIN Standard, 2 = AIDIN AFT, 3 = Robotous 60HA01.

  • dev_mount_opt – Mounting option. 0 = Default Mount, 1 = Custom Mount.

  • dev_mount_rx – Custom mount rotation about X, relative to the flange (deg). Used when dev_mount_opt is Custom Mount.

  • dev_mount_ry – Custom mount rotation about Y, relative to the flange (deg). Used when dev_mount_opt is Custom Mount.

  • dev_mount_rz – Custom mount rotation about Z, relative to the flange (deg). Used when dev_mount_opt is Custom Mount.

  • dev_filer_hz – Signal low-pass filter cutoff frequency (Hz).

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronously) once the response is received, provided its return_value is 0; a nonzero return_value raises before flow_manager_args.done() is reached.

Throws:

std::runtime_error – If the query fails or no payload is returned.

Returns:

IPC::Response_FunctionsT containing the save result.

IPC::Response_CallConfigCommunicationT call_config_communication(const std::string &robot_model, FlowManagerArgsPtr flow_manager_args = nullptr)#

Reads the saved field-bus / fieldbus-like communication configuration for all 13 supported protocols (Settings > Devices > Communication).

Returns the on/off mode and port number currently saved for each of Modbus, TCP Command, TCP Data, UDP Command, UDP Data, EtherNet/IP External, EtherNet/IP Internal, PROFINET, OPC-UA, MQTT, REST API, RTDE, and gRPC.

Parameters:
  • robot_model – Name of the robot model.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronously) after the response is received.

Throws:

std::runtime_error – If the query fails or no payload is returned.

Returns:

IPC::Response_CallConfigCommunicationT containing the mode_* / port_* pair for each of the 13 protocols.

IPC::Response_FunctionsT call_communication_para_mbus(const std::string &robot_model, int mode, int port, FlowManagerArgsPtr flow_manager_args = nullptr)#

Saves the Modbus communication parameters (Settings > Devices > Communication > Modbus TCP).

Parameters:
  • robot_model – Name of the robot model.

  • mode – Modbus server mode. 0 = Off, 1 = On.

  • port – TCP port the Modbus server listens on.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronously) once the response is received, provided its return_value is 0; a nonzero return_value raises before flow_manager_args.done() is reached.

Throws:

std::runtime_error – If the query fails or no payload is returned.

Returns:

IPC::Response_FunctionsT containing the save result.

IPC::Response_FunctionsT call_communication_para_tcpcmd(const std::string &robot_model, int mode, int port, FlowManagerArgsPtr flow_manager_args = nullptr)#

Saves the TCP ASCII Command channel communication parameters (Settings > Devices > Communication > TCP Ascii Command).

Same parameter shape as call_communication_para_mbus (mode, port); this configures Rainbow’s own ASCII-text TCP command-and-control channel rather than a third-party fieldbus protocol.

Parameters:
  • robot_model – Name of the robot model.

  • mode – TCP ASCII Command server mode. 0 = Off, 1 = On.

  • port – TCP port the ASCII Command server listens on.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronously) once the response is received, provided its return_value is 0; a nonzero return_value raises before flow_manager_args.done() is reached.

Throws:

std::runtime_error – If the query fails or no payload is returned.

Returns:

IPC::Response_FunctionsT containing the save result.

IPC::Response_FunctionsT call_communication_para_tcpdatda(const std::string &robot_model, int mode, int port, FlowManagerArgsPtr flow_manager_args = nullptr)#

Saves the TCP ASCII Data channel communication parameters (Settings > Devices > Communication > TCP Ascii Data).

Same parameter shape as call_communication_para_mbus: mode (0 = Off, 1 = On) and port (listen port). This configures Rainbow’s own ASCII-text TCP realtime-data streaming channel.

Parameters:
  • robot_model – Name of the robot model.

  • mode – TCP ASCII Data server mode. 0 = Off, 1 = On.

  • port – TCP port the ASCII Data server listens on.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronously) once the response is received, provided its return_value is 0; a nonzero return_value raises before flow_manager_args.done() is reached.

Throws:

std::runtime_error – If the query fails or no payload is returned.

Returns:

IPC::Response_FunctionsT containing the save result.

IPC::Response_FunctionsT call_communication_para_udpcmd(const std::string &robot_model, int mode, int port, FlowManagerArgsPtr flow_manager_args = nullptr)#

Saves the UDP ASCII Command channel communication parameters (Settings > Devices > Communication > UDP Ascii Command).

Same parameter shape as call_communication_para_mbus: mode (0 = Off, 1 = On) and port (listen port). UDP counterpart of call_communication_para_tcpcmd.

Parameters:
  • robot_model – Name of the robot model.

  • mode – UDP ASCII Command server mode. 0 = Off, 1 = On.

  • port – UDP port the ASCII Command server listens on.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronously) once the response is received, provided its return_value is 0; a nonzero return_value raises before flow_manager_args.done() is reached.

Throws:

std::runtime_error – If the query fails or no payload is returned.

Returns:

IPC::Response_FunctionsT containing the save result.

IPC::Response_FunctionsT call_communication_para_udpdatda(const std::string &robot_model, int mode, int port, FlowManagerArgsPtr flow_manager_args = nullptr)#

Saves the UDP ASCII Data channel communication parameters (Settings > Devices > Communication > UDP Ascii Data).

Same parameter shape as call_communication_para_mbus: mode (0 = Off, 1 = On) and port (listen port). UDP counterpart of call_communication_para_tcpdatda.

Parameters:
  • robot_model – Name of the robot model.

  • mode – UDP ASCII Data server mode. 0 = Off, 1 = On.

  • port – UDP port the ASCII Data server listens on.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronously) once the response is received, provided its return_value is 0; a nonzero return_value raises before flow_manager_args.done() is reached.

Throws:

std::runtime_error – If the query fails or no payload is returned.

Returns:

IPC::Response_FunctionsT containing the save result.

IPC::Response_FunctionsT call_communication_para_eipext(const std::string &robot_model, int mode, int port, FlowManagerArgsPtr flow_manager_args = nullptr)#

Saves the EtherNet/IP Explicit Messaging communication parameters (Settings > Devices > Communication > EtherNet/IP Explicit).

Same parameter shape as call_communication_para_mbus: mode (0 = Off, 1 = On) and port (listen port). Explicit Messaging is EtherNet/IP’s request/response (TCP) channel, as opposed to the cyclic I/O channel configured by call_communication_para_eipint.

Parameters:
  • robot_model – Name of the robot model.

  • mode – EtherNet/IP Explicit Messaging server mode. 0 = Off, 1 = On.

  • port – TCP port the EtherNet/IP Explicit Messaging server listens on.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronously) once the response is received, provided its return_value is 0; a nonzero return_value raises before flow_manager_args.done() is reached.

Throws:

std::runtime_error – If the query fails or no payload is returned.

Returns:

IPC::Response_FunctionsT containing the save result.

IPC::Response_FunctionsT call_communication_para_eipint(const std::string &robot_model, int mode, int port, FlowManagerArgsPtr flow_manager_args = nullptr)#

Saves the EtherNet/IP Implicit Messaging communication parameters (Settings > Devices > Communication > EtherNet/IP Implicit).

Same parameter shape as call_communication_para_mbus: mode (0 = Off, 1 = On) and port (listen port). Implicit Messaging is EtherNet/IP’s cyclic I/O (UDP) channel, as opposed to the request/response channel configured by call_communication_para_eipext.

Parameters:
  • robot_model – Name of the robot model.

  • mode – EtherNet/IP Implicit Messaging server mode. 0 = Off, 1 = On.

  • port – Port the EtherNet/IP Implicit Messaging server listens on.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronously) once the response is received, provided its return_value is 0; a nonzero return_value raises before flow_manager_args.done() is reached.

Throws:

std::runtime_error – If the query fails or no payload is returned.

Returns:

IPC::Response_FunctionsT containing the save result.

IPC::Response_FunctionsT call_communication_para_pnet(const std::string &robot_model, int mode, int port, FlowManagerArgsPtr flow_manager_args = nullptr)#

Saves the PROFINET communication parameters (Settings > Devices > Communication > ProfiNET).

Same parameter shape as call_communication_para_mbus: mode (0 = Off, 1 = On) and port (listen port).

Parameters:
  • robot_model – Name of the robot model.

  • mode – PROFINET server mode. 0 = Off, 1 = On.

  • port – Port the PROFINET server listens on.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronously) once the response is received, provided its return_value is 0; a nonzero return_value raises before flow_manager_args.done() is reached.

Throws:

std::runtime_error – If the query fails or no payload is returned.

Returns:

IPC::Response_FunctionsT containing the save result.

IPC::Response_FunctionsT call_communication_para_opcua(const std::string &robot_model, int mode, int port, FlowManagerArgsPtr flow_manager_args = nullptr)#

Saves the OPC-UA communication parameters (Settings > Devices > Communication > OPC-UA).

Same parameter shape as call_communication_para_mbus: mode (0 = Off, 1 = On) and port (listen port).

Parameters:
  • robot_model – Name of the robot model.

  • mode – OPC-UA server mode. 0 = Off, 1 = On.

  • port – Port the OPC-UA server listens on.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronously) once the response is received, provided its return_value is 0; a nonzero return_value raises before flow_manager_args.done() is reached.

Throws:

std::runtime_error – If the query fails or no payload is returned.

Returns:

IPC::Response_FunctionsT containing the save result.

IPC::Response_FunctionsT call_communication_para_mqtt(const std::string &robot_model, int mode, int port, FlowManagerArgsPtr flow_manager_args = nullptr)#

Saves the MQTT communication parameters (Settings > Devices > Communication > MQTT).

Same parameter shape as call_communication_para_mbus: mode (0 = Off, 1 = On) and port (listen port).

Note

The MQTT settings card is currently commented out in the robot’s settings UI; this SDK call and its firmware handler are still present and functional.

Parameters:
  • robot_model – Name of the robot model.

  • mode – MQTT server mode. 0 = Off, 1 = On.

  • port – Port the MQTT server listens on.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronously) once the response is received, provided its return_value is 0; a nonzero return_value raises before flow_manager_args.done() is reached.

Throws:

std::runtime_error – If the query fails or no payload is returned.

Returns:

IPC::Response_FunctionsT containing the save result.

IPC::Response_FunctionsT call_communication_para_restapi(const std::string &robot_model, int mode, int port, FlowManagerArgsPtr flow_manager_args = nullptr)#

Saves the REST API communication parameters (Settings > Devices > Communication > Rest API).

Same parameter shape as call_communication_para_mbus: mode (0 = Off, 1 = On) and port (listen port).

Parameters:
  • robot_model – Name of the robot model.

  • mode – REST API server mode. 0 = Off, 1 = On.

  • port – Port the REST API server listens on.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronously) once the response is received, provided its return_value is 0; a nonzero return_value raises before flow_manager_args.done() is reached.

Throws:

std::runtime_error – If the query fails or no payload is returned.

Returns:

IPC::Response_FunctionsT containing the save result.

IPC::Response_FunctionsT call_communication_para_rtde(const std::string &robot_model, int mode, int port, FlowManagerArgsPtr flow_manager_args = nullptr)#

Saves the RTDE communication parameters (Settings > Devices > Communication > RTDE).

Same parameter shape as call_communication_para_mbus: mode (0 = Off, 1 = On) and port (listen port).

Parameters:
  • robot_model – Name of the robot model.

  • mode – RTDE server mode. 0 = Off, 1 = On.

  • port – Port the RTDE server listens on.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronously) once the response is received, provided its return_value is 0; a nonzero return_value raises before flow_manager_args.done() is reached.

Throws:

std::runtime_error – If the query fails or no payload is returned.

Returns:

IPC::Response_FunctionsT containing the save result.

IPC::Response_FunctionsT call_communication_para_grpc(const std::string &robot_model, int mode, int port, FlowManagerArgsPtr flow_manager_args = nullptr)#

Saves the gRPC communication parameters (Settings > Devices > Communication > gRPC).

Same parameter shape as call_communication_para_mbus: mode (0 = Off, 1 = On) and port (listen port).

Parameters:
  • robot_model – Name of the robot model.

  • mode – gRPC server mode. 0 = Off, 1 = On.

  • port – Port the gRPC server listens on.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronously) once the response is received, provided its return_value is 0; a nonzero return_value raises before flow_manager_args.done() is reached.

Throws:

std::runtime_error – If the query fails or no payload is returned.

Returns:

IPC::Response_FunctionsT containing the save result.

IPC::Response_CallConfigSoftPLCT call_config_softplc(const std::string &robot_model, FlowManagerArgsPtr flow_manager_args = nullptr)#

Reads the saved Software PLC rule table (Settings > Devices > Software PLC).

Returns the configuration of all 32 Software PLC rule slots. Each slot is a simple ladder-logic-style rule: “IF (Input A) [operator]

(Input B) THEN (Output)”, evaluated while the slot’s mode condition holds — see

save_softplc_parameter for field semantics. Every response field is a length-32 array indexed by PLC slot number.

Parameters:
  • robot_model – Name of the robot model.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronously) after the response is received.

Throws:

std::runtime_error – If the query fails or no payload is returned.

Returns:

IPC::Response_CallConfigSoftPLCT containing the 32 saved rule slots (one entry per array index).

IPC::Response_FunctionsT save_softplc_parameter(const std::string &robot_model, int plcnum, int mode, int operation, int input_a_type, int input_a_select, int input_b_type, int input_b_select, int output_type, int output_select, int output_value, FlowManagerArgsPtr flow_manager_args = nullptr)#

Saves one Software PLC rule slot (Settings > Devices > Software PLC).

Configures a ladder-logic-style rule: “IF (Input A) [operation]

(Input B) THEN (Output)”, active while the

mode condition holds. The meaning of input_a_select / input_b_select / output_select depends on the paired input_a_type / input_b_type / output_type — see apps/web/nexus/src/constants/software-plc-opts.c.ts in the frontend repo for the full per-type option index tables (I/O signal numbers, system status/parameter indices, data field indices, output signal numbers, etc.).

Parameters:
  • robot_model – Name of the robot model.

  • plcnum – PLC rule slot to configure, in the range [0, 31].

  • mode – Condition under which the rule is active. 0 = Off, 1 = Always, 2 = Idle, 3 = Playing, 4 = Moving.

  • operation – Operator combining Input A and Input B. 0 = ==, 1 = !=, 2 = >, 3 = <, 4 = >=, 5 = <=, 6 = logical AND, 7 = logical OR, 8 = + (add), 9 = x (multiply), 10 = bitwise AND, 11 = bitwise OR.

  • input_a_type – Category of Input A. 0 = I/O Signal, 1 = System Status, 2 = System Parameter, 3 = Data Communication, 4 = Data Dummy, 5 = Signal Level, 6 = User Number (literal value).

  • input_a_select – Index within input_a_type's option list selecting Input A (or, when input_a_type is 6, the literal value itself).

  • input_b_type – Category of Input B, same encoding as input_a_type.

  • input_b_select – Index within input_b_type's option list selecting Input B (or the literal value, as with input_a_select).

  • output_type – Category of the rule’s Output. 0 = Signal Output, 1 = Ex System Function, 2 = Value Substitution, 3 = Value Direct Enter.

  • output_select – Index within output_type's option list selecting the output target.

  • output_value – Literal value written to the output when output_type is 3 (Value Direct Enter).

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronously) once the response is received, provided its return_value is 0; a nonzero return_value raises before flow_manager_args.done() is reached.

Throws:

std::runtime_error – If the query fails or no payload is returned.

Returns:

IPC::Response_FunctionsT containing the save result.

IPC::Response_CallConfigExtAxisT call_config_extaxis(const std::string &robot_model, FlowManagerArgsPtr flow_manager_args = nullptr)#

Reads the saved external axis configuration for all 7 external axis slots (Settings > Devices > External Axis).

Every response field is a length-7 array indexed by external axis (joint) number, mirroring the basic parameters saved via call_extaxis_para_basic. It additionally exposes internal kinematics fields (offset_x/y/z, axis_x/y/z, dummyaxis_x/y/z) not shown in the settings UI and not settable through this SDK’s external-axis functions.

Parameters:
  • robot_model – Name of the robot model.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronously) after the response is received.

Throws:

std::runtime_error – If the query fails or no payload is returned.

Returns:

IPC::Response_CallConfigExtAxisT containing the 7 saved external axis configurations (one entry per array index).

IPC::Response_FunctionsT call_extaxis_para_basic(const std::string &robot_model, int joint_no, int type, int device, float max_a, float max_v, float min_p, float max_p, float jog_a, float jog_v, float encoder, float reduction, int can_id, int can_ch, FlowManagerArgsPtr flow_manager_args = nullptr)#

Saves the basic configuration for one external axis (Settings > Devices > External Axis).

Parameters:
  • robot_model – Name of the robot model.

  • joint_no – External axis slot to configure, in the range [0, 6].

  • type – Axis type. 0 = No axis, 1 = Revolute, 2 = Linear.

  • device – Device driving the axis. 0 = RSauto.

  • max_a – Maximum acceleration.

  • max_v – Maximum velocity.

  • min_p – Minimum position limit.

  • max_p – Maximum position limit.

  • jog_a – Jog acceleration rate.

  • jog_v – Jog velocity rate.

  • encoder – Encoder resolution.

  • reduction – Gear reduction ratio.

  • can_id – CAN ID.

  • can_ch – CAN Channel.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronously) once the response is received, provided its return_value is 0; a nonzero return_value raises before flow_manager_args.done() is reached.

Throws:

std::runtime_error – If the query fails or no payload is returned.

Returns:

IPC::Response_FunctionsT containing the save result.

IPC::Response_FunctionsT call_extaxis_calib_clr(const std::string &robot_model, int joint_no, FlowManagerArgsPtr flow_manager_args = nullptr)#

Clears accumulated calibration samples for an external axis, starting a new calibration sequence (Move > Calibration > External Axis > Calibration Start Button).

Call this first, then call_extaxis_calib_add one or more times to record sample points, then call_extaxis_calib_run to compute and apply the result.

Parameters:
  • robot_model – Name of the robot model.

  • joint_no – External axis slot to calibrate, in the range [0, 6].

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronously) once the response is received, provided its return_value is 0; a nonzero return_value raises before flow_manager_args.done() is reached.

Throws:

std::runtime_error – If the query fails or no payload is returned.

Returns:

IPC::Response_FunctionsT containing the command result.

IPC::Response_FunctionsT call_extaxis_calib_add(const std::string &robot_model, int joint_no, FlowManagerArgsPtr flow_manager_args = nullptr)#

Records the current position as a calibration sample point for an external axis (Move > Calibration > External Axis > Calibration Add+ Button).

Call once per sample point after call_extaxis_calib_clr; call again for each additional point, then finish with call_extaxis_calib_run.

Parameters:
  • robot_model – Name of the robot model.

  • joint_no – External axis slot being calibrated, in the range [0, 6].

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronously) once the response is received, provided its return_value is 0; a nonzero return_value raises before flow_manager_args.done() is reached.

Throws:

std::runtime_error – If the query fails or no payload is returned.

Returns:

IPC::Response_FunctionsT containing the command result.

IPC::Response_FunctionsT call_extaxis_calib_run(const std::string &robot_model, int joint_no, FlowManagerArgsPtr flow_manager_args = nullptr)#

Computes and applies the external axis calibration from the recorded sample points (Move > Calibration > External Axis > Calibration Finish Button).

Finishes the sequence started by call_extaxis_calib_clr and continued with one or more call_extaxis_calib_add calls.

Parameters:
  • robot_model – Name of the robot model.

  • joint_no – External axis slot being calibrated, in the range [0, 6].

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronously) once the response is received, provided its return_value is 0; a nonzero return_value raises before flow_manager_args.done() is reached.

Throws:

std::runtime_error – If the query fails or no payload is returned.

Returns:

IPC::Response_FunctionsT containing the calibration result.

IPC::Response_FunctionsT set_extft_software_nulling(const std::string &robot_model, int mode, FlowManagerArgsPtr flow_manager_args = nullptr)#

Sets the software nulling mode of the external F/T sensor.

Starts software nulling of the external F/T sensor, or restores its original (un-nulled) values.

Parameters:
  • robot_model – Name of the robot model.

  • mode – Nulling mode. 0: Return to Original Value, 1: Start Software Nulling.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the query fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the result of the request.

IPC::Response_FunctionsT call_move_push(const std::string &robot_model, int force_type, int frame_type, float sensitivity_x, float sensitivity_y, float sensitivity_z, FlowManagerArgsPtr flow_manager_args = nullptr)#

Starts force-based push motion of the cobot.

Moves the cobot in response to external force applied to it, using the selected force sensor and reference frame. Per-axis sensitivity scales how strongly the cobot reacts to the applied force.

Parameters:
  • robot_model – Name of the robot model.

  • force_type – Force sensor used to detect the applied force.

    • 0: Internal joint sensor

    • 1: External F/T sensor

  • frame_type – Reference frame for the push motion.

    • 0: Global

    • 1: Local

    • 2: User

  • sensitivity_x – Push sensitivity along the X axis, in the range [0, 1] (shown as 0–100% in the UI).

  • sensitivity_y – Push sensitivity along the Y axis, in the range [0, 1] (shown as 0–100% in the UI).

  • sensitivity_z – Push sensitivity along the Z axis, in the range [0, 1] (shown as 0–100% in the UI).

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once the result is received.

Throws:

std::runtime_error – If the request fails or the result cannot be retrieved.

Returns:

IPC::Response_FunctionsT containing the result of the request.

IPC::Response_Data_Log_GetT call_datalog_get(const std::string &robot_model, FlowManagerArgsPtr flow_manager_args = nullptr)#

Retrieves the data recorded by the data logging session.

Fetches the data items recorded between call_datalog_start() and call_datalog_done(). Each item is returned as a name paired with its recorded sample values.

See also

call_datalog_start

See also

call_datalog_done

Parameters:
  • robot_model – Name of the robot model.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronously) once the response is received.

Throws:

std::runtime_error – If the query fails or no payload is returned.

Returns:

IPC::Response_Data_Log_GetT containing the recorded data. Each entry in datas holds:

  • name: Name of the logged data item (variable).

  • data: Recorded sample values of the item in chronological order, sampled at 500 Hz (i.e., one sample every 2 ms).

Public Static Functions

static inline std::string type_name()#

Private Members

RBManipulateMoveSDK _move_sdk#

manipulate/manipulate_state.hpp#

class RBManipulateStateSDK : public RBBaseSDK#

Public Functions

inline RBManipulateStateSDK()#
IPC::State_CoreT state_core(const std::string &robot_model)#

Retrieves the latest published core state snapshot of the robot.

Waits for and returns the most recent message on the robot’s state_core topic, which carries joint/Cartesian references and encoder readings, tool and I/O state, motion status, and force/torque data. This is the same topic that call_move_j and the other move functions in RBManipulateMoveSDK subscribe to internally in order to detect motion completion via motion_sub_index and timestamp_usec_mono.

Parameters:

robot_model – Name of the robot model. A single, non-wildcard model name is required.

Throws:

std::runtime_error – If robot_model contains a wildcard (*) character.

Returns:

IPC::State_CoreT containing the current state snapshot.

std::vector<IPC::Response_CallWhoamIT> call_whoami(const std::string &robot_model, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests identification information from the robot.

Queries the robot for its category, model name, firmware version, and alias. robot_model may be a zenoh key-expression that matches more than one robot (unlike state_core, which rejects wildcards); each matching robot returns its own reply, so the result is a list with one entry per robot instead of a single response.

Parameters:
  • robot_model – Name of the robot model. May be a key-expression matching multiple robots.

  • flow_manager_args – Optional PyFM step context, accepted for API consistency with the other functions in this class; this function never reports completion through it (it always returns synchronously with the query result).

Throws:

std::runtime_error – If no robot replies before the timeout.

Returns:

List of IPC::Response_CallWhoamIT, one per robot that replied.

std::vector<IPC::Response_FunctionsT> call_powercontrol(const std::string &robot_model, const int power_option, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to turn its main power on or off.

robot_model may be a zenoh key-expression that matches more than one robot; each matching robot returns its own reply, so the result is a list with one entry per robot instead of a single response.

Parameters:
  • robot_model – Name of the robot model. May be a key-expression matching multiple robots.

  • power_option – Power state value. 0 = power off, 1 = power on (with the normal pre-power-on check), 2 = power on without that check (labeled “force on” in the operator UI). Any other value is treated as power off.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once every matched robot has replied.

Throws:

std::runtime_error – If no robot replies before the timeout.

Returns:

List of IPC::Response_FunctionsT, one per robot that replied.

std::vector<IPC::Response_FunctionsT> call_servocontrol(const std::string &robot_model, const int servo_option, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to turn its servo on.

Every accepted value of servo_option turns the servo on; there is no value that turns it off through this call (main power must be turned off via call_powercontrol to de-energize the motors).

robot_model may be a zenoh key-expression that matches more than one robot; each matching robot returns its own reply, so the result is a list with one entry per robot instead of a single response.

Parameters:
  • robot_model – Name of the robot model. May be a key-expression matching multiple robots.

  • servo_option – Servo-on mode. 0 = basic servo-on, 1 = basic servo-on plus reference-on, 2 = emergency teaching (hand guiding) mode. Any other value is treated as 0.

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once every matched robot has replied.

Throws:

std::runtime_error – If no robot replies before the timeout.

Returns:

List of IPC::Response_FunctionsT, one per robot that replied.

std::vector<IPC::Response_FunctionsT> call_referencecontrol(const std::string &robot_model, const int reference_option, FlowManagerArgsPtr flow_manager_args = nullptr)#

Requests the cobot to switch between simulation and real operation reference.

Turning the reference on requires the servo to already be fully on; the request is rejected otherwise. When turned on, the robot’s internal motion reference is re-initialized from the current encoder position of every joint.

robot_model may be a zenoh key-expression that matches more than one robot; each matching robot returns its own reply, so the result is a list with one entry per robot instead of a single response.

Parameters:
  • robot_model – Name of the robot model. May be a key-expression matching multiple robots.

  • reference_option – Robot operation reference value. 0 = Simulation (operates in simulation mode), 1 = Real (operates the actual robot).

  • flow_manager_args – Optional PyFM step context. If provided, completion is reported to the flow manager immediately (synchronous) once every matched robot has replied.

Throws:

std::runtime_error – If no robot replies before the timeout.

Returns:

List of IPC::Response_FunctionsT, one per robot that replied.

void publish_state_core(const std::string &robot_model, const IPC::State_CoreT &state_core)#

Publishes a core state message on the robot’s state_core topic.

Publishes state_core to {robot_model}/state_core, the same topic that state_core reads from and that call_move_j and the other move functions in RBManipulateMoveSDK subscribe to for detecting motion completion. On a live robot this topic is normally published to periodically by the robot’s own firmware; calling this against a live robot’s topic competes with that periodic publish.

Parameters:
  • robot_model – Name of the robot model.

  • state_core – State snapshot to publish.

Public Static Functions

static inline std::string type_name()#

manipulate/manipulate_vision.hpp#

Typedefs

using AlarmFn = ::AlarmFn

Alarm callback used by vision interface calls.

class RBManipulateVisionSDK : public RBBaseSDK#
#include <manipulate_vision.hpp>

SDK for Mech-Mind, Photoneo, and Pickit3D vendor vision integrations.

Public Functions

inline RBManipulateVisionSDK()#
~RBManipulateVisionSDK() override#
virtual void before_close() override#

Disconnects vendor vision clients owned by this SDK.

mechmind::MechMindClient *execute_mechmind_connect(const std::string &module_name, muscat::InterfaceMechMindPayloadT data, FlowManagerArgsPtr flow_manager_args, AlarmFn alarm_fn)#

Connects to a MechMind vision server and registers the client under module_name.

Reads connection parameters from data (server_ip, server_port, an optional timeout_sec defaulting to 10 seconds, an optional project_id defaulting to 1) and opens a MechMind TCP connection, storing the resulting client in the per-module connection registry so later calls (trigger, get_poses, …) can look it up by the same module_name.

Note

If the native connect call fails without throwing (client non-null but not connected), that failure is only logged to stdout — it does not go through resolve_option’s SKIP/STOP/ASK handling, unlike an actual vendor exception.

Note

Calling this again with the same module_name transparently disconnects the previous client for that module before opening the new connection.

Parameters:
  • module_name – Registry key for the connection, normally the PyFM task id resolved from flow_manager_args.

  • data – Connect payload. Must contain server_ip and server_port; timeout_sec and project_id are optional.

  • flow_manager_args – Optional PyFM step context. When provided, flow_manager_args.done() is called unconditionally once the connection attempt finishes, even if it failed.

  • alarm_fn – Optional (title, content) callback used only when data's resolve_option is “ASK”.

Throws:

std::runtime_error – If server_ip or server_port is missing, or if resolve_option is invalid; and, if resolve_option is “STOP”, if the native connect call throws.

Returns:

Pointer to the connected mechmind::MechMindClient, owned by the SDK’s connection registry (do not delete it). May be null, or non-null but not connected, if the attempt failed.

mechmind::VisionResponse execute_mechmind_trigger_and_get_poses(mechmind::MechMindClient *client, int project_id, const std::string &position, const std::string &return_variable_name, std::optional<IPC::State_CoreT> state_core = std::nullopt, const std::string &resolve_option = "SKIP", FlowManagerArgsPtr flow_manager_args = nullptr, AlarmFn alarm_fn = nullptr)#

Triggers a MechMind capture + recognition and reads the detected poses in one round-trip.

Standalone equivalent of function_code=0 (“Trigger And Get Poses”) of the MechMind READ interface. When position is “EYE_TO_HAND” the camera is fixed off the robot, so no robot-pose correction is sent. Otherwise (position is “EYE_IN_HEAD”) the camera is mounted on the robot, so the current TCP pose, joint positions and tool TCP offset (all derived from state_core) are sent so the vendor can correct for the arm’s current pose.

Parameters:
  • client – Connected MechMind client, e.g. from execute_mechmind_connect.

  • project_id – MechMind project id to trigger against.

  • position – “EYE_TO_HAND” or “EYE_IN_HEAD” — selects whether robot-pose correction is sent, see above.

  • return_variable_name – PyFM variable name that will receive the detected poses as a list of [x, y, z, rx, ry, rz] entries.

  • state_core – Robot state snapshot used for pose correction. Required when position is not “EYE_TO_HAND”.

  • resolve_option – How to handle a client-side failure — client not connected, or the native call throwing a MechMind exception: “SKIP” continues without effect, “STOP” raises immediately, “ASK” fires alarm_fn and pauses the PyFM context (requires flow_manager_args). Defaults to “SKIP”.

  • flow_manager_args – Optional PyFM step context. On success, return_variable_name is written into its context and flow_manager_args.done() is called.

  • alarm_fn – Optional (title, content) callback used only when resolve_option is “ASK”.

Throws:

std::runtime_error – If position is not “EYE_TO_HAND” and state_core is not provided; and, under “STOP”, if the native call throws.

Returns:

mechmind::VisionResponse with the detected poses. A default-constructed (empty) response if client is null, not connected, or the call failed under “SKIP”/”ASK”.

mechmind::VisionResponse execute_mechmind_get_poses(mechmind::MechMindClient *client, int project_id, const std::string &return_variable_name, const std::string &resolve_option = "SKIP", FlowManagerArgsPtr flow_manager_args = nullptr, AlarmFn alarm_fn = nullptr)#

Reads the poses detected by the most recent MechMind trigger.

Standalone equivalent of function_code=2 (“Get Poses”) of the MechMind READ interface. Unlike execute_mechmind_trigger_and_get_poses, this does not trigger a new capture — it only re-reads the result of whichever trigger (via execute_mechmind_trigger or execute_mechmind_trigger_and_get_poses) ran most recently for project_id.

Parameters:
  • client – Connected MechMind client.

  • project_id – MechMind project id to read poses for.

  • return_variable_name – PyFM variable name that will receive the detected poses as a list of [x, y, z, rx, ry, rz] entries.

  • resolve_option – How to handle a client-side failure — client not connected, or the native call throwing a MechMind exception: “SKIP” continues without effect, “STOP” raises immediately, “ASK” fires alarm_fn and pauses the PyFM context (requires flow_manager_args). Defaults to “SKIP”.

  • flow_manager_args – Optional PyFM step context. On success, return_variable_name is written into its context and flow_manager_args.done() is called.

  • alarm_fn – Optional (title, content) callback used only when resolve_option is “ASK”.

Throws:

std::runtime_error – Under “STOP”, if the native call throws.

Returns:

mechmind::VisionResponse with the detected poses. A default-constructed (empty) response if client is null, not connected, or the call failed under “SKIP”/”ASK”.

bool execute_mechmind_trigger(mechmind::MechMindClient *client, int project_id, int expected_count, const std::string &position, std::optional<IPC::State_CoreT> stat_core = std::nullopt, const std::string &resolve_option = "SKIP", FlowManagerArgsPtr flow_manager_args = nullptr, AlarmFn alarm_fn = nullptr)#

Triggers a MechMind capture + recognition without reading the resulting poses.

Standalone equivalent of function_code=1 (“Trigger”) of the MechMind WRITE interface. Same position/robot-pose-correction rule as execute_mechmind_trigger_and_get_poses: no robot pose is sent for “EYE_TO_HAND”, otherwise it is derived from stat_core. Call execute_mechmind_get_poses afterwards to read the detection result.

Parameters:
  • client – Connected MechMind client.

  • project_id – MechMind project id to trigger against.

  • expected_count – Expected number of objects to detect; passed through to the native trigger call.

  • position – “EYE_TO_HAND” or “EYE_IN_HEAD” — selects whether robot-pose correction is sent.

  • stat_core – Robot state snapshot used for pose correction. Required when position is not “EYE_TO_HAND”.

  • resolve_option – How to handle a client-side failure — client not connected, or the native call throwing a MechMind exception: “SKIP” continues without effect, “STOP” raises immediately, “ASK” fires alarm_fn and pauses the PyFM context (requires flow_manager_args). Defaults to “SKIP”.

  • flow_manager_args – Optional PyFM step context. On success, flow_manager_args.done() is called.

  • alarm_fn – Optional (title, content) callback used only when resolve_option is “ASK”.

Throws:

std::runtime_error – If position is not “EYE_TO_HAND” and stat_core is not provided; and, under “STOP”, if the native call throws.

Returns:

true on success; false if client is null, not connected, or the call failed under “SKIP”/”ASK” (the native call itself always returns true when it doesn’t throw).

bool execute_mechmind_set_recipe(mechmind::MechMindClient *client, int project_id, int recipe_id, const std::string &resolve_option = "SKIP", FlowManagerArgsPtr flow_manager_args = nullptr, AlarmFn alarm_fn = nullptr)#

Switches the active MechMind recipe for a project.

Standalone equivalent of function_code=3 (“Set Recipe”) of the MechMind WRITE interface.

Parameters:
  • client – Connected MechMind client.

  • project_id – MechMind project id to switch the recipe on.

  • recipe_id – Recipe id to activate.

  • resolve_option – How to handle a client-side failure — client not connected, or the native call throwing a MechMind exception: “SKIP” continues without effect, “STOP” raises immediately, “ASK” fires alarm_fn and pauses the PyFM context (requires flow_manager_args). Defaults to “SKIP”.

  • flow_manager_args – Optional PyFM step context. On success, flow_manager_args.done() is called.

  • alarm_fn – Optional (title, content) callback used only when resolve_option is “ASK”.

Throws:

std::runtime_error – Under “STOP”, if the native call throws.

Returns:

true on success; false if client is null, not connected, or the call failed under “SKIP”/”ASK”.

photoneo::PhotoneoClient *execute_photoneo_connect(const std::string &module_name, muscat::InterfacePhotoneoPayloadT data, FlowManagerArgsPtr flow_manager_args, AlarmFn alarm_fn)#

Connects to a Photoneo Bin Picking Studio (BPS) server and registers the client under module_name.

Reads connection parameters from data (server_ip, server_port, an optional timeout_sec defaulting to 10 seconds) and opens a Photoneo TCP connection, storing the resulting client in the per-module connection registry so later calls (initialize, scan, …) can look it up by the same module_name.

Note

If the native connect call fails without throwing (client non-null but not connected), that failure is only logged to stdout — it does not go through resolve_option’s SKIP/STOP/ASK handling, unlike an actual vendor exception.

Note

Calling this again with the same module_name transparently disconnects the previous client for that module before opening the new connection.

Parameters:
  • module_name – Registry key for the connection, normally the PyFM task id resolved from flow_manager_args.

  • data – Connect payload. Must contain server_ip and server_port; timeout_sec is optional.

  • flow_manager_args – Optional PyFM step context. When provided, flow_manager_args.done() is called unconditionally once the connection attempt finishes, even if it failed.

  • alarm_fn – Optional (title, content) callback used only when data's resolve_option is “ASK”.

Throws:

std::runtime_error – If server_ip or server_port is missing, or if resolve_option is invalid; and, if resolve_option is “STOP”, if the native connect call throws.

Returns:

Pointer to the connected photoneo::PhotoneoClient, owned by the SDK’s connection registry (do not delete it). May be null, or non-null but not connected, if the attempt failed.

photoneo::AckResponse execute_photoneo_initialize(photoneo::PhotoneoClient *client, uint32_t vision_system_id, muscat::PhotoneoJointTargetT start_joint, muscat::PhotoneoJointTargetT end_joint, const std::string &resolve_option = "SKIP", FlowManagerArgsPtr flow_manager_args = nullptr, AlarmFn alarm_fn = nullptr)#

Initializes a Photoneo vision system with its scan-approach start/end joint targets.

Standalone equivalent of function_code=0 (“Initialize”) of the Photoneo WRITE interface.

Parameters:
  • client – Connected Photoneo client.

  • vision_system_id – Photoneo vision system id to initialize. 0 uses the client’s configured default.

  • start_joint – Joint target dict with a required “tar_values” entry (6 joint angles in degrees; 7-axis input is reduced to 6 by dropping the third element). If “input_method” is 1, the target actually used is instead the required “ref_point” entry (a resolved list of joint values, not a variable name — PyFM already substitutes it before this call); “tar_values” is still required to be present but is ignored in that case.

  • end_joint – Same shape as start_joint, for the scan’s end joint target.

  • resolve_option – How to handle a client-side failure — client not connected, or the native call throwing a Photoneo exception: “SKIP” continues without effect, “STOP” raises immediately, “ASK” fires alarm_fn and pauses the PyFM context (requires flow_manager_args). Defaults to “SKIP”.

  • flow_manager_args – Optional PyFM step context. On success, flow_manager_args.done() is called.

  • alarm_fn – Optional (title, content) callback used only when resolve_option is “ASK”.

Throws:

std::runtime_error – If either joint dict is missing “tar_values” (or “ref_point” when input_method=1), or does not resolve to exactly 6 joint values; and, under “STOP”, if the native call throws.

Returns:

photoneo::AckResponse. A default-constructed (error_code=0) response if client is null, not connected, or the call failed under “SKIP”/”ASK”.

photoneo::AckResponse execute_photoneo_scan(photoneo::PhotoneoClient *client, uint32_t vision_system_id, const IPC::State_CoreT &stat_core, const std::string &resolve_option = "SKIP", FlowManagerArgsPtr flow_manager_args = nullptr, AlarmFn alarm_fn = nullptr)#

Triggers a Photoneo scan at the robot’s current pose.

Standalone equivalent of function_code=1 (“Scan”) of the Photoneo WRITE interface. This is a Hand-Eye scan: the robot’s current TCP pose and tool TCP offset (both derived from stat_core) are sent so the vendor can compute the flange pose the scan was taken from.

Parameters:
  • client – Connected Photoneo client.

  • vision_system_id – Photoneo vision system id to scan with. 0 uses the client’s configured default.

  • stat_core – Robot state snapshot the TCP pose and tool TCP offset are derived from.

  • resolve_option – How to handle a client-side failure — client not connected, or the native call throwing a Photoneo exception: “SKIP” continues without effect, “STOP” raises immediately, “ASK” fires alarm_fn and pauses the PyFM context (requires flow_manager_args). Defaults to “SKIP”.

  • flow_manager_args – Optional PyFM step context. On success, flow_manager_args.done() is called.

  • alarm_fn – Optional (title, content) callback used only when resolve_option is “ASK”.

Throws:

std::runtime_error – Under “STOP”, if the native call throws.

Returns:

photoneo::AckResponse. A default-constructed (error_code=0) response if client is null, not connected, or the call failed under “SKIP”/”ASK”.

photoneo::AckResponse execute_photoneo_solution_change(photoneo::PhotoneoClient *client, uint32_t solution_id, const std::string &resolve_option = "SKIP", FlowManagerArgsPtr flow_manager_args = nullptr, AlarmFn alarm_fn = nullptr)#

Switches the active Photoneo solution.

Standalone equivalent of function_code=4 (“Solution Change”) of the Photoneo WRITE interface.

Parameters:
  • client – Connected Photoneo client.

  • solution_id – Solution id to switch to.

  • resolve_option – How to handle a client-side failure — client not connected, or the native call throwing a Photoneo exception: “SKIP” continues without effect, “STOP” raises immediately, “ASK” fires alarm_fn and pauses the PyFM context (requires flow_manager_args). Defaults to “SKIP”.

  • flow_manager_args – Optional PyFM step context. On success, flow_manager_args.done() is called.

  • alarm_fn – Optional (title, content) callback used only when resolve_option is “ASK”.

Throws:

std::runtime_error – Under “STOP”, if the native call throws.

Returns:

photoneo::AckResponse. A default-constructed (error_code=0) response if client is null, not connected, or the call failed under “SKIP”/”ASK”.

photoneo::AckResponse execute_photoneo_solution_start(photoneo::PhotoneoClient *client, uint32_t solution_id, const std::string &resolve_option = "SKIP", FlowManagerArgsPtr flow_manager_args = nullptr, AlarmFn alarm_fn = nullptr)#

Starts the currently active Photoneo solution.

Standalone equivalent of function_code=5 (“Solution Start”) of the Photoneo WRITE interface.

Parameters:
  • client – Connected Photoneo client.

  • solution_id – Solution id to start.

  • resolve_option – How to handle a client-side failure — client not connected, or the native call throwing a Photoneo exception: “SKIP” continues without effect, “STOP” raises immediately, “ASK” fires alarm_fn and pauses the PyFM context (requires flow_manager_args). Defaults to “SKIP”.

  • flow_manager_args – Optional PyFM step context. On success, flow_manager_args.done() is called.

  • alarm_fn – Optional (title, content) callback used only when resolve_option is “ASK”.

Throws:

std::runtime_error – Under “STOP”, if the native call throws.

Returns:

photoneo::AckResponse. A default-constructed (error_code=0) response if client is null, not connected, or the call failed under “SKIP”/”ASK”.

photoneo::AckResponse execute_photoneo_solution_stop(photoneo::PhotoneoClient *client, const std::string &resolve_option = "SKIP", FlowManagerArgsPtr flow_manager_args = nullptr, AlarmFn alarm_fn = nullptr)#

Stops the currently running Photoneo solution.

Standalone equivalent of function_code=6 (“Solution Stop”) of the Photoneo WRITE interface.

Parameters:
  • client – Connected Photoneo client.

  • resolve_option – How to handle a client-side failure — client not connected, or the native call throwing a Photoneo exception: “SKIP” continues without effect, “STOP” raises immediately, “ASK” fires alarm_fn and pauses the PyFM context (requires flow_manager_args). Defaults to “SKIP”.

  • flow_manager_args – Optional PyFM step context. On success, flow_manager_args.done() is called.

  • alarm_fn – Optional (title, content) callback used only when resolve_option is “ASK”.

Throws:

std::runtime_error – Under “STOP”, if the native call throws.

Returns:

photoneo::AckResponse. A default-constructed (error_code=0) response if client is null, not connected, or the call failed under “SKIP”/”ASK”.

photoneo::ObjectPoseResponse execute_photoneo_get_object_pose(photoneo::PhotoneoClient *client, uint32_t vision_system_id, const std::string &point_variable_name, const std::string &resolve_option = "SKIP", FlowManagerArgsPtr flow_manager_args = nullptr, AlarmFn alarm_fn = nullptr)#

Reads the object pose found by the most recent Photoneo scan.

Standalone equivalent of function_code=2 (“Get Object Pose”) of the Photoneo READ interface. Requires a prior successful scan (via execute_photoneo_scan) on vision_system_id.

Parameters:
  • client – Connected Photoneo client.

  • vision_system_id – Photoneo vision system id to read the object pose from. 0 uses the client’s configured default.

  • point_variable_name – PyFM variable name that will receive the detected pose — a 6-element [x, y, z, rx, ry, rz] list for the Euler-family formalism, a 7-element [x, y, z, qx, qy, qz, qw] list for the Quaternion formalism, or None if no pose is available.

  • resolve_option – How to handle a client-side failure — client not connected, or the native call throwing a Photoneo exception: “SKIP” continues without effect, “STOP” raises immediately, “ASK” fires alarm_fn and pauses the PyFM context (requires flow_manager_args). Defaults to “SKIP”.

  • flow_manager_args – Optional PyFM step context. On success, point_variable_name is written into its context and flow_manager_args.done() is called.

  • alarm_fn – Optional (title, content) callback used only when resolve_option is “ASK”.

Throws:

std::runtime_error – Under “STOP”, if the native call throws.

Returns:

photoneo::ObjectPoseResponse with the detected pose. A default-constructed (no pose) response if client is null, not connected, or the call failed under “SKIP”/”ASK”.

photoneo::TrajectoryResponse execute_photoneo_get_trajectory(photoneo::PhotoneoClient *client, uint32_t vision_system_id, const std::string &trajectory_start_to_approach, const std::string &trajectory_approach_to_grasp, const std::string &trajectory_grasp_to_deapproach, const std::string &trajectory_deapproach_to_end, const std::string &resolve_option = "SKIP", FlowManagerArgsPtr flow_manager_args = nullptr, AlarmFn alarm_fn = nullptr)#

Reads the 4-stage pick trajectory computed by the most recent Photoneo scan.

Standalone equivalent of function_code=3 (“Get Trajectory”) of the Photoneo READ interface. Requires a prior successful scan (via execute_photoneo_scan) on vision_system_id. The trajectory is split into exactly four stages — Start->Approach, Approach->Grasp, Grasp->Deapproach, Deapproach->End — and each stage’s joint waypoints are written into its own PyFM variable.

Note

Any gripper-action entries interleaved in the raw trajectory, and the AI Picking INFO values (target bounding-box dimensions), are not extracted by this function — only the 4 segments’ joint waypoints are exposed.

Parameters:
  • client – Connected Photoneo client.

  • vision_system_id – Photoneo vision system id to read the trajectory from. 0 uses the client’s configured default.

  • trajectory_start_to_approach – PyFM variable name that will receive the Start->Approach stage’s waypoints, each a list of joint values.

  • trajectory_approach_to_grasp – Same, for Approach->Grasp.

  • trajectory_grasp_to_deapproach – Same, for Grasp->Deapproach.

  • trajectory_deapproach_to_end – Same, for Deapproach->End.

  • resolve_option – How to handle a client-side failure — client not connected, or the native call throwing a Photoneo exception: “SKIP” continues without effect, “STOP” raises immediately, “ASK” fires alarm_fn and pauses the PyFM context (requires flow_manager_args). Defaults to “SKIP”.

  • flow_manager_args – Optional PyFM step context. On success, the four stage variables above are written into its context and flow_manager_args.done() is called.

  • alarm_fn – Optional (title, content) callback used only when resolve_option is “ASK”.

Throws:

std::runtime_error – If the response does not contain exactly 4 trajectory segments; and, under “STOP”, if the native call throws.

Returns:

photoneo::TrajectoryResponse with the raw response. A default-constructed (empty) response if client is null, not connected, or the call failed under “SKIP”/”ASK”.

photoneo::SolutionResponse execute_photoneo_solution_ask(photoneo::PhotoneoClient *client, const std::string &current_solution_id, const std::string &resolve_option = "SKIP", FlowManagerArgsPtr flow_manager_args = nullptr, AlarmFn alarm_fn = nullptr)#

Reads the id of the currently running Photoneo solution.

Standalone equivalent of function_code=7 (“Solution Ask”) of the Photoneo READ interface.

Parameters:
  • client – Connected Photoneo client.

  • current_solution_id – PyFM variable name that will receive the running solution’s id, or None if none is running.

  • resolve_option – How to handle a client-side failure — client not connected, or the native call throwing a Photoneo exception: “SKIP” continues without effect, “STOP” raises immediately, “ASK” fires alarm_fn and pauses the PyFM context (requires flow_manager_args). Defaults to “SKIP”.

  • flow_manager_args – Optional PyFM step context. On success, current_solution_id is written into its context and flow_manager_args.done() is called.

  • alarm_fn – Optional (title, content) callback used only when resolve_option is “ASK”.

Throws:

std::runtime_error – Under “STOP”, if the native call throws.

Returns:

photoneo::SolutionResponse with the running solution id. A default-constructed (no id) response if client is null, not connected, or the call failed under “SKIP”/”ASK”.

void execute_photoneo_move_waypoints(std::vector<std::vector<double>> waypoints, const std::string &robot_model, int robot_axis_count, int pnt_type, float pnt_para, FlowManagerArgsPtr flow_manager_args = nullptr, AlarmFn alarm_fn = nullptr)#

Moves the robot through an already-resolved list of joint waypoints via a JB (joint-blend) move.

Unlike the vendor-facing execute_photoneo_* functions above, this does not talk to a Photoneo client at all — it drives the robot itself through waypoints using RBManipulateMoveSDK::call_move_jb_clr / call_move_jb_add / call_move_jb_run (clear the pending blend queue, add each waypoint, then run). It is the execution half of function_code=8 (“Move (JB)”) of the Photoneo interface; callers that already have a resolved waypoint list (as opposed to a PyFM trajectory variable name) can call it directly instead of going through vision().

Each waypoint is converted from Photoneo’s fixed 6-axis trajectory format to the robot’s actual robot_axis_count: reduced to 6 axes if given more (dropping the third element), then, if the robot has 7 or more axes, expanded back to 7 by inserting 0 at index 2.

Note

Every waypoint is sent with a fixed tar_frame=-1 (Joint Space) and tar_unit=0 (degree) — this is not currently configurable through this function.

Note

Unlike the vendor-facing execute_* functions, there is no resolve_option here: any move failure always raises (and fires alarm_fn, if provided) rather than being SKIP/STOP/ASK-gated.

Parameters:
  • waypoints – Non-empty list of joint-value sequences (a Python list/tuple or numpy 2D array is accepted), in Photoneo’s 6-axis trajectory order.

  • robot_model – Name of the robot model to move.

  • robot_axis_count – Number of axes the target robot actually has; controls the 6-to-N axis expansion described above.

  • pnt_type – Blend type for every waypoint: 0 = Percentage, 1 = Distance.

  • pnt_para – Blend parameter for every waypoint, in the unit implied by pnt_type (percent, or millimeters).

  • flow_manager_args – Optional PyFM step context. On success, flow_manager_args.done() is called once after the final move request (call_move_jb_run) is accepted — not after the robot physically finishes the move.

  • alarm_fn – Optional (title, content) callback fired, with title “Vision(Photoneo) Move Failed”, if any of the clr/add/run requests reports a nonzero return value.

Throws:

std::runtime_error – If waypoints is empty, or if any clr/add/run request reports a nonzero return value (the first such failure stops the sequence immediately — later waypoints are never sent).

pickit3d::PickitClient *execute_pickit_connect(const std::string &module_name, muscat::InterfacePickitPayloadT data, FlowManagerArgsPtr flow_manager_args, AlarmFn alarm_fn)#

Connects to a Pickit3D vision server and registers the client under module_name.

Reads connection parameters from data (server_ip, server_port, an optional timeout_sec defaulting to 10 seconds) and opens a Pickit3D TCP connection, storing the resulting client in the per-module connection registry so later calls (look_for_objects, configure, …) can look it up by the same module_name.

Note

If the native connect call fails without throwing (client non-null but not connected), that failure is only logged to stdout — it does not go through resolve_option’s SKIP/STOP/ASK handling, unlike an actual vendor exception.

Note

Calling this again with the same module_name transparently disconnects the previous client for that module before opening the new connection.

Parameters:
  • module_name – Registry key for the connection, normally the PyFM task id resolved from flow_manager_args.

  • data – Connect payload. Must contain server_ip and server_port; timeout_sec is optional.

  • flow_manager_args – Optional PyFM step context. When provided, flow_manager_args.done() is called unconditionally once the connection attempt finishes, even if it failed.

  • alarm_fn – Optional (title, content) callback used only when data's resolve_option is “ASK”.

Throws:

std::runtime_error – If server_ip or server_port is missing, or if resolve_option is invalid; and, if resolve_option is “STOP”, if the native connect call throws.

Returns:

Pointer to the connected pickit3d::PickitClient, owned by the SDK’s connection registry (do not delete it). May be null, or non-null but not connected, if the attempt failed.

bool execute_pickit_update_robot_pose(pickit3d::PickitClient *client, const IPC::State_CoreT &stat_core, const std::string &resolve_option = "SKIP", FlowManagerArgsPtr flow_manager_args = nullptr, AlarmFn alarm_fn = nullptr)#

Sends the robot’s current TCP pose to Pickit3D for connection-liveness and 3D-view display.

Standalone equivalent of function_code=0 (“Update Robot Pose”) of the Pickit WRITE interface. This is not required for detection accuracy (the detection calls below carry their own robot pose) — it is used by Pickit only for liveness detection and its web interface’s 3D view. It is safe to call periodically (Pickit’s own guidance is roughly 10 Hz) from a separate control loop.

Note

below); false only if client is null, not connected, or the call failed under “SKIP”/”ASK”.

Note

The native call itself can return false when a write from another thread (e.g. a concurrent detection call) is already in progress and this update was skipped for the cycle. That return value is intentionally ignored here and never treated as a failure — only an actual exception is.

Parameters:
  • client – Connected Pickit client.

  • stat_core – Robot state snapshot the TCP pose and tool TCP offset are derived from.

  • resolve_option – How to handle a client-side failure — client not connected, or the native call throwing a Pickit exception: “SKIP” continues without effect, “STOP” raises immediately, “ASK” fires alarm_fn and pauses the PyFM context (requires flow_manager_args). Defaults to “SKIP”.

  • flow_manager_args – Optional PyFM step context. On success, flow_manager_args.done() is called.

  • alarm_fn – Optional (title, content) callback used only when resolve_option is “ASK”.

Throws:

std::runtime_error – Under “STOP”, if the native call throws.

Returns:

true if the update either sent successfully or was skipped (see

int execute_pickit_check_mode(pickit3d::PickitClient *client, const std::string &pickit_mode, const std::string &resolve_option = "SKIP", FlowManagerArgsPtr flow_manager_args = nullptr, AlarmFn alarm_fn = nullptr)#

Reads Pickit3D’s current operating mode.

Standalone equivalent of function_code=1 (“Check Mode”) of the Pickit READ interface.

Parameters:
  • client – Connected Pickit client.

  • pickit_mode – PyFM variable name that will receive the raw mode code: 0 = Robot Mode, 1 = Idle Mode. This value is itself the information being requested, not a success/failure signal.

  • resolve_option – How to handle a client-side failure — client not connected, or the native call throwing a Pickit exception: “SKIP” continues without effect, “STOP” raises immediately, “ASK” fires alarm_fn and pauses the PyFM context (requires flow_manager_args). Defaults to “SKIP”.

  • flow_manager_args – Optional PyFM step context. On success, pickit_mode is written into its context and flow_manager_args.done() is called.

  • alarm_fn – Optional (title, content) callback used only when resolve_option is “ASK”.

Throws:

std::runtime_error – Under “STOP”, if the native call throws.

Returns:

The mode code (0 or 1). 0 if client is null, not connected, or the call failed under “SKIP”/”ASK” — which is numerically indistinguishable from a genuine Robot Mode reading; check the client/exception path if that matters.

bool execute_pickit_shutdown_system(pickit3d::PickitClient *client, const std::string &resolve_option = "SKIP", FlowManagerArgsPtr flow_manager_args = nullptr, AlarmFn alarm_fn = nullptr)#

Shuts down the Pickit3D vision system.

Standalone equivalent of function_code=2 (“Shutdown System”) of the Pickit WRITE interface.

Parameters:
  • client – Connected Pickit client.

  • resolve_option – How to handle a client-side failure — client not connected, or the native call throwing a Pickit exception: “SKIP” continues without effect, “STOP” raises immediately, “ASK” fires alarm_fn and pauses the PyFM context (requires flow_manager_args). Defaults to “SKIP”.

  • flow_manager_args – Optional PyFM step context. On success, flow_manager_args.done() is called.

  • alarm_fn – Optional (title, content) callback used only when resolve_option is “ASK”.

Throws:

std::runtime_error – Under “STOP”, if the native call throws.

Returns:

true on success; false if client is null, not connected, or the call failed under “SKIP”/”ASK”.

bool execute_pickit_find_calib_plate(pickit3d::PickitClient *client, const IPC::State_CoreT &stat_core, const std::string &resolve_option = "SKIP", FlowManagerArgsPtr flow_manager_args = nullptr, AlarmFn alarm_fn = nullptr)#

Locates the calibration plate for Pickit3D robot-camera calibration.

Standalone equivalent of function_code=3 (“Find Calib Plate”) of the Pickit WRITE interface.

Parameters:
  • client – Connected Pickit client.

  • stat_core – Robot state snapshot the TCP pose and tool TCP offset are derived from.

  • resolve_option – How to handle a client-side failure — client not connected, or the native call throwing a Pickit exception: “SKIP” continues without effect, “STOP” raises immediately, “ASK” fires alarm_fn and pauses the PyFM context (requires flow_manager_args). Defaults to “SKIP”.

  • flow_manager_args – Optional PyFM step context. On success, flow_manager_args.done() is called.

  • alarm_fn – Optional (title, content) callback used only when resolve_option is “ASK”.

Throws:

std::runtime_error – Under “STOP”, if the native call throws.

Returns:

true on success; false if client is null, not connected, or the call failed under “SKIP”/”ASK”.

bool execute_pickit_configure_calib(pickit3d::PickitClient *client, int calib_method, int calib_camera_mount, const IPC::State_CoreT &stat_core, const std::string &resolve_option = "SKIP", FlowManagerArgsPtr flow_manager_args = nullptr, AlarmFn alarm_fn = nullptr)#

Configures the Pickit3D robot-camera calibration procedure.

Standalone equivalent of function_code=4 (“Configure Calib”) of the Pickit WRITE interface. The robot TCP pose and tool TCP offset (derived from stat_core) are always sent, but are only meaningful to Pickit for the SINGLE_POSE/MANUAL calibration methods — other methods ignore them.

Parameters:
  • client – Connected Pickit client.

  • calib_method – Pickit calibration method id — see pickit3d::CalibrationMethod (constants.hpp), payload[0] of the native RC_PICKIT_CONFIGURE_CALIB(11) command: 0=SINGLE_POSE, 1=MULTI_POSE, 2=MANUAL, 3=DEFAULT. The caller (program step) may also pass the matching label string (“SINGLE_POSE”, “MULTI_POSE”, “MANUAL”, “DEFAULT”) — rb_vision_util::get_calib_method resolves it to this id before the call reaches here.

  • calib_camera_mount – Camera mount id — 0=FIXED (Eye-to-Hand — camera fixed in the cell, sees the whole scene) or 1=ON_ROBOT (Eye-in-Hand — camera mounted on the robot flange, moves with it). The caller may also pass “EYE_TO_HAND”/ “FIXED” or “EYE_IN_HAND”/”ON_ROBOT” — rb_vision_util::get_calib_camera_mount resolves the label to this id. Must match how the camera is physically mounted on this cell; this is the same setting that decides whether detection uses execute_pickit_look_for_objects (FIXED) or execute_pickit_capture_image + execute_pickit_process_image (ON_ROBOT).

  • stat_core – Robot state snapshot the TCP pose and tool TCP offset are derived from.

  • resolve_option – How to handle a client-side failure — client not connected, or the native call throwing a Pickit exception: “SKIP” continues without effect, “STOP” raises immediately, “ASK” fires alarm_fn and pauses the PyFM context (requires flow_manager_args). Defaults to “SKIP”.

  • flow_manager_args – Optional PyFM step context. On success, flow_manager_args.done() is called.

  • alarm_fn – Optional (title, content) callback used only when resolve_option is “ASK”.

Throws:
  • std::runtime_error – Under “STOP”, if the native call throws a Pickit exception.

  • std::invalid_argument – If calib_method is SINGLE_POSE and calib_camera_mount is ON_ROBOT (an unsupported combination). This is not a Pickit protocol exception, so it is not caught by the resolve_option handling above — it always propagates directly to the caller.

Returns:

true on success; false if client is null, not connected, or the call failed under “SKIP”/”ASK”.

bool execute_pickit_compute_calib(pickit3d::PickitClient *client, const std::string &resolve_option = "SKIP", FlowManagerArgsPtr flow_manager_args = nullptr, AlarmFn alarm_fn = nullptr)#

Computes the Pickit3D robot-camera calibration from the poses collected so far.

Standalone equivalent of function_code=5 (“Compute Calib”) of the Pickit WRITE interface. Requires a prior execute_pickit_configure_calib.

Parameters:
  • client – Connected Pickit client.

  • resolve_option – How to handle a client-side failure — client not connected, or the native call throwing a Pickit exception: “SKIP” continues without effect, “STOP” raises immediately, “ASK” fires alarm_fn and pauses the PyFM context (requires flow_manager_args). Defaults to “SKIP”.

  • flow_manager_args – Optional PyFM step context. On success, flow_manager_args.done() is called.

  • alarm_fn – Optional (title, content) callback used only when resolve_option is “ASK”.

Throws:

std::runtime_error – Under “STOP”, if the native call throws.

Returns:

true on success; false if client is null, not connected, or the call failed under “SKIP”/”ASK”.

bool execute_pickit_validate_calib(pickit3d::PickitClient *client, const std::string &resolve_option = "SKIP", FlowManagerArgsPtr flow_manager_args = nullptr, AlarmFn alarm_fn = nullptr)#

Validates the most recently computed Pickit3D robot-camera calibration.

Standalone equivalent of function_code=6 (“Validate Calib”) of the Pickit WRITE interface. Requires a prior execute_pickit_compute_calib.

Parameters:
  • client – Connected Pickit client.

  • resolve_option – How to handle a client-side failure — client not connected, or the native call throwing a Pickit exception: “SKIP” continues without effect, “STOP” raises immediately, “ASK” fires alarm_fn and pauses the PyFM context (requires flow_manager_args). Defaults to “SKIP”.

  • flow_manager_args – Optional PyFM step context. On success, flow_manager_args.done() is called.

  • alarm_fn – Optional (title, content) callback used only when resolve_option is “ASK”.

Throws:

std::runtime_error – Under “STOP”, if the native call throws.

Returns:

true on success; false if client is null, not connected, or the call failed under “SKIP”/”ASK”.

pickit3d::ObjectDetection execute_pickit_look_for_objects(pickit3d::PickitClient *client, const std::string &pick_point_name, const std::string &remaining_count_name, const std::string &model_id_or_type_name, const IPC::State_CoreT &stat_core, const std::string &resolve_option = "SKIP", FlowManagerArgsPtr flow_manager_args = nullptr, AlarmFn alarm_fn = nullptr)#

Triggers a Pickit3D capture + object detection run.

Standalone equivalent of function_code=7 (“Look For Objects”) of the Pickit READ interface. The robot TCP pose and tool TCP offset (derived from stat_core) are sent so Pickit can locate the object relative to the robot.

Parameters:
  • client – Connected Pickit client.

  • pick_point_name – PyFM variable name that will receive the detected object’s pose as a 6-element [x, y, z, rx, ry, rz] list.

  • remaining_count_name – PyFM variable name that will receive the number of remaining detectable objects.

  • model_id_or_type_name – PyFM variable name that will receive the detected object’s model id or type.

  • stat_core – Robot state snapshot the TCP pose and tool TCP offset are derived from.

  • resolve_option – How to handle a client-side failure — client not connected, or the native call throwing a Pickit exception: “SKIP” continues without effect, “STOP” raises immediately, “ASK” fires alarm_fn and pauses the PyFM context (requires flow_manager_args). Defaults to “SKIP”.

  • flow_manager_args – Optional PyFM step context. On success, the three variables above are written into its context and flow_manager_args.done() is called.

  • alarm_fn – Optional (title, content) callback used only when resolve_option is “ASK”.

Throws:

std::runtime_error – Under “STOP”, if the native call throws.

Returns:

pickit3d::ObjectDetection with the detection result. A default-constructed (empty) result if client is null, not connected, or the call failed under “SKIP”/”ASK”.

pickit3d::ObjectDetection execute_pickit_look_for_objects_with_retries(pickit3d::PickitClient *client, int retry_count, const std::string &pick_point_name, const std::string &remaining_count_name, const std::string &model_id_or_type_name, const IPC::State_CoreT &stat_core, const std::string &resolve_option = "SKIP", FlowManagerArgsPtr flow_manager_args = nullptr, AlarmFn alarm_fn = nullptr)#

Triggers a Pickit3D capture + object detection run, retrying internally on empty results.

Standalone equivalent of function_code=8 (“Look For Objects With

Retries”) of the Pickit READ interface. Same behavior as

execute_pickit_look_for_objects, except the native call retries up to retry_count times internally when the result is NO_OBJECTS (not when the search area is merely empty). Vendor documentation does not specify a delay between retries or an overall timeout.

Parameters:
  • client – Connected Pickit client.

  • retry_count – Maximum number of internal retries on NO_OBJECTS.

  • pick_point_name – PyFM variable name that will receive the detected object’s pose as a 6-element [x, y, z, rx, ry, rz] list.

  • remaining_count_name – PyFM variable name that will receive the number of remaining detectable objects.

  • model_id_or_type_name – PyFM variable name that will receive the detected object’s model id or type.

  • stat_core – Robot state snapshot the TCP pose and tool TCP offset are derived from.

  • resolve_option – How to handle a client-side failure — client not connected, or the native call throwing a Pickit exception: “SKIP” continues without effect, “STOP” raises immediately, “ASK” fires alarm_fn and pauses the PyFM context (requires flow_manager_args). Defaults to “SKIP”.

  • flow_manager_args – Optional PyFM step context. On success, the three variables above are written into its context and flow_manager_args.done() is called.

  • alarm_fn – Optional (title, content) callback used only when resolve_option is “ASK”.

Throws:

std::runtime_error – Under “STOP”, if the native call throws.

Returns:

pickit3d::ObjectDetection with the detection result. A default-constructed (empty) result if client is null, not connected, or the call failed under “SKIP”/”ASK”.

pickit3d::ObjectDetection execute_pickit_next_object(pickit3d::PickitClient *client, const std::string &pick_point_name, const std::string &remaining_count_name, const std::string &model_id_or_type_name, const IPC::State_CoreT &stat_core, const std::string &resolve_option = "SKIP", FlowManagerArgsPtr flow_manager_args = nullptr, AlarmFn alarm_fn = nullptr)#

Reads the next detected object from the most recent Pickit3D detection run.

Standalone equivalent of function_code=9 (“Next Object”) of the Pickit READ interface. Only valid after a prior execute_pickit_look_for_objects or execute_pickit_look_for_objects_with_retries call.

Parameters:
  • client – Connected Pickit client.

  • pick_point_name – PyFM variable name that will receive the detected object’s pose as a 6-element [x, y, z, rx, ry, rz] list.

  • remaining_count_name – PyFM variable name that will receive the number of remaining detectable objects.

  • model_id_or_type_name – PyFM variable name that will receive the detected object’s model id or type.

  • stat_core – Robot state snapshot the TCP pose and tool TCP offset are derived from.

  • resolve_option – How to handle a client-side failure — client not connected, or the native call throwing a Pickit exception: “SKIP” continues without effect, “STOP” raises immediately, “ASK” fires alarm_fn and pauses the PyFM context (requires flow_manager_args). Defaults to “SKIP”.

  • flow_manager_args – Optional PyFM step context. On success, the three variables above are written into its context and flow_manager_args.done() is called.

  • alarm_fn – Optional (title, content) callback used only when resolve_option is “ASK”.

Throws:

std::runtime_error – Under “STOP”, if the native call throws.

Returns:

pickit3d::ObjectDetection with the detection result. A default-constructed (empty) result if client is null, not connected, or the call failed under “SKIP”/”ASK”.

bool execute_pickit_capture_image(pickit3d::PickitClient *client, const IPC::State_CoreT &stat_core, const std::string &resolve_option = "SKIP", FlowManagerArgsPtr flow_manager_args = nullptr, AlarmFn alarm_fn = nullptr)#

Captures an image for the Pickit3D Eye-in-Hand detection workflow.

Standalone equivalent of function_code=10 (“Capture Image”) of the Pickit WRITE interface. Part of the Eye-in-Hand workflow: this only captures the image and reports a status code — call execute_pickit_process_image afterwards to actually run detection on it. The robot TCP pose and tool TCP offset (derived from stat_core) are sent, same as the other detection calls.

Parameters:
  • client – Connected Pickit client.

  • stat_core – Robot state snapshot the TCP pose and tool TCP offset are derived from.

  • resolve_option – How to handle a client-side failure — client not connected, or the native call throwing a Pickit exception: “SKIP” continues without effect, “STOP” raises immediately, “ASK” fires alarm_fn and pauses the PyFM context (requires flow_manager_args). Defaults to “SKIP”.

  • flow_manager_args – Optional PyFM step context. On success, flow_manager_args.done() is called.

  • alarm_fn – Optional (title, content) callback used only when resolve_option is “ASK”.

Throws:

std::runtime_error – Under “STOP”, if the native call throws — which, unlike the other Pickit detection calls, includes the image genuinely not having been captured (NO_IMAGE_CAPTURED means failure here, not “nothing found” as it does for execute_pickit_look_for_objects).

Returns:

true on success; false if client is null, not connected, or the call failed under “SKIP”/”ASK”.

pickit3d::ObjectDetection execute_pickit_process_image(pickit3d::PickitClient *client, const std::string &pick_point_name, const std::string &remaining_count_name, const std::string &model_id_or_type_name, const std::string &resolve_option = "SKIP", FlowManagerArgsPtr flow_manager_args = nullptr, AlarmFn alarm_fn = nullptr)#

Runs Pickit3D object detection on the image captured by execute_pickit_capture_image.

Standalone equivalent of function_code=11 (“Process Image”) of the Pickit READ interface. The second half of the Eye-in-Hand workflow — this is where the actual detection result (object pose, dimensions, remaining count) comes from, not from execute_pickit_capture_image (which only reports a status code). Takes no robot pose — the pose already sent to execute_pickit_capture_image is what the detection is based on.

Parameters:
  • client – Connected Pickit client.

  • pick_point_name – PyFM variable name that will receive the detected object’s pose as a 6-element [x, y, z, rx, ry, rz] list.

  • remaining_count_name – PyFM variable name that will receive the number of remaining detectable objects.

  • model_id_or_type_name – PyFM variable name that will receive the detected object’s model id or type.

  • resolve_option – How to handle a client-side failure — client not connected, or the native call throwing a Pickit exception: “SKIP” continues without effect, “STOP” raises immediately, “ASK” fires alarm_fn and pauses the PyFM context (requires flow_manager_args). Defaults to “SKIP”.

  • flow_manager_args – Optional PyFM step context. On success, the three variables above are written into its context and flow_manager_args.done() is called.

  • alarm_fn – Optional (title, content) callback used only when resolve_option is “ASK”.

Throws:

std::runtime_error – Under “STOP”, if the native call throws.

Returns:

pickit3d::ObjectDetection with the detection result. A default-constructed (empty) result if client is null, not connected, or the call failed under “SKIP”/”ASK”.

pickit3d::PickPointData execute_pickit_get_pick_point_data(pickit3d::PickitClient *client, const std::string &gripper_pose_name, const std::string &reference_pick_point_id_name, const IPC::State_CoreT &stat_core, const std::string &resolve_option = "SKIP", FlowManagerArgsPtr flow_manager_args = nullptr, AlarmFn alarm_fn = nullptr)#

Reads the gripper pose computed from the most recent Pickit3D detection.

Standalone equivalent of function_code=12 (“Get Pick Point Data”) of the Pickit READ interface. Takes no robot pose of its own — the client automatically reuses the detected object’s pose cached by the most recent successful execute_pickit_look_for_objects, execute_pickit_look_for_objects_with_retries, execute_pickit_next_object, or execute_pickit_process_image call. The gripper pose is computed by composing that cached detection pose with the response’s offset pose; if no detection pose is cached, the gripper pose is not available.

Parameters:
  • client – Connected Pickit client.

  • gripper_pose_name – PyFM variable name that will receive the computed gripper pose as a 6-element [x, y, z, rx, ry, rz] list, or None if no cached detection pose is available.

  • reference_pick_point_id_name – PyFM variable name that will receive the reference pick point id from the response.

  • stat_core – Robot state snapshot the tool TCP offset is derived from (no TCP pose is sent — see above).

  • resolve_option – How to handle a client-side failure — client not connected, or the native call throwing a Pickit exception: “SKIP” continues without effect, “STOP” raises immediately, “ASK” fires alarm_fn and pauses the PyFM context (requires flow_manager_args). Defaults to “SKIP”.

  • flow_manager_args – Optional PyFM step context. On success, the two variables above are written into its context and flow_manager_args.done() is called.

  • alarm_fn – Optional (title, content) callback used only when resolve_option is “ASK”.

Throws:

std::runtime_error – Under “STOP”, if the native call throws.

Returns:

pickit3d::PickPointData with the pick point result. A default-constructed (empty) result if client is null, not connected, or the call failed under “SKIP”/”ASK”.

bool execute_pickit_configure(pickit3d::PickitClient *client, int setup_id, int product_id, const std::string &resolve_option = "SKIP", FlowManagerArgsPtr flow_manager_args = nullptr, AlarmFn alarm_fn = nullptr)#

Selects the active Pickit3D setup and product.

Standalone equivalent of function_code=13 (“Configure”) of the Pickit WRITE interface.

Parameters:
  • client – Connected Pickit client.

  • setup_id – Setup id to activate. A negative value falls back to the client’s configured default setup id.

  • product_id – Product id to activate. A negative value falls back to the client’s configured default product id.

  • resolve_option – How to handle a client-side failure — client not connected, or the native call throwing a Pickit exception: “SKIP” continues without effect, “STOP” raises immediately, “ASK” fires alarm_fn and pauses the PyFM context (requires flow_manager_args). Defaults to “SKIP”.

  • flow_manager_args – Optional PyFM step context. On success, flow_manager_args.done() is called.

  • alarm_fn – Optional (title, content) callback used only when resolve_option is “ASK”.

Throws:

std::runtime_error – Under “STOP”, if the native call throws.

Returns:

true on success; false if client is null, not connected, or the call failed under “SKIP”/”ASK”.

bool execute_pickit_set_cylinder_dim(pickit3d::PickitClient *client, float cylinder_length, float cylinder_diameter, const std::string &resolve_option = "SKIP", FlowManagerArgsPtr flow_manager_args = nullptr, AlarmFn alarm_fn = nullptr)#

Sets the expected cylinder dimensions for Pickit3D’s cylinder detection model.

Standalone equivalent of function_code=14 (“Set Cylinder Dim”) of the Pickit WRITE interface.

Parameters:
  • client – Connected Pickit client.

  • cylinder_length – Expected cylinder length, in millimeters.

  • cylinder_diameter – Expected cylinder diameter, in millimeters.

  • resolve_option – How to handle a client-side failure — client not connected, or the native call throwing a Pickit exception: “SKIP” continues without effect, “STOP” raises immediately, “ASK” fires alarm_fn and pauses the PyFM context (requires flow_manager_args). Defaults to “SKIP”.

  • flow_manager_args – Optional PyFM step context. On success, flow_manager_args.done() is called.

  • alarm_fn – Optional (title, content) callback used only when resolve_option is “ASK”.

Throws:

std::runtime_error – Under “STOP”, if the native call throws.

Returns:

true on success; false if client is null, not connected, or the call failed under “SKIP”/”ASK”.

bool execute_pickit_save_active_setup(pickit3d::PickitClient *client, const std::string &resolve_option = "SKIP", FlowManagerArgsPtr flow_manager_args = nullptr, AlarmFn alarm_fn = nullptr)#

Persists the currently active Pickit3D setup.

Standalone equivalent of function_code=15 (“Save Active Setup”) of the Pickit WRITE interface.

Parameters:
  • client – Connected Pickit client.

  • resolve_option – How to handle a client-side failure — client not connected, or the native call throwing a Pickit exception: “SKIP” continues without effect, “STOP” raises immediately, “ASK” fires alarm_fn and pauses the PyFM context (requires flow_manager_args). Defaults to “SKIP”.

  • flow_manager_args – Optional PyFM step context. On success, flow_manager_args.done() is called.

  • alarm_fn – Optional (title, content) callback used only when resolve_option is “ASK”.

Throws:

std::runtime_error – Under “STOP”, if the native call throws.

Returns:

true on success; false if client is null, not connected, or the call failed under “SKIP”/”ASK”.

bool execute_pickit_save_active_product(pickit3d::PickitClient *client, const std::string &resolve_option = "SKIP", FlowManagerArgsPtr flow_manager_args = nullptr, AlarmFn alarm_fn = nullptr)#

Persists the currently active Pickit3D product.

Standalone equivalent of function_code=16 (“Save Active Product”) of the Pickit WRITE interface.

Parameters:
  • client – Connected Pickit client.

  • resolve_option – How to handle a client-side failure — client not connected, or the native call throwing a Pickit exception: “SKIP” continues without effect, “STOP” raises immediately, “ASK” fires alarm_fn and pauses the PyFM context (requires flow_manager_args). Defaults to “SKIP”.

  • flow_manager_args – Optional PyFM step context. On success, flow_manager_args.done() is called.

  • alarm_fn – Optional (title, content) callback used only when resolve_option is “ASK”.

Throws:

std::runtime_error – Under “STOP”, if the native call throws.

Returns:

true on success; false if client is null, not connected, or the call failed under “SKIP”/”ASK”.

bool execute_pickit_build_background(pickit3d::PickitClient *client, const std::string &resolve_option = "SKIP", FlowManagerArgsPtr flow_manager_args = nullptr, AlarmFn alarm_fn = nullptr)#

Rebuilds Pickit3D’s background model from the current scene.

Standalone equivalent of function_code=17 (“Build Background”) of the Pickit WRITE interface. Used to (re)learn what counts as empty background so later detections can distinguish objects from it.

Parameters:
  • client – Connected Pickit client.

  • resolve_option – How to handle a client-side failure — client not connected, or the native call throwing a Pickit exception: “SKIP” continues without effect, “STOP” raises immediately, “ASK” fires alarm_fn and pauses the PyFM context (requires flow_manager_args). Defaults to “SKIP”.

  • flow_manager_args – Optional PyFM step context. On success, flow_manager_args.done() is called.

  • alarm_fn – Optional (title, content) callback used only when resolve_option is “ASK”.

Throws:

std::runtime_error – Under “STOP”, if the native call throws.

Returns:

true on success; false if client is null, not connected, or the call failed under “SKIP”/”ASK”.

bool execute_pickit_save_snapshot(pickit3d::PickitClient *client, const std::string &resolve_option = "SKIP", FlowManagerArgsPtr flow_manager_args = nullptr, AlarmFn alarm_fn = nullptr)#

Saves a diagnostic snapshot of Pickit3D’s current scene.

Standalone equivalent of function_code=18 (“Save Snapshot”) of the Pickit WRITE interface.

Parameters:
  • client – Connected Pickit client.

  • resolve_option – How to handle a client-side failure — client not connected, or the native call throwing a Pickit exception: “SKIP” continues without effect, “STOP” raises immediately, “ASK” fires alarm_fn and pauses the PyFM context (requires flow_manager_args). Defaults to “SKIP”.

  • flow_manager_args – Optional PyFM step context. On success, flow_manager_args.done() is called.

  • alarm_fn – Optional (title, content) callback used only when resolve_option is “ASK”.

Throws:

std::runtime_error – Under “STOP”, if the native call throws.

Returns:

true on success; false if client is null, not connected, or the call failed under “SKIP”/”ASK”.

void vision(const std::string &robot_model, const std::string &option, muscat::VisionInterfacePayloadUnion data, AlarmFn alarm_fn = nullptr, FlowManagerArgsPtr flow_manager_args = nullptr)#

Single dispatch entry point for all MechMind / Photoneo / Pickit3D vision interface calls.

This is the function a PyFM vision-interface step actually calls; every function above (connect / execute_* / trigger / etc.) is one of this function’s dispatch targets and can also be called directly by SDK users who already hold a client and don’t need the data-driven dispatch. Which sub-function runs is chosen by option and, for Photoneo/Pickit, a “function_code” field inside data (MechMind instead uses a “type” field, see below):

  • “MECHMIND_INTERFACE”: data[“type”] selects “CONNECT” (execute_mechmind_connect), “READ” (function_code 0 = Trigger And Get Poses via execute_mechmind_trigger_and_get_poses, 2 = Get Poses via execute_mechmind_get_poses), or “WRITE” (function_code 1 = Trigger via execute_mechmind_trigger, 3 = Set Recipe via execute_mechmind_set_recipe).

  • ”PHOTONEO_INTERFACE”: data[“function_code”] selects 99 = Create Connection (execute_photoneo_connect), 0/1/4/5/6 = Initialize / Scan / Solution Change / Solution Start / Solution Stop (WRITE), 2/3/7 = Get Object Pose / Get Trajectory / Solution Ask (READ), or 8 = Move (JB) through a stored trajectory (execute_photoneo_move_waypoints, resolving the trajectory by PyFM variable name or an inline waypoint list).

  • ”PICKIT_INTERFACE”: data[“function_code”] selects 99 = Create Connection (execute_pickit_connect), one of 0/2/3/4/5/6/10/13/14/15/16/17/18 for the WRITE-family calls (update robot pose, shutdown, calibration, configure, capture image, …), or one of 1/7/8/9/11/12 for the READ-family calls (check mode, look for objects (with retries), next object, process image, get pick point data).

See each dispatch target’s own docstring above for its payload fields, return value and failure handling — this function only picks which one runs and supplies it with the connection’s client, plus a robot state snapshot for calls that need pose correction.

Note

below), if option is not one of the three vendors, or if the selected type/function_code is not recognized; and whatever the selected dispatch target itself throws.

Note

data[“server_ip”] is required and validated even for calls that reuse an already-open connection (READ/WRITE/etc.) and never use its value — this matches the Python original’s behavior, not a porting oversight.

Note

If alarm_fn is not provided and flow_manager_args is, this function resolves it by looking up “rb_program_sdk.alarm” in the PyFM context’s SDK function registry. If that lookup also fails, or flow_manager_args is not provided either, any “ASK” resolve_option downstream effectively behaves like “SKIP” (no alarm is fired, since alarm_fn stays null).

Parameters:
  • robot_model – Name of the robot model whose state and vision connection this call applies to.

  • option – Vision vendor: “MECHMIND_INTERFACE”, “PHOTONEO_INTERFACE”, or “PICKIT_INTERFACE”.

  • data – Interface payload; its shape depends on option and the selected type/function_code, see above.

  • alarm_fn – Optional (title, content) callback used by any dispatch target whose resolve_option is “ASK”.

  • flow_manager_args – Optional PyFM step context. Required for this call to do anything — if omitted, returns immediately without dispatching to any target (unlike the individual execute_* functions below, which work standalone; call one of those directly instead of vision() if PyFM isn’t in play). When provided, it’s forwarded as-is to the selected dispatch target.

Throws:

std::runtime_error – If data[“server_ip”] is falsy/missing (required for every call, not just CONNECT — see

Public Static Functions

static inline std::string type_name()#

Private Members

RBManipulateMoveSDK manipulate_move_sdk_#

manipulate/rb_manipulate_sdk.hpp#

class RBManipulateSDK : public RBBaseSDK#
#include <rb_manipulate_sdk.hpp>

Rainbow Robotics manipulate SDK aggregate.

Groups the manipulate domain’s program, motion, configuration, IO, data, point, service, maintenance, safety, flange, state, and vision SDKs under one root object while sharing the RBBaseSDK zenoh session lifecycle.

Public Functions

inline std::optional<std::string> connect(const ConnectOptions &options)#
inline void close()#
~RBManipulateSDK() override#
virtual void before_close() override#

Closes every child SDK owned by this aggregate.

void move_finish_at_stop(const std::string &robot_model, FlowManagerArgsPtr flow_manager_args = nullptr)#

Deprecated alias for program.folder_finish_at().

Public Members

RBManipulateStateSDK state#

State/data observation SDK.

RBManipulateProgramSDK program#

Program lifecycle and program-flow SDK.

RBManipulateMoveSDK move#

Robot motion command SDK.

RBManipulateConfigSDK config#

Robot configuration and parameter SDK.

RBManipulateIOSDK io#

Digital/analog IO SDK.

RBManipulateGetDataSDK get_data#

State and data lookup SDK.

RBManipulatePointSDK point#

Point and coordinate helper SDK.

RBManipulateServiceSDK service#

Move mini-tab service SDK.

RBManipulateMaintenanceSDK maintenance#

Maintenance/admin settings SDK.

RBManipulateSafetySDK safety#

Safety function SDK.

RBManipulateFlangeSDK flange#

Flange peripheral SDK.

RBManipulateVisionSDK vision#

Vendor vision integration SDK.

plugin/rb_plugin.hpp#

namespace rb_plugin#
class PluginRouteError : public std::runtime_error#
#include <rb_plugin.hpp>

plugin.py::PluginRouteError.

Throw this from a serve handler to choose the external response status code and message.

Public Functions

PluginRouteError(int code, const std::string &message)#
int code() const noexcept#
const std::string &message() const noexcept#

Private Members

int code_#
std::string message_#
class PluginRouter#
#include <rb_plugin.hpp>

One-to-one C++ core equivalent of plugin.py::PluginRouter.

RBPluginCall adds the plugin_id prefix, so this class only deals with relative paths/topics. The public API intentionally matches plugin.py: on(), subscribe(), and emit().

Public Types

using RouteHandler = std::function<nlohmann::json(const nlohmann::json &payload, const nlohmann::json &meta)>#

Route handler.

(payload, meta) -> reply. Called only after the transport gate passes. Throw PluginRouteError to choose the external response status.

Param payload:

Request payload.

Param meta:

Request metadata, including transport and principal when supplied by the gateway.

Return:

Reply payload.

using EventHandler = std::function<void(const nlohmann::json &payload)>#

Event handler.

Receives only payload. Called only after the transport gate passes.

Param payload:

Event payload.

Public Functions

explicit PluginRouter(RBPluginCall &call)#
PluginRouter(const PluginRouter&) = delete#
PluginRouter &operator=(const PluginRouter&) = delete#
void on(const std::string &path, RouteHandler handler, const std::optional<std::vector<std::string>> &explicit_routes = std::nullopt)#

plugin.py::PluginRouter.on.

Strips “/” from path, checks duplicates and explicit_routes, then registers {plugin_id}/{path} as a queryable. Empty/duplicate paths and unknown transports raise std::invalid_argument (ValueError in the binding).

Parameters:
  • path – Route path relative to the plugin id.

  • handler – Handler invoked for accepted calls.

  • explicit_routes – Optional list of allowed transports: api, socket, tcp, mqtt, or webrtc.

Throws:

std::invalid_argument – If path is empty, duplicated, or an unknown transport is listed.

void subscribe(const std::string &topic, EventHandler handler, const std::optional<std::vector<std::string>> &explicit_events = std::nullopt)#

plugin.py::PluginRouter.subscribe.

Subscribes to the {plugin_id}/{topic} room. Strips “/” from topic and checks duplicates plus explicit_events.

Parameters:
  • topic – Event topic relative to the plugin id.

  • handler – Handler invoked for accepted events.

  • explicit_events – Optional list of allowed transports: api, socket, tcp, mqtt, or webrtc.

Throws:

std::invalid_argument – If topic is empty, duplicated, or an unknown transport is listed.

void emit(const std::string &topic, const nlohmann::json &payload)#

plugin.py::PluginRouter.emit.

Publishes through __muscat__/emit. External clients subscribe to common/plugin/{id}/{topic}. Like publish/call, payload is always explicit; pass nlohmann::json(nullptr) when there is no payload.

Parameters:
  • topic – Event topic relative to the plugin id.

  • payload – Event payload.

Private Functions

void _on_inner(const std::string &key, RouteHandler handler, const std::optional<std::vector<std::string>> &allowed_routes)#

Binding-only route registration hook after decorator validation.

Python decorator wrappers validate the path, duplicate state, and transports when the decorator factory is called. They use this hidden hook to attach the handler without repeating on() validation. C++ callers should use on().

Parameters:
  • key – Already stripped route key relative to the plugin id.

  • handler – Handler invoked for accepted calls.

  • allowed_routes – Already normalized transport gate, or nullopt for all.

void _subscribe_inner(const std::string &key, EventHandler handler, const std::optional<std::vector<std::string>> &allowed_events)#

Binding-only subscription registration hook after decorator validation.

Parameters:
  • key – Already stripped event topic relative to the plugin id.

  • handler – Handler invoked for accepted events.

  • allowed_events – Already normalized transport gate, or nullopt for all.

Private Members

RBPluginCall &call_#
std::unordered_map<std::string, std::optional<std::vector<std::string>>> route_gates_#
std::unordered_map<std::string, std::optional<std::vector<std::string>>> sub_gates_#

Private Static Functions

static std::optional<std::vector<std::string>> allowed_transports(const std::optional<std::vector<std::string>> &explicit_list)#

Friends

friend struct PluginRouterBindingAccess
class RBPluginCall#

Public Types

using SubCallback = std::function<void(const std::string &topic, const nlohmann::json &payload)>#

Callback invoked for subscribed plugin messages.

Param topic:

Fully scoped topic, echoed by the gateway.

Param payload:

Message payload, or JSON null when the gateway sends no payload.

using ServeHandler = std::function<nlohmann::json(const nlohmann::json &payload)>#

Handler invoked for served gateway calls.

plugin.py::_on_serve_call equivalent: payload in, reply payload out.

Param payload:

Request payload, or JSON null when omitted.

Return:

Reply payload to send through the gateway.

Public Functions

~RBPluginCall()#
RBPluginCall(const RBPluginCall&) = delete#
RBPluginCall &operator=(const RBPluginCall&) = delete#
const std::string &plugin_id() const#
std::string data_dir() const#

Returns this plugin’s persistent data directory, creating it if missing.

Store files the plugin must keep (state, caches, user settings) here. The install directory (the process working directory) is replaced on every plugin update, so anything written there is lost. This directory survives updates and restarts, and is removed when the plugin is deleted.

Resolves to RB_PLUGIN_DATA_DIR (set by Muscat when it starts the plugin); when unset, /app/data/runtime/plugins/data/{plugin_id} is used.

Throws:

std::filesystem::filesystem_error – If the directory cannot be created.

Returns:

Absolute path of the data directory.

std::string scoped(const std::string &key) const#

plugin.py::_scoped.

A key starting with “/” is treated as absolute and ignores the plugin prefix. Other keys become "{plugin_id}/{key}", unless they already carry this plugin_id prefix.

Parameters:

key – Topic or key expression to scope.

Returns:

Slash-trimmed absolute or plugin-scoped topic.

bool connected() const#

Returns whether the Socket.IO namespace is currently connected.

plugin.py::self._client.connected.

void publish(const std::string &topic, const nlohmann::json &payload)#

plugin.py::publish.

Scopes topic with scoped() and publishes through the gateway. If disconnected, the message is silently dropped.

Parameters:
  • topic – Topic to publish to.

  • payload – Payload to send.

Subscription subscribe(const std::string &topic, SubCallback cb)#

plugin.py::subscribe.

Scopes topic with scoped(). If this is the first local subscription for that topic and the gateway is connected, emits "sub". Keep the returned Subscription and pass it to unsubscribe(topic, sub) to remove only this subscription.

Parameters:
  • topic – Topic to subscribe to.

  • cb – Callback invoked for matching messages.

Returns:

Subscription handle. Keep it and pass it to unsubscribe() to remove only this subscription.

void unsubscribe(const std::optional<std::string> &topic = std::nullopt, const Subscription &sub = Subscription{})#

One-to-one equivalent of plugin.py::unsubscribe.

Both arguments are optional. A valid sub removes only that subscription. Without a valid handle, this removes a topic or all subscriptions.

  • unsubscribe() -> remove all subscriptions

  • unsubscribe(“ui/event”) -> remove all subscriptions on that topic

  • unsubscribe(std::nullopt, s) -> remove only handle s

  • unsubscribe(“ui/event”, s) -> remove s only if it belongs to that topic

Emits "unsub" for each topic that becomes empty. A topic-only unsubscribe also emits when that topic was not registered locally.

Parameters:
  • topic – Optional topic filter. The topic is scoped with scoped().

  • sub – Optional subscription handle to remove.

void unsubscribe_topic(const std::string &topic)#

plugin.py::unsubscribe_topic, alias for unsubscribe().

Removes every subscription on topic; the callback-less alias form.

Parameters:

topic – Topic whose subscriptions should be removed.

void serve(const std::string &keyexpr, ServeHandler handler)#

plugin.py::serve register path.

Scopes keyexpr. Each scoped key expression has one handler; registering again replaces the previous handler. If connected, emits "serve_register".

Parameters:
  • keyexpr – Key expression to serve.

  • handler – Handler invoked for matching calls.

void unserve(const std::optional<std::string> &keyexpr = std::nullopt)#

plugin.py::unserve.

If keyexpr is provided, unregisters only that key expression. Otherwise unregisters all served handlers. Emits "serve_unregister" for each removed item.

Parameters:

keyexpr – Optional key expression to unregister.

void undeclare_queryable(const std::optional<std::string> &keyexpr = std::nullopt)#

plugin.py::undeclare_queryable.

Alias for unserve().

Parameters:

keyexpr – Optional key expression to unregister.

nlohmann::json call(const std::string &keyexpr, const nlohmann::json &payload, double timeout_sec)#

plugin.py::call action path.

Scopes keyexpr and sends an action request. Waits up to timeout_sec for the ack and returns its first argument. If the ack has no arguments, returns JSON null.

Parameters:
  • keyexpr – Key expression to call.

  • payload – Payload to send.

  • timeout_sec – Maximum time to wait for the gateway ack, in seconds.

Throws:

RBPluginGatewayError – If the gateway is disconnected or the ack does not arrive before timeout_sec.

Returns:

First ack argument, or JSON null if the ack is empty.

PluginRouter &router()#

plugin.py::RBPluginCall.router.

Helper for declaring external endpoints using MuscatRouter terms. Each RBPluginCall owns exactly one router, created in the constructor. C++ plugins use this directly.

Returns:

Router helper for this plugin call instance.

const std::shared_ptr<PluginRouter> &router_ptr() const#

Binding-only shared_ptr accessor for router().

The binding needs a shared_ptr to deduplicate the Python wrapper object.

Public Static Functions

static std::string resolve_plugin_id(const std::optional<std::string> &plugin_id)#

plugin.py::_resolve_plugin_id.

Resolves in explicit argument > RB_PLUGIN_ID > PLUGIN_ID order, then strips leading and trailing slashes.

Parameters:

plugin_id – Optional explicit plugin id.

Throws:

std::invalid_argument – If no non-empty plugin id is available.

Returns:

Resolved plugin id without leading or trailing slashes.

static std::shared_ptr<RBPluginCall> get_instance(const std::string &plugin_id)#

Returns the process-global singleton keyed by (getpid(), plugin_id).

Equivalent to plugin.py::_instances[(pid, plugin_id)]. plugin_id must already be resolved and slash-stripped.

Parameters:

plugin_id – Resolved plugin id.

Returns:

Shared RBPluginCall instance for this process and plugin id.

static void shutdown_all()#

Releases callbacks that may capture py::object before interpreter shutdown.

Called by the binding from atexit. After this call, existing instances no longer invoke Python callbacks.

Private Functions

explicit RBPluginCall(std::string plugin_id)#
void _install_handlers()#
void _on_connect()#
void _on_msg(const nlohmann::json &data)#
void _on_serve_call(const nlohmann::json &data)#
void _emit(const std::string &event, const nlohmann::json &payload)#

Private Members

std::unique_ptr<Impl> impl_#
std::string plugin_id_#
std::shared_ptr<PluginRouter> router_#
class RBPluginGatewayError : public std::runtime_error#
#include <rb_plugin.hpp>

plugin.py::RBPluginGatewayError.

Thrown when a plugin gateway call or emit operation fails.

Public Functions

explicit RBPluginGatewayError(const std::string &what)#
class Subscription#
#include <rb_plugin.hpp>

Handle returned by subscribe().

Copyable value type around a globally unique token. This is not RAII: destroying it does not unsubscribe. Pass it to RBPluginCall::unsubscribe(topic, sub) to remove the subscription.

This replaces the plugin.py pattern of passing the callback function back to unsubscribe. The token is meaningful only for the RBPluginCall instance that created it; token() is exposed for bindings.

Public Functions

Subscription() noexcept#
explicit Subscription(std::uint64_t token) noexcept#
std::uint64_t token() const noexcept#
bool valid() const noexcept#
explicit operator bool() const noexcept#

Private Members

std::uint64_t token_ = 0#

plugin/sio_message_json.hpp#

namespace rb_plugin
namespace detail#

Functions

inline sio::message::ptr json_to_sio(const nlohmann::json &j)#
inline nlohmann::json sio_to_json(const sio::message::ptr &m)#

program/plugin_program_context.hpp#

namespace rb_plugin
class PluginProgramContext#
#include <plugin_program_context.hpp>

Plugin-side context for executor control and variables.

Public Types

using ExecuteHandler = std::function<void(const json &args)>#
using StateChangeHandler = std::function<void(const std::string &robot_model, const std::string &state)>#
using BlockingRunner = std::function<void(const std::function<void()>&)>#

Optional runner used to execute blocking cleanup.

C++ plugins may leave this unset; cleanup then runs directly.

Public Functions

explicit PluginProgramContext(std::string plugin_id)#
PluginProgramContext(const PluginProgramContext&) = delete#
PluginProgramContext &operator=(const PluginProgramContext&) = delete#
~PluginProgramContext()#
void set_execute_handler(ExecuteHandler h)#

Sets the handler invoked for each plugin execute request.

void set_state_change_handler(StateChangeHandler h)#

Sets an optional callback invoked when a robot executor state changes.

void set_blocking_runner(BlockingRunner r)#

Sets an optional runner for blocking cleanup.

void shutdown()#

Stops callbacks, undeclares zenoh handles, and joins an active execute handler.

Idempotent; safe to call from both wrapper cleanup and the destructor.

bool stopping() const#

Returns whether shutdown/destruction has started.

const std::string &plugin_id() const#
const std::string &control_topic() const#
void begin_execution(std::optional<std::string> robot_model)#
void end_execution()#
bool in_execute() const#
std::optional<std::string> exec_robot_model() const#
json send_control(const std::string &action, const json &extra = json::object())#

Sends a control action to the current program execution.

json done()#

Reports that the current plugin execution is done.

json pause()#

Requests pause for the current plugin execution.

json stop()#

Requests stop for the current plugin execution.

json query_variable_endpoint(const std::string &action, const std::string &name, const std::optional<std::string> &robot_model, const std::optional<std::string> &plugin_id, const json &value = json())#

Queries the always-on executor variable endpoint.

json get_variable(const std::string &name, const std::optional<std::string> &robot_model = std::nullopt, const std::optional<std::string> &plugin_id = std::nullopt)#

Gets a program variable.

During execute handling, unqualified calls use the current control topic. Outside execute handling, or when robot/plugin is specified, the always-on executor variable endpoint is used.

void set_variable(const std::string &name, const json &value)#

Sets a program variable for this plugin.

bool is_stopped(const std::optional<std::string> &robot_model = std::nullopt) const#
bool is_paused(const std::optional<std::string> &robot_model = std::nullopt) const#
std::optional<std::string> executor_state_for(const std::string &robot_model) const#
std::map<std::string, std::string> executor_states() const#
void check_stop(const std::optional<std::string> &robot_model = std::nullopt)#

Blocks while paused and throws PluginStopped if the program stops.

void start()#

Registers the executor-state subscriber and execute queryable.

Executor state is also subscribed on the plugin gateway topic /muscat/executor/state (JSON), which common uses instead of zenoh when IS_DEV=true. The execute handler must be set before calling this.

bool started() const#
void feed_executor_state_bytes(const std::vector<uint8_t> &payload)#
void feed_executor_state_bytes_from_native_thread(const std::vector<uint8_t> &payload)#
void feed_executor_state_json(const json &payload)#
void feed_execute_request_for_test(const json &args)#

Private Functions

std::runtime_error error_(const std::string &m) const#
void require_started() const#
json query_json_(const std::string &topic, const json &payload, int timeout_ms)#
std::map<std::string, std::string> model_states_locked_(const std::optional<std::string> &robot_model) const#
void on_executor_state_(const std::vector<uint8_t> &payload)#
void on_executor_state_json_(const json &payload)#
void apply_executor_states_(std::map<std::string, std::string> states)#
void on_execute_(const std::optional<std::vector<uint8_t>> &payload, const rb_zenoh::ReplyFn &reply_fn)#
void safe_notify_(const std::string &action)#

Private Members

const std::string plugin_id_#
const std::string execute_topic_#
const std::string control_topic_#
ExecuteHandler execute_handler_#
StateChangeHandler state_change_handler_#
BlockingRunner blocking_runner_#
std::shared_ptr<rb_zenoh::ZenohClient> zenoh_#
int sub_id_ = -1#
int queryable_id_ = -1#
std::shared_ptr<RBPluginCall> gateway_#
std::uint64_t gateway_sub_token_ = 0#
std::shared_ptr<GatewayGuard> gateway_guard_#
std::atomic<bool> started_ = {false}#
std::atomic<bool> stopping_ = {false}#
std::thread exec_thread_#
std::atomic<bool> exec_running_ = {false}#
mutable std::mutex mu_#
std::map<std::string, std::string> executor_states_#
std::set<std::string> exec_seen_active_#
bool in_execute_ = false#
std::optional<std::string> exec_robot_model_#
struct PluginStopped : public std::runtime_error#
#include <plugin_program_context.hpp>

Thrown by check_stop() when the current program is stopped.

The Python wrapper translates this to asyncio.CancelledError.

Public Functions

inline PluginStopped()#

program/program_interface.hpp#

namespace rb_program_interface#

Functions

RpcResult execute_modbus_read(RpcManager &rpc, const std::string &module_name, const std::string &server_ip, int server_port, int function_code, int register_addr, int number_of_read, const std::string &return_variable_name, const std::string &resolve_option = "SKIP", double timeout_sec = 1.0, FlowManagerArgsPtr flow_manager_args = nullptr, AlarmFn alarm_fn = nullptr)#

Reads Modbus holding or input registers.

function_code selects the register type: 3 reads holding registers (READ_HOLDING), 4 reads input registers (READ_INPUT).

Parameters:
  • rpc – RpcManager handle for the target connection, obtained via RBProgramSDK::get_rpc(module_name).

  • module_name – PyFM task id identifying the calling step/task.

  • server_ip – Modbus server IP address.

  • server_port – Modbus server port.

  • function_code – 3 (READ_HOLDING) or 4 (READ_INPUT).

  • register_addr – Starting register address to read from.

  • number_of_read – Number of registers to read.

  • return_variable_name – PyFM variable name that will receive the read registers (RpcResult::regs).

  • resolve_option – How to handle a failed read — “SKIP” continues without effect, “STOP” raises immediately, “ASK” fires alarm_fn and pauses the PyFM context (requires flow_manager_args). Defaults to “SKIP”.

  • timeout_sec – Read timeout in seconds. Defaults to 1.0.

  • flow_manager_args – Optional PyFM step context. return_variable_name is written into its context and flow_manager_args.done() is called on completion (unless resolve_option is “STOP” and the read failed, which raises instead).

  • alarm_fn – Optional (title, content) callback used only when resolve_option is “ASK”.

Throws:

std::runtime_error – If function_code is not 3 or 4; and, under “STOP”, if the read fails.

Returns:

RpcResult from the native call (success flag plus the read registers in regs).

RpcResult execute_modbus_write(RpcManager &rpc, const std::string &module_name, const std::string &server_ip, int server_port, int function_code, int register_addr, const std::optional<rb_payload::WriteRegisterValues> &payload_field, const std::string &resolve_option = "SKIP", double timeout_sec = 1.0, FlowManagerArgsPtr flow_manager_args = nullptr, AlarmFn alarm_fn = nullptr)#

Writes Modbus holding registers.

function_code selects the write mode: 6 writes a single register (WRITE_SINGLE_REG), 16 writes multiple registers (WRITE_MULTI_REGS).

Parameters:
  • rpc – RpcManager handle for the target connection, obtained via RBProgramSDK::get_rpc(module_name).

  • module_name – PyFM task id identifying the calling step/task.

  • server_ip – Modbus server IP address.

  • server_port – Modbus server port.

  • function_code – 6 (WRITE_SINGLE_REG) or 16 (WRITE_MULTI_REGS).

  • register_addr – Starting register address to write to.

  • payload_field – List of register values to write (1-40 entries, each in [0, 65535]).

  • resolve_option – How to handle a failed write — “SKIP” continues without effect, “STOP” raises immediately, “ASK” fires alarm_fn and pauses the PyFM context (requires flow_manager_args). Defaults to “SKIP”.

  • timeout_sec – Write timeout in seconds. Defaults to 1.0.

  • flow_manager_args – Optional PyFM step context. flow_manager_args.done() is called on completion (unless resolve_option is “STOP” and the write failed, which raises instead).

  • alarm_fn – Optional (title, content) callback used only when resolve_option is “ASK”.

Throws:

std::runtime_error – If function_code is not 6 or 16, or payload_field is missing/out of range; and, under “STOP”, if the write fails.

Returns:

RpcResult from the native call.

RpcResult execute_mc_read(RpcManager &rpc, const std::string &module_name, const std::string &server_ip, int server_port, int register_addr, const std::string &address_type, const std::string &protocol, int function_code, int number_of_read, const std::string &return_variable_name, const std::string &resolve_option = "SKIP", FlowManagerArgsPtr flow_manager_args = nullptr, AlarmFn alarm_fn = nullptr)#

Reads MC (Mitsubishi) protocol device values.

function_code selects the command: 1 reads bit devices (read_bit), 2 reads word devices (read_word). address_type and protocol resolve the target McDeviceType and McFrameType respectively. The result is always taken from RpcResult::data_word — unlike the Python original’s data_word or data_bit fallback, a bit read does not fall back to data_bit (matches the current C++ behavior).

Parameters:
  • rpc – RpcManager handle for the target connection, obtained via RBProgramSDK::get_rpc(module_name).

  • module_name – PyFM task id identifying the calling step/task.

  • server_ip – MC server IP address.

  • server_port – MC server port.

  • register_addr – Starting device address to read from.

  • address_type – Device type: “1”/”D”, “2”/”M”, “3”/”X”, or “4”/”Y”.

  • protocol – MC frame type: “1”/”MC_1E” or “2”/”MC_3E”.

  • function_code – 1 (read_bit) or 2 (read_word).

  • number_of_read – Number of devices to read.

  • return_variable_name – PyFM variable name that will receive the read values (RpcResult::data_word).

  • resolve_option – How to handle a failed read — “SKIP” continues without effect, “STOP” raises immediately, “ASK” fires alarm_fn and pauses the PyFM context (requires flow_manager_args). Defaults to “SKIP”.

  • flow_manager_args – Optional PyFM step context. return_variable_name is written into its context and flow_manager_args.done() is called on completion (unless resolve_option is “STOP” and the read failed, which raises instead).

  • alarm_fn – Optional (title, content) callback used only when resolve_option is “ASK”.

Throws:

std::runtime_error – If function_code is not 1 or 2, or address_type/protocol cannot be resolved; and, under “STOP”, if the read fails.

Returns:

RpcResult from the native call (success flag plus the read values in data_word).

RpcResult execute_mc_write(RpcManager &rpc, const std::string &module_name, const std::string &server_ip, int server_port, int register_addr, const std::string &address_type, const std::string &protocol, int function_code, const std::optional<rb_payload::WriteRegisterValues> &payload_field, const std::string &resolve_option = "SKIP", FlowManagerArgsPtr flow_manager_args = nullptr, AlarmFn alarm_fn = nullptr)#

Writes MC (Mitsubishi) protocol device values.

function_code selects the command: 3 writes bit devices (write_bit, payload_field values restricted to 0/1), 4 writes word devices (write_word, payload_field values restricted to [-32768, 32767]). address_type also determines which native buffer the payload is sent through: “1”/”D” (word device) uses write_word, “2”/”3”/”4” or “M”/”X”/”Y” (bit devices) use write_bit.

Parameters:
  • rpc – RpcManager handle for the target connection, obtained via RBProgramSDK::get_rpc(module_name).

  • module_name – PyFM task id identifying the calling step/task.

  • server_ip – MC server IP address.

  • server_port – MC server port.

  • register_addr – Starting device address to write to.

  • address_type – Device type: “1”/”D”, “2”/”M”, “3”/”X”, or “4”/”Y”.

  • protocol – MC frame type: “1”/”MC_1E” or “2”/”MC_3E”.

  • function_code – 3 (write_bit) or 4 (write_word).

  • payload_field – List of values to write (1-40 entries), range depends on function_code as described above.

  • resolve_option – How to handle a failed write — “SKIP” continues without effect, “STOP” raises immediately, “ASK” fires alarm_fn and pauses the PyFM context (requires flow_manager_args). Defaults to “SKIP”.

  • flow_manager_args – Optional PyFM step context. flow_manager_args.done() is called on completion (unless resolve_option is “STOP” and the write failed, which raises instead).

  • alarm_fn – Optional (title, content) callback used only when resolve_option is “ASK”.

Throws:

std::runtime_error – If function_code is not 3 or 4, address_type/protocol cannot be resolved, or payload_field is missing/out of range; and, under “STOP”, if the write fails.

Returns:

RpcResult from the native call.

RpcResult execute_xgt_read(RpcManager &rpc, const std::string &module_name, const std::string &server_ip, int server_port, int register_addr, const std::string &cpu_type, const std::string &device_type, int function_code, int number_of_read, const std::string &return_variable_name, const std::string &resolve_option = "SKIP", FlowManagerArgsPtr flow_manager_args = nullptr, AlarmFn alarm_fn = nullptr)#

Reads XGT (LS Electric) protocol device values.

Only function_code 1 (read_byte) is currently supported. cpu_type and device_type resolve the target XgtCPUinfo and XgtDeviceType respectively.

Parameters:
  • rpc – RpcManager handle for the target connection, obtained via RBProgramSDK::get_rpc(module_name).

  • module_name – PyFM task id identifying the calling step/task.

  • server_ip – XGT server IP address.

  • server_port – XGT server port.

  • register_addr – Starting device address to read from.

  • cpu_type – CPU type: “XGK”, “XGI”, “XBC”, “XEC”, or “NONE”.

  • device_type – Device type; only “DB” is currently supported.

  • function_code – Must be 1 (read_byte).

  • number_of_read – Number of devices to read.

  • return_variable_name – PyFM variable name that will receive the read values (RpcResult::data_word_xgt).

  • resolve_option – How to handle a failed read — “SKIP” continues without effect, “STOP” raises immediately, “ASK” fires alarm_fn and pauses the PyFM context (requires flow_manager_args). Defaults to “SKIP”.

  • flow_manager_args – Optional PyFM step context. return_variable_name is written into its context and flow_manager_args.done() is called on completion (unless resolve_option is “STOP” and the read failed, which raises instead).

  • alarm_fn – Optional (title, content) callback used only when resolve_option is “ASK”.

Throws:

std::runtime_error – If function_code is not 1, or cpu_type/device_type cannot be resolved; and, under “STOP”, if the read fails.

Returns:

RpcResult from the native call (success flag plus the read values in data_word_xgt).

RpcResult execute_xgt_write(RpcManager &rpc, const std::string &module_name, const std::string &server_ip, int server_port, int register_addr, const std::string &cpu_type, const std::string &device_type, int function_code, const std::optional<rb_payload::WriteRegisterValues> &payload_field, const std::string &resolve_option = "SKIP", FlowManagerArgsPtr flow_manager_args = nullptr, AlarmFn alarm_fn = nullptr)#

Writes XGT (LS Electric) protocol device values.

Only function_code 3 (write_byte) is currently supported. cpu_type and device_type resolve the target XgtCPUinfo and XgtDeviceType respectively.

Parameters:
  • rpc – RpcManager handle for the target connection, obtained via RBProgramSDK::get_rpc(module_name).

  • module_name – PyFM task id identifying the calling step/task.

  • server_ip – XGT server IP address.

  • server_port – XGT server port.

  • register_addr – Starting device address to write to.

  • cpu_type – CPU type: “XGK”, “XGI”, “XBC”, “XEC”, or “NONE”.

  • device_type – Device type; only “DB” is currently supported.

  • function_code – Must be 3 (write_byte).

  • payload_field – List of values to write (1-40 entries, each in [-32768, 32767]).

  • resolve_option – How to handle a failed write — “SKIP” continues without effect, “STOP” raises immediately, “ASK” fires alarm_fn and pauses the PyFM context (requires flow_manager_args). Defaults to “SKIP”.

  • flow_manager_args – Optional PyFM step context. flow_manager_args.done() is called on completion (unless resolve_option is “STOP” and the write failed, which raises instead).

  • alarm_fn – Optional (title, content) callback used only when resolve_option is “ASK”.

Throws:

std::runtime_error – If function_code is not 3, cpu_type/device_type cannot be resolved, or payload_field is missing/out of range; and, under “STOP”, if the write fails.

Returns:

RpcResult from the native call.

RpcResult execute_socket_read(RpcManager &rpc, const std::string &module_name, const std::string &server_ip, int server_port, int function_code, const std::string &return_variable_name, const std::string &resolve_option = "SKIP", double timeout_sec = 1.0, FlowManagerArgsPtr flow_manager_args = nullptr, AlarmFn alarm_fn = nullptr)#

Receives data over a socket connection.

function_code selects how the received payload is decoded before being stored: 1 keeps it as the raw byte list, 2 decodes it as a UTF-8 string.

Parameters:
  • rpc – RpcManager handle for the target connection, obtained via RBProgramSDK::get_rpc(module_name).

  • module_name – PyFM task id identifying the calling step/task.

  • server_ip – Socket server IP address.

  • server_port – Socket server port.

  • function_code – 1 (raw bytes) or 2 (UTF-8 string).

  • return_variable_name – PyFM variable name that will receive the decoded payload.

  • resolve_option – How to handle a failed receive — “SKIP” continues without effect, “STOP” raises immediately, “ASK” fires alarm_fn and pauses the PyFM context (requires flow_manager_args). Defaults to “SKIP”.

  • timeout_sec – Receive timeout in seconds. Defaults to 1.0.

  • flow_manager_args – Optional PyFM step context. return_variable_name is written into its context and flow_manager_args.done() is called on completion (unless resolve_option is “STOP” and the receive failed, which raises instead).

  • alarm_fn – Optional (title, content) callback used only when resolve_option is “ASK”.

Throws:

std::runtime_error – If function_code is not 1 or 2, or the payload cannot be decoded as UTF-8; and, under “STOP”, if the receive fails.

Returns:

RpcResult from the native call (success flag plus the raw payload in payload).

RpcResult execute_socket_write(RpcManager &rpc, const std::string &module_name, const std::string &server_ip, int server_port, int function_code, const std::string &payload, const std::string &resolve_option = "SKIP", FlowManagerArgsPtr flow_manager_args = nullptr, AlarmFn alarm_fn = nullptr)#

Sends data over a socket connection.

function_code selects how payload is encoded before sending: 3 (BYTES) splits payload on the delimiter read from flow_manager_args.args["data"]["split"] and parses each token as an integer byte value; 4 (ASCII) encodes payload directly as ASCII bytes.

Parameters:
  • rpc – RpcManager handle for the target connection, obtained via RBProgramSDK::get_rpc(module_name).

  • module_name – PyFM task id identifying the calling step/task.

  • server_ip – Socket server IP address.

  • server_port – Socket server port.

  • function_code – 3 (BYTES, delimiter-split) or 4 (ASCII).

  • payload – String payload to send; interpretation depends on function_code as described above.

  • resolve_option – How to handle a failed send — “SKIP” continues without effect, “STOP” raises immediately, “ASK” fires alarm_fn and pauses the PyFM context (requires flow_manager_args). Defaults to “SKIP”.

  • flow_manager_args – Optional PyFM step context, required when function_code is 3 to look up the split delimiter. flow_manager_args.done() is called on completion (unless resolve_option is “STOP” and the send failed, which raises instead).

  • alarm_fn – Optional (title, content) callback used only when resolve_option is “ASK”.

Throws:

std::runtime_error – If function_code is not 3 or 4, the BYTES split delimiter is missing, or payload cannot be parsed/encoded; and, under “STOP”, if the send fails.

Returns:

RpcResult from the native call.

bool execute_socket_connect(RpcManager &rpc, const std::string &module_name, const std::string &server_ip, int server_port, const std::string &resolve_option = "SKIP", FlowManagerArgsPtr flow_manager_args = nullptr, AlarmFn alarm_fn = nullptr)#

Opens a socket connection and registers the session under module_name.

Only creates the session (connect_sock()); it does not wait for a response, so unlike the other execute_* calls in this file the GIL is not released while the call runs.

Parameters:
  • rpc – RpcManager handle for the target connection, obtained via RBProgramSDK::get_rpc(module_name).

  • module_name – PyFM task id identifying the calling step/task.

  • server_ip – Socket server IP address.

  • server_port – Socket server port.

  • resolve_option – How to handle a failed connect — “SKIP” continues without effect, “STOP” raises immediately, “ASK” fires alarm_fn and pauses the PyFM context (requires flow_manager_args). Defaults to “SKIP”.

  • flow_manager_args – Optional PyFM step context. flow_manager_args.done() is called on completion (unless resolve_option is “STOP” and the connect failed, which raises instead).

  • alarm_fn – Optional (title, content) callback used only when resolve_option is “ASK”.

Throws:

std::runtime_error – Under “STOP”, if the connect fails.

Returns:

true if the connection was established; false otherwise.

program/rb_program_sdk.hpp#

class RpcManagerRegistry#
#include <rb_program_sdk.hpp>

Owns RpcManager instances keyed by module_name.

Public Functions

RpcManager *get(const std::string &module_name)#
RpcManager &get_or_create(const std::string &module_name, RpcLogCallback log_cb = nullptr)#
void disconnect_all()#

Private Members

std::unordered_map<std::string, std::unique_ptr<RpcManager>> managers_#
struct ProgramDigitalInputCondition#
#include <rb_program_sdk.hpp>

Digital-input condition for wait(), matching base_schema.py::DigitalInputConditionSchema.

Public Members

std::vector<int> signal#
std::string logical_operator = "AND"#
class RBProgramSDK : public RBBaseSDK#

Public Functions

RBProgramSDK()#
~RBProgramSDK() override#
void log(const std::string &content, const std::string &robot_model, const std::string &level, bool disable_db = false, FlowManagerArgsPtr flow_manager_args = nullptr)#

Emits a program log entry.

Parameters:
  • content – Log message content.

  • robot_model – Name of the robot model this log entry is associated with.

  • level – Log level (“INFO”, “WARNING”, “ERROR”, “USER”, “DEBUG”, or “GENERAL”).

  • disable_db – Unused (kept for parity with the Python original, which also never reads this parameter).

  • flow_manager_args – Optional PyFM step context. If provided, the step is marked done immediately after the log entry is published.

RpcManager &get_rpc(const std::string &module_name)#

Returns the RpcManager registered for module_name, creating it on first use.

Parameters:

module_name – PFM task id used as the RpcManager cache key.

Returns:

The RpcManager instance for module_name, owned by rpc_managers_.

void set_variables(const nlohmann::json &variables, FlowManagerArgsPtr flow_manager_args = nullptr)#

Initializes local task variables from their configured init values.

Parameters:
  • variables – List of variable definition dicts, each carrying an “init_value” key, in the same order as the task’s declared variables.

  • flow_manager_args – Optional PyFM step context. Required for this call to do anything — if omitted, returns immediately without touching variables. When provided, each variable is applied via flow_manager_args's local variable updater and the step is marked done afterwards.

void make_script(const std::string &mode, std::optional<std::string> contents, FlowManagerArgsPtr flow_manager_args = nullptr)#

Runs a program script step, in either GENERAL or ADVANCED mode.

In GENERAL mode, flow_manager_args's “general_contents” argument is evaluated as a single expression against the step’s context (assignments are reflected into state). In ADVANCED mode, contents is compiled and executed as an arbitrary python script with variables/var, update_variable, update_var/update, get_var/get, done, pause, stop, resume, check_stop, and rb_log injected into its globals (the bridge builds that env from flow_manager_args; compile/exec runs on the PyFM side in ctx.run_advanced_script). rb_log is this SDK’s own log (RBBaseSDK::log), called as rb_log(content, robot_model, level).

Parameters:
  • mode – “GENERAL” or “ADVANCED”.

  • contents – ADVANCED-mode script source. Required when mode is “ADVANCED”.

  • flow_manager_args – PyFM step context. Required; the step is marked done when the script finishes (or immediately raises, in ADVANCED mode, since the step is still marked done before the exception propagates).

Throws:

std::runtime_error – If GENERAL mode is missing “general_contents”, or ADVANCED mode is missing contents.

void simple_wait(double second, FlowManagerArgsPtr flow_manager_args = nullptr)#

Blocks the calling thread for second seconds, polling for stop/pause requests every 1/50s. Time spent blocked inside a pause is excluded from the wait duration.

Parameters:
  • second – Seconds to wait. Must be greater than 0 when flow_manager_args is not provided (a standalone caller has no other way to be notified that the wait was skipped).

  • flow_manager_args – Optional PyFM step context. If provided, the step is marked done once the wait elapses (or immediately, if second <= 0).

Throws:

std::runtime_error – If second <= 0 and flow_manager_args is not provided.

void all_pause(FlowManagerArgsPtr flow_manager_args = nullptr)#

Pauses every running program process on this robot.

Parameters:

flow_manager_args – Optional PyFM step context. If provided, the step’s own execution context is paused too, after the broadcast pause request.

void all_stop(FlowManagerArgsPtr flow_manager_args = nullptr)#

Stops every running program process on this robot.

Parameters:

flow_manager_args – Optional PyFM step context. If provided, the step is marked done after the broadcast stop request.

void alarm(const std::string &title, const std::string &content, const std::string &robot_model, FlowManagerArgsPtr flow_manager_args = nullptr)#

Publishes a program dialog alarm.

Parameters:
  • title – Dialog title. Falls back to “No Title” when empty.

  • content – Dialog content.

  • robot_model – Name of the robot model.

  • flow_manager_args – Optional PyFM step context. If provided, the step is marked done immediately after the alarm is published.

void alarm_or_halt(const std::string &robot_model, const std::string &option, bool save_log, bool is_only_at_ui, const std::string &pause_option, const nlohmann::json &title, const nlohmann::json &content, FlowManagerArgsPtr flow_manager_args = nullptr)#

Raises an alarm and/or halts execution, depending on option.

Parameters:
  • robot_model – Name of the robot model.

  • option – “ALARM” (publish an alarm dialog), “HALT” (stop the step’s context), “FOLDER_HALT” (break out of the enclosing folder), or “SUB_PROGRAM_HALT” (halt the enclosing sub task).

  • save_log – If true, also emits a USER-level log entry with content (or title if content is None).

  • is_only_at_ui – If true and the step is not running from a UI execution, the step is marked done and this call is a no-op.

  • pause_option – “ALL” (pause every process) or “CURRENT” (pause only this context). Only consulted when option resolves to a pause.

  • title – Alarm dialog title (used when option is “ALARM”, and as the log fallback content when save_log is set and content is None).

  • content – Alarm dialog / log content.

  • flow_manager_args – PyFM step context. Required; the step is marked done after the alarm/halt/pause sequence completes.

void debug_variables(const std::string &robot_model, const std::string &option, bool is_only_at_ui, const nlohmann::json &variables, const nlohmann::json &log_content, const std::string &pause_option, FlowManagerArgsPtr flow_manager_args = nullptr)#

Reports the current values of variables for debugging, then pauses.

Compares each variable’s raw (pre-evaluation) string against its evaluated JSON value; numeric values/lists are rounded to 3 decimals for display, and unchanged variables are reported as “Undefined”.

Parameters:
  • robot_model – Name of the robot model.

  • option – “DIALOG” (publish a single alarm dialog listing every variable) or “LOG” (emit one USER-level log entry per variable).

  • is_only_at_ui – If true and the step is not running from a UI execution, the step is marked done and this call is a no-op.

  • variables – Evaluated current variable values, in the same order as flow_manager_args's raw “variables” list.

  • log_content – Optional extra USER-level log entry (any value; non-str is JSON-encoded) appended after the per-variable LOG entries.

  • pause_option – “ALL” (pause every process) or “CURRENT” (pause only this context).

  • flow_manager_args – Optional PyFM step context. Required for this call to do anything; the step is marked done after pausing.

void user_input(const std::string &robot_model, const nlohmann::json &var_selection, const std::string &var_form, FlowManagerArgsPtr flow_manager_args = nullptr)#

Publishes a “user input” prompt dialog and pauses the step until the operator supplies a value (resumed out-of-band via the program service’s change_user_input_value endpoint).

Mirrors program.py::RBProgramSDK.user_input: the dialog content is "{raw var_selection arg} ({resolved var_selection})" — the raw name comes from flow_manager_args.args["var_selection"] (pre-substitution) and the resolved value from the var_selection parameter.

Parameters:
  • robot_model – Name of the robot model.

  • var_form – Input widget kind: “STRING” (default), “NUMERIC”, “BOOLEAN”, “LIST”, “DICTIONARY”, or “VAR”. Only used to tag the alarm title (USER_INPUT_{var_form}).

  • var_selection – Resolved value of the target variable. PyFM evaluates the step’s var_selection expression before the call, so this can arrive as any Python type (int/float/list/dict, …), not only str — it is stringified here, mirroring the Python original’s f-string.

  • flow_manager_args – PyFM step context. When provided, the step’s context is paused, checked for stop, and marked done.

void user_select(const std::string &robot_model, const nlohmann::json &ask_ment, const nlohmann::json &var_name, const nlohmann::json &content, const nlohmann::json &timeout, const nlohmann::json &disconn_timeout, FlowManagerArgsPtr flow_manager_args = nullptr)#

Publishes a “user select” prompt dialog and pauses the step until the operator picks one of content (resumed out-of-band via the program service’s set_user_select_value endpoint).

Mirrors program.py::RBProgramSDK.user_select: the dialog content is json.dumps([var_name, timeout, disconn_timeout, content]).

Note

ask_ment/var_name/content/timeout/disconn_timeout arrive as values PyFM produced by evaluating the step’s args, so their runtime types are not fixed (e.g. a "60" arg resolves to int 60, "0" to int 0). They are accepted as JSON values and normalized to the expected C++ type before serialization.

Parameters:
  • robot_model – Name of the robot model.

  • ask_ment – Prompt text, used to tag the alarm title (USER_SELECT_{ask_ment}).

  • var_name – Name of the variable that will receive the choice.

  • content – Selectable option strings.

  • timeout – Seconds before the select auto-resolves.

  • disconn_timeout – Behavior label when the operator UI disconnects.

  • flow_manager_args – PyFM step context. When provided, the step’s context is paused, checked for stop, and marked done.

std::optional<std::vector<int8_t>> get_digital_input(const std::string &robot_model)#

Queries the digital input state of robot_model.

Parameters:

robot_model – Name of the robot model.

Returns:

The digital input list, or std::nullopt if the robot has no {robot_model}/get_digital_input zenoh queryable (e.g. not connected / not running).

void interface(const std::string &option, muscat::InterfacePayloadUnion data, FlowManagerArgsPtr flow_manager_args = nullptr)#

Dispatches a protocol interface call (Modbus/MC/XGT/socket) via the native RpcManager cached for this step’s task id (rpc_managers_).

Parameters:
  • option – “MODBUS_CLIENT”, “MC_PROTOCOL”, “XGT_PROTOCOL”, or “SOCKET_INTERFACE”.

  • data – Protocol payload generated from manipulate.fbs. Must contain a non-empty “server_ip” and a “type” of “READ”/”WRITE” (plus “CONNECT” for SOCKET_INTERFACE).

  • flow_manager_args – Optional PyFM step context. Required for this call to do anything — if omitted, returns immediately without dispatching to any protocol. When provided, it’s forwarded to the underlying execute_* call and the step is marked done after dispatch.

Throws:

std::runtime_error – If option or data[“type”] is unsupported for the given option.

void wait(const std::string &robot_model, const std::string &wait_type, const std::string &mode, std::optional<double> second, std::optional<ProgramDigitalInputCondition> digital_input, std::optional<double> time_out, FlowManagerArgsPtr flow_manager_args = nullptr)#

Blocks until the requested wait condition is satisfied (or times out), polling for stop requests every 10ms.

Parameters:
  • robot_model – Name of the robot model (used for DIGITAL_INPUT polling).

  • wait_type – “TIME” (delegates to simple_wait()), “HOLDING” (wait while the condition holds), or “EXIT” (wait until the condition becomes true / the digital input matches).

  • mode – “GENERAL” (evaluate flow_manager_args's “condition” expression) or “DIGITAL_INPUT” (poll get_digital_input() against digital_input's expected signal pattern).

  • second – Wait duration in seconds, used only when wait_type is “TIME”.

  • digital_input – Digital input condition dict (“signal” list and optional “logical_operator”, “AND” by default). Required when mode is “DIGITAL_INPUT”.

  • time_out – Optional timeout in seconds; the wait loop breaks once elapsed time reaches this value, regardless of whether the condition was satisfied.

  • flow_manager_args – Optional PyFM step context. Required for this call to do anything — if omitted, returns immediately without waiting (despite the default of py::none(), calling this standalone is a no-op). The step is marked done once the wait loop exits.

void change_program(std::optional<std::string> program_id, std::optional<std::string> program_name, FlowManagerArgsPtr flow_manager_args = nullptr)#

Changes the running program and immediately starts it (program.py::change_program).

Sends a Request_Change_Program to the “muscat/change/program” queryable and waits (up to 20s — the handler can take several seconds) for a ResponseProgramExecution. Either program_id or program_name must be given.

Parameters:
  • program_id – Target program id (mutually optional with program_name).

  • program_name – Target program name.

  • flow_manager_args – PyFM step context. Required — raises if omitted. The step is marked done once the change is accepted.

Throws:

std::runtime_error – If flow_manager_args is omitted, if neither program_id nor program_name is given, or if the change/start request gets no (usable) reply.

void plugin_execute(const std::string &plugin_id, FlowManagerArgsPtr flow_manager_args = nullptr, const nlohmann::json &user_args = nlohmann::json::object())#

Sends an execute request to a plugin process and waits until it reports completion (or stop). Concurrent calls for the same plugin_id are serialized so their control queryables don’t collide.

Parameters:
  • plugin_id – Target plugin id; the request is sent to “muscat/plugin/{plugin_id}/execute” and control messages are exchanged over “muscat/plugin/{plugin_id}/control”.

  • user_args – Execute request JSON object. The Python binding collects **kwargs into this object.

  • flow_manager_args – PyFM step context. Required; the step is marked done once the plugin reports “done” (directly, or by exiting its control loop after “stop”).

Throws:

std::runtime_error – If flow_manager_args is not provided, or if the plugin is not running/responding to the execute request.

virtual void before_close() override#

Disconnects every RpcManager module cached in rpc_managers_ before the SDK instance is closed.

Public Static Functions

static std::string type_name()#

Private Functions

void _plugin_execute_locked(const std::string &plugin_id, const FlowManagerArgsPtr &flow_manager_args, const nlohmann::json &user_args)#

Private Members

RpcManagerRegistry rpc_managers_#

rb_sdk_api.hpp#

Defines

RB_SDK_API#
RB_SDK_LOCAL#

rby1/rb_rby1_sdk.hpp#

Typedefs

using RBRby1CommandBuilderRef = std::shared_ptr<const rb::RobotCommandBuilder>#

명령 빌더 참조: Python 의 rby1.RobotCommandBuilder 객체를 호출이 끝날 때까지 쥔다 (공식 빌더는 복사 불가).

using RBRby1Cartesians = std::map<std::string, std::vector<double>>#

관절명 → 값 (Python dict, 순서 유지). Cartesian 자세: 컴포넌트(“torso”/”right_arm”/”left_arm”) → [x_mm, y_mm, z_mm, rx_deg, ry_deg, rz_deg] (Base 기준, R = Rz(rz)·Ry(ry)·Rx(rx) — manipulate tar_values 와 같은 규약). 링크는 SDK 가 정한다 (torso→link_torso_5, right_arm→ee_right, left_arm→ee_left). 키가 곧 명령에 넣는 부위 — 없는 부위는 현재 자세 유지.

using RBRby1JogJoints = std::map<std::string, std::vector<double>>#

관절 목표 (move_j / smoothjog_j): 컴포넌트(“torso”/”right_arm”/”left_arm”/”head”) → 관절값 [deg], 컴포넌트 전체 길이.

using RBRby1Controllers = std::map<std::string, RBRby1Controller>#

Functions

std::string rby1_extract_log_message(const std::string &raw)#

로봇 로그 한 줄에서 사람이 읽을 사유만.

void rby1_publish_move_error(const std::string &robot_model, const std::string &finish_code, const std::string &detail = "")#

실패한 move/stop/approach/smooth jog 를 muscat/{robot_model}/message 로 알린다 (best-effort, 실패는 stderr). detail 이 비면 로봇 로그에서 사유를 뽑는다.

struct RBRby1SystemTime#
#include <rb_rby1_sdk.hpp>

RBRby1SDK::get_system_time 결과 (공식 GetSystemTime 의 tuple 그대로).

Python 에서는 공식 바인딩(robot.get_system_time)과 같은 (datetime, local_time) 튜플로 변환된다.

Public Members

timespec utc_time = {}#
std::string time_zone#
std::string local_time#
struct RBRby1Timestamp#
#include <rb_rby1_sdk.hpp>

RBRby1SDK::set_system_time 인자 (Python 은 datetime.datetime, C++ 은 timespec 을 그대로 넘긴다).

Public Functions

RBRby1Timestamp() = default#
inline RBRby1Timestamp(const timespec &t)#

Public Members

timespec ts = {}#
struct RBRby1Bytes#
#include <rb_rby1_sdk.hpp>

RBRby1SDK::download_file 결과 (Python 에서는 bytes).

Public Members

std::string data#
class RBRby1CommandHandle#
#include <rb_rby1_sdk.hpp>

로봇 명령 핸들 (RBRby1SDK.send_command 결과, 공식 RobotCommandHandler 래퍼).

블로킹 메서드(wait/get)는 기본 async, handle.sync.<method> 는 동기다. 핸들을 버리면 명령이 취소된다 (공식 소멸자 = Cancel) — 명령이 끝날 때까지 핸들을 쥐고 있어야 한다. async wait/get 을 기다리던 쪽이 취소되면(Task.cancel, asyncio.wait_for 타임아웃, 루프 종료) 결과만 버리지 않고 로봇 명령도 취소한다 (cancel()). 이때 flow_manager_args.done() 은 부르지 않는다. disconnect_robot 뒤에도 이미 보낸 명령의 wait/get/is_done/cancel 은 그 명령에 대해 동작한다. fork 자식에서는 부모의 핸들을 쓸 수 없다 (RBY1ConnectionError, cancel 은 할 일 없음).

Public Types

using Slot = rby1_rt::HandleSlot<rby1_rt::CommandHandlerVar>#

Public Functions

inline explicit RBRby1CommandHandle(std::shared_ptr<Slot> slot)#
RBRby1CommandHandle(const RBRby1CommandHandle&) = default#
RBRby1CommandHandle(RBRby1CommandHandle&&) = default#
RBRby1CommandHandle &operator=(const RBRby1CommandHandle&) = default#
RBRby1CommandHandle &operator=(RBRby1CommandHandle&&) = default#
~RBRby1CommandHandle()#
bool wait(std::optional<int> timeout_ms = std::nullopt, FlowManagerArgsPtr flow_manager_args = nullptr) const#

명령이 끝날 때까지 기다린다.

Parameters:
  • timeout_ms – 최대 대기(ms). None 이면 끝날 때까지.

  • flow_manager_args – Optional PyFM step context. 명령이 끝났으면(True) done() 을 호출한다.

Throws:

RBY1ConnectionError – fork 자식에서 부모 핸들 사용.

Returns:

끝났으면 True, 타임아웃이면 False.

rb::RobotCommandFeedback get(FlowManagerArgsPtr flow_manager_args = nullptr) const#

명령이 끝날 때까지 기다려 최종 피드백을 받는다.

Parameters:

flow_manager_args – Optional PyFM step context. 성공하면 done() 을 호출한다.

Throws:

RBY1Error – gRPC 실패(취소됨·연결 끊김 등). RBY1ConnectionError fork 자식에서 부모 핸들 사용.

Returns:

rby1.RobotCommandFeedback (공식 타입). 성공 여부는 finish_code 로 확인한다.

void cancel() const#

명령을 취소한다 (기다리지 않는다). 이미 끝났거나 fork 로 버려진 핸들이면 아무것도 하지 않는다.

bool is_done() const#

명령이 끝났는지 (완료·취소·실패 모두).

Throws:

RBY1ConnectionError – fork 자식에서 부모 핸들 사용.

Returns:

끝났으면 True.

bool get_status() const#

끝난 명령의 gRPC 상태.

Throws:

RBY1ConnectionError – fork 자식에서 부모 핸들 사용.

Returns:

gRPC 호출이 성공했으면 True (취소·연결 실패면 False, 진행 중이면 True).

Private Members

std::shared_ptr<Slot> slot_#
class RBRby1CommandStream#
#include <rb_rby1_sdk.hpp>

명령 스트림 핸들 (RBRby1SDK.create_command_stream 결과, 공식 RobotCommandStreamHandler 래퍼).

한 연결로 명령을 연이어 보낸다. 블로킹 메서드는 기본 async, stream.sync.<method> 는 동기다. 핸들을 버리면 스트림이 취소된다 (공식 소멸자). async 호출을 기다리던 쪽이 취소되면 스트림도 취소한다. disconnect_robot / connect_robot 뒤에는 새 명령(send_command/request_feedback)을 보내지 않는다 (RBY1ConnectionError) — wait/cancel/is_done 은 계속 동작한다.

Public Types

using Slot = rby1_rt::HandleSlot<rby1_rt::CommandStreamVar>#

Public Functions

inline explicit RBRby1CommandStream(std::shared_ptr<Slot> slot)#
RBRby1CommandStream(const RBRby1CommandStream&) = default#
RBRby1CommandStream(RBRby1CommandStream&&) = default#
RBRby1CommandStream &operator=(const RBRby1CommandStream&) = default#
RBRby1CommandStream &operator=(RBRby1CommandStream&&) = default#
~RBRby1CommandStream()#
rb::RobotCommandFeedback send_command(RBRby1CommandBuilderRef builder, int timeout_ms = 1000) const#

스트림으로 명령을 보내고 제어기 피드백을 받는다 (명령 완료가 아니라 현재 상태).

Parameters:
  • builder – rby1.RobotCommandBuilder (공식 타입).

  • timeout_ms – 피드백 대기(ms). 넘기면 공식 SDK 가 스트림을 취소한다.

Throws:

RBY1Error – 스트림 만료·타임아웃·이전 명령 진행 중. RBY1ConnectionError 연결이 바뀜/끊김.

Returns:

rby1.RobotCommandFeedback (공식 타입).

rb::RobotCommandFeedback request_feedback(int timeout_ms = 1000) const#

진행 중인 명령의 제어기 피드백을 요청한다 (send_command 뒤에만).

Parameters:

timeout_ms – 피드백 대기(ms).

Throws:

RBY1Error – 스트림 만료·타임아웃·명령 전. RBY1ConnectionError 연결이 바뀜/끊김.

Returns:

rby1.RobotCommandFeedback (공식 타입).

bool wait(std::optional<int> timeout_ms = std::nullopt) const#

스트림이 끝날(닫히거나 취소될) 때까지 기다린다.

Parameters:

timeout_ms – 최대 대기(ms). None 이면 끝날 때까지.

Throws:

RBY1ConnectionError – fork 자식에서 부모 핸들 사용.

Returns:

끝났으면 True, 타임아웃이면 False.

void cancel() const#

스트림을 취소한다 (기다리지 않는다). fork 로 버려진 핸들이면 아무것도 하지 않는다.

bool is_done() const#

스트림이 끝났는지.

Throws:

RBY1ConnectionError – fork 자식에서 부모 핸들 사용.

Returns:

끝났으면 True.

Private Members

std::shared_ptr<Slot> slot_#
class RBRby1SerialStream#
#include <rb_rby1_sdk.hpp>

로봇 시리얼 장치 스트림 (RBRby1SDK.open_serial_stream 결과, 공식 SerialStream 래퍼).

connect() 후 write() 로 보내고, 받은 데이터는 open_serial_stream 의 callback(data: bytes) 으로 온다. 콜백은 수신 전용 스레드에서 순서대로 한 번에 하나씩 불린다 (gRPC 수신은 막히지 않는다 — 콜백이 느리면 1024 chunk 까지 쌓고, 넘치면 오래된 것부터 버린다: read_stats 의 dropped). 콜백이 awaitable 을 돌려주면 등록 시점의 이벤트 루프에서 실행하고 끝날 때까지 다음 chunk 를 넘기지 않는다. 콜백 예외는 stderr 로 출력한다. 블로킹 메서드는 기본 async, stream.sync.<method> 는 동기다. async 호출을 기다리던 쪽이 취소되면 스트림을 끊는다 (cancel()). 핸들을 버리면 스트림이 끊긴다 (공식 소멸자). disconnect_robot / connect_robot 뒤에는 connect/write 를 보내지 않는다 (RBY1ConnectionError).

Public Types

using Slot = rby1_rt::HandleSlot<rby1_rt::SerialHandle>#

Public Functions

inline explicit RBRby1SerialStream(std::shared_ptr<Slot> slot)#
RBRby1SerialStream(const RBRby1SerialStream&) = default#
RBRby1SerialStream(RBRby1SerialStream&&) = default#
RBRby1SerialStream &operator=(const RBRby1SerialStream&) = default#
RBRby1SerialStream &operator=(RBRby1SerialStream&&) = default#
~RBRby1SerialStream()#
bool connect(bool verbose = false) const#

시리얼 장치를 연다 (open_serial_stream 의 설정으로).

Parameters:

verbose – 실패 이유를 stderr 로 출력 (공식 SDK).

Throws:

RBY1Error – 열기 실패(이미 열림·끊긴 스트림·로봇 거부·타임아웃). RBY1ConnectionError 연결이 바뀜/끊김.

Returns:

True.

bool write(const std::string &data) const#

데이터를 보낸다.

Parameters:

data – 보낼 bytes (str 이면 UTF-8).

Throws:

RBY1Error – 쓰기 실패(열리지 않음·끊김·타임아웃). RBY1ConnectionError 연결이 바뀜/끊김.

Returns:

True.

bool wait(std::optional<int> timeout_ms = std::nullopt) const#

스트림이 끝날(끊기거나 취소될) 때까지 기다린다.

Parameters:

timeout_ms – 최대 대기(ms). None 이면 끝날 때까지.

Throws:

RBY1ConnectionError – fork 자식에서 부모 핸들 사용.

Returns:

끝났으면 True, 타임아웃이면 False.

void disconnect() const#

스트림을 끊고 진행 중인 수신 콜백이 끝날 때까지 기다린다 — 반환 뒤로 콜백은 없다 (아직 콜백에 넘기지 못한 수신 데이터는 버린다. 콜백 안에서 부르면 기다리지 않는다).

Throws:

RBY1ConnectionError – fork 자식에서 부모 핸들 사용.

void cancel() const#

스트림을 끊는다 (진행 중인 콜백은 기다리지 않는다, 넘기지 못한 수신 데이터는 버린다). fork 로 버려진 핸들이면 아무것도 하지 않는다.

bool is_opened() const#

장치가 열려 있는지 (공식 SDK: connect 성공 뒤 True).

Throws:

RBY1ConnectionError – fork 자식에서 부모 핸들 사용.

Returns:

열려 있으면 True.

bool is_done() const#

스트림이 끝났는지.

Throws:

RBY1ConnectionError – fork 자식에서 부모 핸들 사용.

Returns:

끝났으면 True.

std::map<std::string, uint64_t> read_stats() const#

수신 콜백 통계.

Returns:

{“received”: 받은 chunk 수, “delivered”: 콜백 호출 수, “dropped”: 대기열이 넘쳐 버린 수}. 콜백 없이 열었으면 모두 0.

Private Members

std::shared_ptr<Slot> slot_#
struct RBRby1CommandResult#
#include <rb_rby1_sdk.hpp>

stop / move_* 결과 (Python: {"finished": bool, "finish_code": str}).

Public Members

bool finished = false#
std::string finish_code#
struct RBRby1EmergencyStopResult#
#include <rb_rby1_sdk.hpp>

emergency_stop 결과 (Python: {"stopped": bool}).

Public Members

bool stopped = false#
struct RBRby1JointLimit#
#include <rb_rby1_sdk.hpp>

관절 하나의 리밋 (get_joint_limits).

Public Members

std::string name#
std::array<double, 2> position = {}#
std::array<double, 2> velocity = {}#
std::array<double, 2> acceleration = {}#
double torque = 0#
struct RBRby1JointLimits#
#include <rb_rby1_sdk.hpp>

get_joint_limits 결과 (Python: {joint_name: {"position": [lo, hi], "velocity": [lo, hi], "acceleration": [lo, hi], "torque": t}}, 공식 dynamics 의 관절 순서).

Public Members

std::vector<RBRby1JointLimit> joints#
struct RBRby1Controller#
#include <rb_rby1_sdk.hpp>

부위별 컨트롤러. kind: “position”(기본) / 팔 J “joint_impedance” / 팔 L “cartesian_impedance”·”impedance”. torso·head 는 position 만. Python: {“right_arm”: “impedance”} 또는 {“right_arm”: {“kind”: …, “stiffness”: 200}}.

Public Members

std::string kind = "position"#
double stiffness = 150.0#
double damping = 1.0#
double torque = 100.0#
double translation_weight = 1.0#
double rotation_weight = 1.0#
class RBRby1SDK : public RBBaseSDK#
#include <rb_rby1_sdk.hpp>

Rainbow Robotics RB-Y1 SDK (공식 rby1-sdk C++ 위의 muscat SDK).

인스턴스는 얇은 핸들이고 로봇 gRPC 연결은 프로세스에 하나다 — 몇 번 생성해도 같은 연결을 쓴다. Python 에서 메서드는 기본 async (gRPC 대기를 C++ worker 스레드에서 GIL 없이), sdk.sync.<method> 는 동기. 로봇 연결은 connect_robot/disconnect_robot 이다 — RBBaseSDK.connect/disconnect 는 zenoh 원격 peer 등록.

Public Functions

inline RBRby1SDK()#

Public Static Functions

static std::string connect_robot(const std::optional<std::string> &endpoint = std::nullopt, const std::optional<std::string> &model = std::nullopt, int max_retries = 5, int timeout_ms = 1000)#

RB-Y1 gRPC 서버에 연결하고 로봇 model 을 확정한다.

이미 같은 endpoint(기본값 해석 후)·같은 model(생략 시 무관)로 연결돼 있고 채널이 살아 있으면 no-op — 연결과 스트림을 그대로 두고 연결된 model 을 반환한다. 그 밖에는 기존 연결·스트림을 끊고 새로 연결한다.

Parameters:
  • endpoint – “host:port”. None 이면 환경변수 RBY1_HOST(없으면 192.168.30.1) + “:50051”.

  • model – “a” / “m” / “ub”. 주면 그 model 이 아닐 때 실패한다. 생략하면 로봇이 알려준 model.

  • max_retries – 연결 재시도 횟수.

  • timeout_ms – 시도당 타임아웃(ms).

Throws:

RBY1ConnectionError – 연결 실패 또는 model 불일치.

Returns:

연결된 model 이름 (“a” / “m” / “ub”).

static bool disconnect_robot()#

로봇 gRPC 연결을 끊는다 (스트림도 모두 멈춘다).

Returns:

연결이 있었으면 true.

static bool is_robot_connected()#

로봇 gRPC 연결 여부 — 연결된 로봇이 있고 그 gRPC 채널이 살아 있는지 (공식 IsConnected, RPC 없음).

채널 상태는 gRPC 가 마지막으로 관찰한 것이다: 서버가 죽은 뒤 호출이 한 번 실패해야 false 가 되고, 채널이 스스로 재연결하면 다시 true 가 된다 (connect_robot 불필요).

Returns:

연결돼 있으면 true.

static std::optional<std::string> model()#

연결된 로봇 model.

Returns:

“a” / “m” / “ub”, 미연결이면 None.

static bool power_on(const std::string &robot_model, const std::string &dev_name, FlowManagerArgsPtr flow_manager_args = nullptr)#

장치 전원을 켠다. 켜진 장치는 건드리지 않고 꺼진 장치만 모아 한 번에 켠다 — 전부 켜져 있으면 아무것도 안 보내고 True.

Parameters:
  • robot_model – 로봇 model (“a” / “m” / “ub”). 연결된 로봇과 다르면 실패.

  • dev_name – 장치 이름 정규식 (예: “.*” 전체, “^right_arm_.*”).

  • flow_manager_args – Optional PyFM step context. 성공하면 done() 을 호출한다.

Throws:

RBY1Error – 로봇이 거부했거나 호출 실패. RBY1ConnectionError 미연결.

Returns:

성공하면 True.

static bool power_off(const std::string &robot_model, const std::string &dev_name, FlowManagerArgsPtr flow_manager_args = nullptr)#

장치 전원을 끈다.

Parameters:
  • robot_model – 로봇 model (“a” / “m” / “ub”). 연결된 로봇과 다르면 실패.

  • dev_name – 장치 이름 정규식 (예: “.*” 전체).

  • flow_manager_args – Optional PyFM step context. 성공하면 done() 을 호출한다.

Throws:

RBY1Error – 로봇이 거부했거나 호출 실패. RBY1ConnectionError 미연결.

Returns:

성공하면 True.

static bool is_power_on(const std::string &robot_model, const std::string &dev_name, FlowManagerArgsPtr flow_manager_args = nullptr)#

장치 전원이 켜져 있는지 조회한다.

Parameters:
  • robot_model – 로봇 model (“a” / “m” / “ub”). 연결된 로봇과 다르면 실패.

  • dev_name – 장치 이름 정규식. 매칭된 장치가 모두 켜져 있어야 True.

  • flow_manager_args – Optional PyFM step context. 성공하면 done() 을 호출한다.

Throws:

RBY1Error – 매칭 장치 없음 또는 호출 실패. RBY1ConnectionError 미연결.

Returns:

매칭된 장치가 모두 켜져 있으면 True.

static bool servo_on(const std::string &robot_model, const std::string &dev_name, FlowManagerArgsPtr flow_manager_args = nullptr)#

관절 서보를 켠다. 켜진 관절(is_ready)은 건드리지 않고 꺼진 관절만 모아 한 번에 켠다 — 전부 켜져 있으면 아무것도 안 보내고 True.

Parameters:
  • robot_model – 로봇 model (“a” / “m” / “ub”). 연결된 로봇과 다르면 실패.

  • dev_name – 관절 이름 정규식 (예: “.*” 전체, “^torso_.*”).

  • flow_manager_args – Optional PyFM step context. 성공하면 done() 을 호출한다.

Throws:

RBY1Error – 로봇이 거부했거나 호출 실패. RBY1ConnectionError 미연결.

Returns:

성공하면 True.

static rb::RobotInfo get_robot_info(const std::string &robot_model, FlowManagerArgsPtr flow_manager_args = nullptr)#

로봇 정보(model, 관절·장치 목록 등)를 조회한다.

Parameters:
  • robot_model – 로봇 model (“a” / “m” / “ub”). 연결된 로봇과 다르면 실패.

  • flow_manager_args – Optional PyFM step context. 성공하면 done() 을 호출한다.

Throws:

RBY1Error – 호출 실패. RBY1ConnectionError 미연결.

Returns:

rby1.RobotInfo (공식 타입).

static void start_state_update(const std::string &robot_model, rby1_rt::StateSink callback, double rate)#

로봇 상태 스트림을 시작한다 (latest-only).

공식 start_state_update 와 같이 콜백 인자는 1개 또는 2개다: callback(state) 또는 callback(state, control_manager_state). 개수는 등록 때 한 번 inspect.signature(callback).parameters 로 센다 (bound method 의 self, partial 로 묶인 인자는 빠진다). 그 밖의 개수면 TypeError. 두 값은 같은 스트림 샘플 (GetRobotStateStream 응답 하나)에서 온다 — 1개 형도 같은 RPC 이므로 비용 차이는 없다.

콜백은 스트림 전용 스레드에서 한 번에 하나씩 불린다. 콜백이 느리면 그 사이 도착한 상태는 최신 것만 남고 나머지는 버린다 (gRPC 수신은 막히지 않는다). 콜백이 awaitable(코루틴 등)을 돌려주면 등록 시점의 실행 중 이벤트 루프에서 실행하고 끝날 때까지 다음 상태를 넘기지 않는다 (코루틴도 latest-only). 코루틴 함수를 이벤트 루프 밖에서 등록하면 RuntimeError, 그 밖의 콜백이 루프 없이 awaitable 을 돌려주면 에러 로그 후 그 상태를 버린다. 콜백 예외는 stderr 로 출력하고 스트림은 계속된다. 같은 model 로 다시 부르면 이전 스트림을 멈추고 새로 시작한다. 콜백 안에서 stop_state_update 를 불러도 된다.

끊김 복구: 공식 SDK 는 서버가 스트림을 끝내도 알리지 않으므로, max(10/rate, 1)초 동안 상태가 안 오면 다시 구독한다 (stderr 에 끊김·복구 한 줄씩, 재시도 간격은 두 배씩 4배까지, state_update_stats 의 resubscribes). gRPC 연결은 공식 채널이 스스로 다시 맺으므로 로봇이 돌아오면 connect_robot 없이 스트림이 이어진다.

Parameters:
  • robot_model – 로봇 model (“a” / “m” / “ub”). 연결된 로봇과 다르면 실패.

  • callback – callback(state) 또는 callback(state, control_manager_state) — state 는 rby1.RobotState_A / _M / _UB, control_manager_state 는 rby1.ControlManagerState (공식 타입).

  • rate – 요청 수신 주기(Hz).

Throws:

RBY1Error – model 불일치. RBY1ConnectionError 미연결. TypeError 콜백 인자 개수가 1·2 가 아님.

static bool stop_state_update(const std::string &robot_model)#

상태 스트림을 멈춘다. 진행 중인 동기 콜백이 끝날 때까지 기다리고 (콜백 안에서 부르면 기다리지 않는다), 진행 중인 코루틴 콜백은 취소한다.

Parameters:

robot_model – 로봇 model (“a” / “m” / “ub”).

Returns:

동작 중이던 스트림이 있었으면 True.

static std::map<std::string, uint64_t> state_update_stats(const std::string &robot_model)#

상태 스트림 통계 (멈춘 뒤에도 마지막 값).

Parameters:

robot_model – 로봇 model (“a” / “m” / “ub”).

Returns:

{“received”: 수신 수, “delivered”: 콜백 호출 수, “dropped”: 콜백 전에 새 상태로 덮여 버린 수, “resubscribes”: 끊긴 스트림을 다시 구독한 수}.

static double get_time_scale(const std::string &robot_model, FlowManagerArgsPtr flow_manager_args = nullptr)#

현재 모션 시간 배율(time scale)을 조회한다.

Parameters:
  • robot_model – 로봇 model (“a” / “m” / “ub”). 연결된 로봇과 다르면 실패.

  • flow_manager_args – Optional PyFM step context. 성공하면 done() 을 호출한다.

Throws:

RBY1Error – 호출 실패. RBY1ConnectionError 미연결.

Returns:

현재 time scale (0.0~1.0).

static double set_time_scale(const std::string &robot_model, double time_scale, FlowManagerArgsPtr flow_manager_args = nullptr)#

모션 실행 시간 배율을 설정한다. 0.0 은 정지, 1.0 은 최대 속도.

Parameters:
  • robot_model – 로봇 model (“a” / “m” / “ub”). 연결된 로봇과 다르면 실패.

  • time_scale – 설정할 time scale (0.0~1.0).

  • flow_manager_args – Optional PyFM step context. 성공하면 done() 을 호출한다.

Throws:

RBY1Error – 호출 실패. RBY1ConnectionError 미연결.

Returns:

로봇에 실제 적용된 time scale.

static bool is_servo_on(const std::string &robot_model, const std::string &dev_name, FlowManagerArgsPtr flow_manager_args = nullptr)#

관절 서보가 켜져 있는지 조회한다.

Parameters:
  • robot_model – 로봇 model (“a” / “m” / “ub”). 연결된 로봇과 다르면 실패.

  • dev_name – 관절 이름 정규식.

  • flow_manager_args – Optional PyFM step context. 성공하면 done() 을 호출한다.

Throws:

RBY1Error – 호출 실패. RBY1ConnectionError 미연결.

Returns:

서보가 켜져 있으면 True.

static bool servo_off(const std::string &robot_model, const std::string &dev_name, FlowManagerArgsPtr flow_manager_args = nullptr)#

관절 서보를 끈다.

Parameters:
  • robot_model – 로봇 model (“a” / “m” / “ub”). 연결된 로봇과 다르면 실패.

  • dev_name – 관절 이름 정규식 (예: “.*” 전체).

  • flow_manager_args – Optional PyFM step context. 성공하면 done() 을 호출한다.

Throws:

RBY1Error – 로봇이 거부했거나 호출 실패. RBY1ConnectionError 미연결.

Returns:

성공하면 True.

static bool set_position_p_gain(const std::string &robot_model, const std::string &dev_name, uint16_t p_gain, FlowManagerArgsPtr flow_manager_args = nullptr)#

장치의 위치 제어 P 게인을 설정한다.

Parameters:
  • robot_model – 로봇 model (“a” / “m” / “ub”). 연결된 로봇과 다르면 실패.

  • dev_name – 장치 이름 정규식.

  • p_gain – P 게인 (0~65535).

  • flow_manager_args – Optional PyFM step context. 성공하면 done() 을 호출한다.

Throws:

RBY1Error – 로봇이 거부했거나 호출 실패. RBY1ConnectionError 미연결.

Returns:

성공하면 True.

static bool set_position_i_gain(const std::string &robot_model, const std::string &dev_name, uint16_t i_gain, FlowManagerArgsPtr flow_manager_args = nullptr)#

장치의 위치 제어 I 게인을 설정한다.

Parameters:
  • robot_model – 로봇 model (“a” / “m” / “ub”). 연결된 로봇과 다르면 실패.

  • dev_name – 장치 이름 정규식.

  • i_gain – I 게인 (0~65535).

  • flow_manager_args – Optional PyFM step context. 성공하면 done() 을 호출한다.

Throws:

RBY1Error – 로봇이 거부했거나 호출 실패. RBY1ConnectionError 미연결.

Returns:

성공하면 True.

static bool set_position_d_gain(const std::string &robot_model, const std::string &dev_name, uint16_t d_gain, FlowManagerArgsPtr flow_manager_args = nullptr)#

장치의 위치 제어 D 게인을 설정한다.

Parameters:
  • robot_model – 로봇 model (“a” / “m” / “ub”). 연결된 로봇과 다르면 실패.

  • dev_name – 장치 이름 정규식.

  • d_gain – D 게인 (0~65535).

  • flow_manager_args – Optional PyFM step context. 성공하면 done() 을 호출한다.

Throws:

RBY1Error – 로봇이 거부했거나 호출 실패. RBY1ConnectionError 미연결.

Returns:

성공하면 True.

static bool set_position_pid_gain(const std::string &robot_model, const std::string &dev_name, uint16_t p_gain, uint16_t i_gain, uint16_t d_gain, FlowManagerArgsPtr flow_manager_args = nullptr)#

장치의 위치 제어 P/I/D 게인을 한 번에 설정한다. PIDGain 객체로 주려면 set_position_pid_gain_object.

Parameters:
  • robot_model – 로봇 model (“a” / “m” / “ub”). 연결된 로봇과 다르면 실패.

  • dev_name – 장치 이름 정규식.

  • p_gain – P 게인 (0~65535).

  • i_gain – I 게인 (0~65535).

  • d_gain – D 게인 (0~65535).

  • flow_manager_args – Optional PyFM step context. 성공하면 done() 을 호출한다.

Throws:

RBY1Error – 로봇이 거부했거나 호출 실패. RBY1ConnectionError 미연결.

Returns:

성공하면 True.

static bool set_position_pid_gain_object(const std::string &robot_model, const std::string &dev_name, const rb::PIDGain &pid_gain, FlowManagerArgsPtr flow_manager_args = nullptr)#

장치의 위치 제어 PID 게인을 PIDGain 객체로 설정한다 (공식 SetPositionPIDGain 의 PIDGain 오버로드).

Parameters:
  • robot_model – 로봇 model (“a” / “m” / “ub”). 연결된 로봇과 다르면 실패.

  • dev_name – 장치 이름 정규식.

  • pid_gain – rby1.PIDGain (공식 타입).

  • flow_manager_args – Optional PyFM step context. 성공하면 done() 을 호출한다.

Throws:

RBY1Error – 로봇이 거부했거나 호출 실패. RBY1ConnectionError 미연결.

Returns:

성공하면 True.

static std::vector<rb::PIDGain> get_torso_position_pid_gains(const std::string &robot_model, FlowManagerArgsPtr flow_manager_args = nullptr)#

몸통(torso) 관절들의 위치 제어 PID 게인을 조회한다.

Parameters:
  • robot_model – 로봇 model (“a” / “m” / “ub”). 연결된 로봇과 다르면 실패.

  • flow_manager_args – Optional PyFM step context. 성공하면 done() 을 호출한다.

Throws:

RBY1Error – 호출 실패. RBY1ConnectionError 미연결.

Returns:

관절별 rby1.PIDGain 목록.

static std::vector<rb::PIDGain> get_right_arm_position_pid_gains(const std::string &robot_model, FlowManagerArgsPtr flow_manager_args = nullptr)#

오른팔 관절들의 위치 제어 PID 게인을 조회한다.

Parameters:
  • robot_model – 로봇 model (“a” / “m” / “ub”). 연결된 로봇과 다르면 실패.

  • flow_manager_args – Optional PyFM step context. 성공하면 done() 을 호출한다.

Throws:

RBY1Error – 호출 실패. RBY1ConnectionError 미연결.

Returns:

관절별 rby1.PIDGain 목록.

static std::vector<rb::PIDGain> get_left_arm_position_pid_gains(const std::string &robot_model, FlowManagerArgsPtr flow_manager_args = nullptr)#

왼팔 관절들의 위치 제어 PID 게인을 조회한다.

Parameters:
  • robot_model – 로봇 model (“a” / “m” / “ub”). 연결된 로봇과 다르면 실패.

  • flow_manager_args – Optional PyFM step context. 성공하면 done() 을 호출한다.

Throws:

RBY1Error – 호출 실패. RBY1ConnectionError 미연결.

Returns:

관절별 rby1.PIDGain 목록.

static std::vector<rb::PIDGain> get_head_position_pid_gains(const std::string &robot_model, FlowManagerArgsPtr flow_manager_args = nullptr)#

머리 관절들의 위치 제어 PID 게인을 조회한다.

Parameters:
  • robot_model – 로봇 model (“a” / “m” / “ub”). 연결된 로봇과 다르면 실패.

  • flow_manager_args – Optional PyFM step context. 성공하면 done() 을 호출한다.

Throws:

RBY1Error – 호출 실패. RBY1ConnectionError 미연결.

Returns:

관절별 rby1.PIDGain 목록.

static rb::PIDGain get_position_pid_gain(const std::string &robot_model, const std::string &dev_name, FlowManagerArgsPtr flow_manager_args = nullptr)#

특정 장치의 위치 제어 PID 게인을 조회한다.

Parameters:
  • robot_model – 로봇 model (“a” / “m” / “ub”). 연결된 로봇과 다르면 실패.

  • dev_name – 장치 이름.

  • flow_manager_args – Optional PyFM step context. 성공하면 done() 을 호출한다.

Throws:

RBY1Error – 호출 실패. RBY1ConnectionError 미연결.

Returns:

rby1.PIDGain (공식 타입).

static bool brake_engage(const std::string &robot_model, const std::string &dev_name, FlowManagerArgsPtr flow_manager_args = nullptr)#

관절 브레이크를 건다.

Parameters:
  • robot_model – 로봇 model (“a” / “m” / “ub”). 연결된 로봇과 다르면 실패.

  • dev_name – 관절 이름 정규식.

  • flow_manager_args – Optional PyFM step context. 성공하면 done() 을 호출한다.

Throws:

RBY1Error – 로봇이 거부했거나 호출 실패. RBY1ConnectionError 미연결.

Returns:

성공하면 True.

static bool brake_release(const std::string &robot_model, const std::string &dev_name, FlowManagerArgsPtr flow_manager_args = nullptr)#

관절 브레이크를 푼다.

Parameters:
  • robot_model – 로봇 model (“a” / “m” / “ub”). 연결된 로봇과 다르면 실패.

  • dev_name – 관절 이름 정규식.

  • flow_manager_args – Optional PyFM step context. 성공하면 done() 을 호출한다.

Throws:

RBY1Error – 로봇이 거부했거나 호출 실패. RBY1ConnectionError 미연결.

Returns:

성공하면 True.

static bool home_offset_reset(const std::string &robot_model, const std::string &dev_name, FlowManagerArgsPtr flow_manager_args = nullptr)#

장치의 home offset 을 초기화한다.

Parameters:
  • robot_model – 로봇 model (“a” / “m” / “ub”). 연결된 로봇과 다르면 실패.

  • dev_name – 장치 이름 정규식.

  • flow_manager_args – Optional PyFM step context. 성공하면 done() 을 호출한다.

Throws:

RBY1Error – 로봇이 거부했거나 호출 실패. RBY1ConnectionError 미연결.

Returns:

성공하면 True.

static bool set_preset_position(const std::string &robot_model, const std::string &joint_name, FlowManagerArgsPtr flow_manager_args = nullptr)#

관절의 preset 위치를 설정한다 (PVL 계열 모터만 지원).

Parameters:
  • robot_model – 로봇 model (“a” / “m” / “ub”). 연결된 로봇과 다르면 실패.

  • joint_name – 관절 이름.

  • flow_manager_args – Optional PyFM step context. 성공하면 done() 을 호출한다.

Throws:

RBY1Error – 로봇이 거부했거나 호출 실패. RBY1ConnectionError 미연결.

Returns:

성공하면 True.

static bool enable_control_manager(const std::string &robot_model, bool unlimited_mode_enabled = false, FlowManagerArgsPtr flow_manager_args = nullptr)#

control manager 를 켠다. 로봇에 명령을 보내기 전에 불러야 한다.

Parameters:
  • robot_model – 로봇 model (“a” / “m” / “ub”). 연결된 로봇과 다르면 실패.

  • unlimited_mode_enabled – unlimited 모드 사용 여부.

  • flow_manager_args – Optional PyFM step context. 성공하면 done() 을 호출한다.

Throws:

RBY1Error – 로봇이 거부했거나 호출 실패. RBY1ConnectionError 미연결.

Returns:

성공하면 True.

static bool disable_control_manager(const std::string &robot_model, FlowManagerArgsPtr flow_manager_args = nullptr)#

control manager 를 끈다.

Parameters:
  • robot_model – 로봇 model (“a” / “m” / “ub”). 연결된 로봇과 다르면 실패.

  • flow_manager_args – Optional PyFM step context. 성공하면 done() 을 호출한다.

Throws:

RBY1Error – 로봇이 거부했거나 호출 실패. RBY1ConnectionError 미연결.

Returns:

성공하면 True.

static bool reset_fault_control_manager(const std::string &robot_model, FlowManagerArgsPtr flow_manager_args = nullptr)#

control manager 의 fault 를 해제한다.

Parameters:
  • robot_model – 로봇 model (“a” / “m” / “ub”). 연결된 로봇과 다르면 실패.

  • flow_manager_args – Optional PyFM step context. 성공하면 done() 을 호출한다.

Throws:

RBY1Error – 로봇이 거부했거나 호출 실패. RBY1ConnectionError 미연결.

Returns:

성공하면 True.

static bool cancel_control(const std::string &robot_model, FlowManagerArgsPtr flow_manager_args = nullptr)#

진행 중인 제어(명령)를 취소한다.

Parameters:
  • robot_model – 로봇 model (“a” / “m” / “ub”). 연결된 로봇과 다르면 실패.

  • flow_manager_args – Optional PyFM step context. 성공하면 done() 을 호출한다.

Throws:

RBY1Error – 로봇이 거부했거나 호출 실패. RBY1ConnectionError 미연결.

Returns:

성공하면 True.

static bool set_tool_flange_output_voltage(const std::string &robot_model, const std::string &name, int voltage, FlowManagerArgsPtr flow_manager_args = nullptr)#

툴 플랜지 출력 전압을 설정한다.

Parameters:
  • robot_model – 로봇 model (“a” / “m” / “ub”). 연결된 로봇과 다르면 실패.

  • name – 툴 플랜지 이름 (“right” / “left”).

  • voltage – 출력 전압 [V]. 보통 12 / 24, 0 이면 출력 끔.

  • flow_manager_args – Optional PyFM step context. 성공하면 done() 을 호출한다.

Throws:

RBY1Error – 로봇이 거부했거나 호출 실패. RBY1ConnectionError 미연결.

Returns:

성공하면 True.

static bool set_tool_flange_digital_output(const std::string &robot_model, const std::string &name, unsigned int channel, bool state, FlowManagerArgsPtr flow_manager_args = nullptr)#

툴 플랜지 디지털 출력 한 채널의 상태를 설정한다.

Parameters:
  • robot_model – 로봇 model (“a” / “m” / “ub”). 연결된 로봇과 다르면 실패.

  • name – 팔 이름 (“right” / “left”).

  • channel – 디지털 출력 채널 번호.

  • state – True = ON, False = OFF.

  • flow_manager_args – Optional PyFM step context. 성공하면 done() 을 호출한다.

Throws:

RBY1Error – 로봇이 거부했거나 호출 실패. RBY1ConnectionError 미연결.

Returns:

성공하면 True.

static bool set_tool_flange_digital_output_dual(const std::string &robot_model, const std::string &name, bool state_0, bool state_1, FlowManagerArgsPtr flow_manager_args = nullptr)#

툴 플랜지 디지털 출력 채널 0/1 의 상태를 동시에 설정한다.

Parameters:
  • robot_model – 로봇 model (“a” / “m” / “ub”). 연결된 로봇과 다르면 실패.

  • name – 팔 이름 (“right” / “left”).

  • state_0 – 채널 0 상태 (True = ON).

  • state_1 – 채널 1 상태 (True = ON).

  • flow_manager_args – Optional PyFM step context. 성공하면 done() 을 호출한다.

Throws:

RBY1Error – 로봇이 거부했거나 호출 실패. RBY1ConnectionError 미연결.

Returns:

성공하면 True.

static std::vector<rb::Log> get_last_log(const std::string &robot_model, unsigned int count, FlowManagerArgsPtr flow_manager_args = nullptr)#

최근 로그를 조회한다.

Parameters:
  • robot_model – 로봇 model (“a” / “m” / “ub”). 연결된 로봇과 다르면 실패.

  • count – 가져올 로그 개수.

  • flow_manager_args – Optional PyFM step context. 성공하면 done() 을 호출한다.

Throws:

RBY1Error – 호출 실패. RBY1ConnectionError 미연결.

Returns:

rby1.Log 목록 (공식 타입).

static std::vector<std::string> get_fault_log_list(const std::string &robot_model, FlowManagerArgsPtr flow_manager_args = nullptr)#

fault 로그 목록을 조회한다.

Parameters:
  • robot_model – 로봇 model (“a” / “m” / “ub”). 연결된 로봇과 다르면 실패.

  • flow_manager_args – Optional PyFM step context. 성공하면 done() 을 호출한다.

Throws:

RBY1Error – 호출 실패. RBY1ConnectionError 미연결.

Returns:

fault 로그 항목 문자열 목록.

static rb::ControlManagerState get_control_manager_state(const std::string &robot_model, FlowManagerArgsPtr flow_manager_args = nullptr)#

control manager 상태를 조회한다.

Parameters:
  • robot_model – 로봇 model (“a” / “m” / “ub”). 연결된 로봇과 다르면 실패.

  • flow_manager_args – Optional PyFM step context. 성공하면 done() 을 호출한다.

Throws:

RBY1Error – 호출 실패. RBY1ConnectionError 미연결.

Returns:

rby1.ControlManagerState (공식 타입).

static bool reset_odometry(const std::string &robot_model, double angle, const Eigen::Vector2d &position, FlowManagerArgsPtr flow_manager_args = nullptr)#

오도메트리를 주어진 값으로 초기화한다.

Parameters:
  • robot_model – 로봇 model (“a” / “m” / “ub”). 연결된 로봇과 다르면 실패.

  • angle – 새 각도 [rad].

  • position – 새 위치 [x, y] [m].

  • flow_manager_args – Optional PyFM step context. 성공하면 done() 을 호출한다.

Throws:

RBY1Error – 로봇이 거부했거나 호출 실패. RBY1ConnectionError 미연결.

Returns:

성공하면 True.

static std::vector<std::pair<std::string, int>> get_parameter_list(const std::string &robot_model, FlowManagerArgsPtr flow_manager_args = nullptr)#

파라미터 목록을 조회한다.

Parameters:
  • robot_model – 로봇 model (“a” / “m” / “ub”). 연결된 로봇과 다르면 실패.

  • flow_manager_args – Optional PyFM step context. 성공하면 done() 을 호출한다.

Throws:

RBY1Error – 호출 실패. RBY1ConnectionError 미연결.

Returns:

(파라미터 이름, 타입) 목록.

static bool set_parameter(const std::string &robot_model, const std::string &name, const std::string &value, bool write_db = true, FlowManagerArgsPtr flow_manager_args = nullptr)#

로봇 파라미터 값을 설정한다.

Parameters:
  • robot_model – 로봇 model (“a” / “m” / “ub”). 연결된 로봇과 다르면 실패.

  • name – 파라미터 이름.

  • value – 파라미터 값 (문자열).

  • write_db – DB 에도 기록할지 여부.

  • flow_manager_args – Optional PyFM step context. 성공하면 done() 을 호출한다.

Throws:

RBY1Error – 해당 파라미터가 없거나 호출 실패. RBY1ConnectionError 미연결.

Returns:

성공하면 True.

static std::string get_parameter(const std::string &robot_model, const std::string &name, FlowManagerArgsPtr flow_manager_args = nullptr)#

로봇 파라미터 값을 조회한다.

Parameters:
  • robot_model – 로봇 model (“a” / “m” / “ub”). 연결된 로봇과 다르면 실패.

  • name – 파라미터 이름.

  • flow_manager_args – Optional PyFM step context. 성공하면 done() 을 호출한다.

Throws:

RBY1Error – 호출 실패. RBY1ConnectionError 미연결.

Returns:

파라미터 값 (문자열).

static bool factory_reset_parameter(const std::string &robot_model, const std::string &name, FlowManagerArgsPtr flow_manager_args = nullptr)#

파라미터 하나를 공장 기본값으로 되돌린다.

Parameters:
  • robot_model – 로봇 model (“a” / “m” / “ub”). 연결된 로봇과 다르면 실패.

  • name – 파라미터 이름.

  • flow_manager_args – Optional PyFM step context. 성공하면 done() 을 호출한다.

Throws:

RBY1Error – 로봇이 거부했거나 호출 실패. RBY1ConnectionError 미연결.

Returns:

성공하면 True.

static void factory_reset_all_parameters(const std::string &robot_model, FlowManagerArgsPtr flow_manager_args = nullptr)#

모든 파라미터를 공장 기본값으로 되돌린다.

Parameters:
  • robot_model – 로봇 model (“a” / “m” / “ub”). 연결된 로봇과 다르면 실패.

  • flow_manager_args – Optional PyFM step context. 성공하면 done() 을 호출한다.

Throws:

RBY1Error – 호출 실패. RBY1ConnectionError 미연결.

static bool reset_parameter(const std::string &robot_model, const std::string &name, FlowManagerArgsPtr flow_manager_args = nullptr)#

파라미터 하나를 기본값으로 되돌린다.

Parameters:
  • robot_model – 로봇 model (“a” / “m” / “ub”). 연결된 로봇과 다르면 실패.

  • name – 파라미터 이름.

  • flow_manager_args – Optional PyFM step context. 성공하면 done() 을 호출한다.

Throws:

RBY1Error – 로봇이 거부했거나 호출 실패. RBY1ConnectionError 미연결.

Returns:

성공하면 True.

static void reset_all_parameters(const std::string &robot_model, FlowManagerArgsPtr flow_manager_args = nullptr)#

모든 파라미터를 기본값으로 되돌린다.

Parameters:
  • robot_model – 로봇 model (“a” / “m” / “ub”). 연결된 로봇과 다르면 실패.

  • flow_manager_args – Optional PyFM step context. 성공하면 done() 을 호출한다.

Throws:

RBY1Error – 호출 실패. RBY1ConnectionError 미연결.

static std::string get_robot_model(const std::string &robot_model, FlowManagerArgsPtr flow_manager_args = nullptr)#

로봇에 저장된 로봇 모델(URDF) 문자열을 조회한다.

Parameters:
  • robot_model – 로봇 model (“a” / “m” / “ub”). 연결된 로봇과 다르면 실패.

  • flow_manager_args – Optional PyFM step context. 성공하면 done() 을 호출한다.

Throws:

RBY1Error – 호출 실패. RBY1ConnectionError 미연결.

Returns:

로봇 모델 문자열.

static bool import_robot_model(const std::string &robot_model, const std::string &name, const std::string &model, FlowManagerArgsPtr flow_manager_args = nullptr)#

로봇 모델(URDF)을 로봇에 등록한다.

Parameters:
  • robot_model – 로봇 model (“a” / “m” / “ub”). 연결된 로봇과 다르면 실패.

  • name – 모델 이름.

  • model – 모델 데이터 (URDF 문자열).

  • flow_manager_args – Optional PyFM step context. 성공하면 done() 을 호출한다.

Throws:

RBY1Error – 로봇이 거부했거나 호출 실패. RBY1ConnectionError 미연결.

Returns:

성공하면 True.

static bool set_led_color(const std::string &robot_model, const rb::Color &color, double duration = 1, double transition_time = 0, bool blinking = false, double blinking_freq = 1, FlowManagerArgsPtr flow_manager_args = nullptr)#

LED 색을 설정한다.

Parameters:
  • robot_model – 로봇 model (“a” / “m” / “ub”). 연결된 로봇과 다르면 실패.

  • color – rby1.Color (공식 타입, RGB 0~255).

  • duration – 유지 시간 [s].

  • transition_time – 전환 시간 [s].

  • blinking – 깜빡임 여부.

  • blinking_freq – 깜빡임 주파수 [Hz].

  • flow_manager_args – Optional PyFM step context. 성공하면 done() 을 호출한다.

Throws:

RBY1Error – 로봇이 거부했거나 호출 실패. RBY1ConnectionError 미연결.

Returns:

성공하면 True.

static RBRby1SystemTime get_system_time(const std::string &robot_model, FlowManagerArgsPtr flow_manager_args = nullptr)#

로봇 시스템 시간을 조회한다.

Parameters:
  • robot_model – 로봇 model (“a” / “m” / “ub”). 연결된 로봇과 다르면 실패.

  • flow_manager_args – Optional PyFM step context. 성공하면 done() 을 호출한다.

Throws:

RBY1Error – 호출 실패. RBY1ConnectionError 미연결.

Returns:

(datetime, local_time) — 로봇 타임존의 aware datetime 과 로봇의 로컬 시간 문자열 (공식 Python 바인딩과 같은 형태). 로봇이 타임존을 주지 않으면 datetime 은 UTC.

static bool set_system_time(const std::string &robot_model, const RBRby1Timestamp &utc_time, const std::optional<std::string> &time_zone = std::nullopt, FlowManagerArgsPtr flow_manager_args = nullptr)#

로봇 시스템 시간을 설정한다.

Parameters:
  • robot_model – 로봇 model (“a” / “m” / “ub”). 연결된 로봇과 다르면 실패.

  • utc_time – 새 시간 (Python datetime.datetime; naive 면 로컬 시간으로 해석).

  • time_zone – 로봇 타임존 (예: “Asia/Seoul”). None 이면 타임존은 바꾸지 않는다.

  • flow_manager_args – Optional PyFM step context. 성공하면 done() 을 호출한다.

Throws:

RBY1Error – 로봇이 거부했거나 호출 실패. RBY1ConnectionError 미연결.

Returns:

성공하면 True.

static bool set_battery_level(const std::string &robot_model, double level, FlowManagerArgsPtr flow_manager_args = nullptr)#

배터리 잔량을 설정한다.

Parameters:
  • robot_model – 로봇 model (“a” / “m” / “ub”). 연결된 로봇과 다르면 실패.

  • level – 배터리 잔량 [%] (0.0~100.0).

  • flow_manager_args – Optional PyFM step context. 성공하면 done() 을 호출한다.

Throws:

RBY1Error – 로봇이 거부했거나 호출 실패. RBY1ConnectionError 미연결.

Returns:

성공하면 True.

static bool set_battery_config(const std::string &robot_model, double cutoff_voltage, double fully_charged_voltage, const std::array<double, 4> &coefficients, FlowManagerArgsPtr flow_manager_args = nullptr)#

배터리 설정을 바꾼다.

Parameters:
  • robot_model – 로봇 model (“a” / “m” / “ub”). 연결된 로봇과 다르면 실패.

  • cutoff_voltage – 차단 전압 [V].

  • fully_charged_voltage – 완충 전압 [V].

  • coefficients – 배터리 계수 4개.

  • flow_manager_args – Optional PyFM step context. 성공하면 done() 을 호출한다.

Throws:

RBY1Error – 로봇이 거부했거나 호출 실패. RBY1ConnectionError 미연결.

Returns:

성공하면 True.

static bool reset_battery_config(const std::string &robot_model, FlowManagerArgsPtr flow_manager_args = nullptr)#

배터리 설정을 기본값으로 되돌린다.

Parameters:
  • robot_model – 로봇 model (“a” / “m” / “ub”). 연결된 로봇과 다르면 실패.

  • flow_manager_args – Optional PyFM step context. 성공하면 done() 을 호출한다.

Throws:

RBY1Error – 로봇이 거부했거나 호출 실패. RBY1ConnectionError 미연결.

Returns:

성공하면 True.

static bool wait_for_control_ready(const std::string &robot_model, long timeout_ms, FlowManagerArgsPtr flow_manager_args = nullptr)#

로봇이 제어 명령을 받을 준비가 될 때까지 기다린다. servo_on 뒤, 명령 전에 부른다.

Parameters:
  • robot_model – 로봇 model (“a” / “m” / “ub”). 연결된 로봇과 다르면 실패.

  • timeout_ms – 타임아웃 [ms].

  • flow_manager_args – Optional PyFM step context. 성공하면 done() 을 호출한다.

Throws:

RBY1Error – 호출 실패. RBY1ConnectionError 미연결.

Returns:

준비됐으면 True, 타임아웃이면 False (예외 아님).

static bool reset_network_setting(const std::string &robot_model, FlowManagerArgsPtr flow_manager_args = nullptr)#

네트워크 설정을 기본값으로 되돌린다.

Parameters:
  • robot_model – 로봇 model (“a” / “m” / “ub”). 연결된 로봇과 다르면 실패.

  • flow_manager_args – Optional PyFM step context. 성공하면 done() 을 호출한다.

Throws:

RBY1Error – 로봇이 거부했거나 호출 실패. RBY1ConnectionError 미연결.

Returns:

성공하면 True.

static std::vector<rb::WifiNetwork> scan_wifi(const std::string &robot_model, FlowManagerArgsPtr flow_manager_args = nullptr)#

주변 WiFi 네트워크를 검색한다.

Parameters:
  • robot_model – 로봇 model (“a” / “m” / “ub”). 연결된 로봇과 다르면 실패.

  • flow_manager_args – Optional PyFM step context. 성공하면 done() 을 호출한다.

Throws:

RBY1Error – 호출 실패. RBY1ConnectionError 미연결.

Returns:

rby1.WifiNetwork 목록 (공식 타입).

static bool connect_wifi(const std::string &robot_model, const std::string &ssid, const std::string &password = "", bool use_dhcp = true, const std::string &ip_address = "", const std::string &gateway = "", const std::vector<std::string> &dns = {}, FlowManagerArgsPtr flow_manager_args = nullptr)#

WiFi 네트워크에 연결한다.

Parameters:
  • robot_model – 로봇 model (“a” / “m” / “ub”). 연결된 로봇과 다르면 실패.

  • ssid – 네트워크 이름.

  • password – 비밀번호.

  • use_dhcp – DHCP 로 IP 를 받을지 여부.

  • ip_address – 고정 IP 주소 (use_dhcp=False 일 때).

  • gateway – 게이트웨이 주소.

  • dns – DNS 서버 목록.

  • flow_manager_args – Optional PyFM step context. 성공하면 done() 을 호출한다.

Throws:

RBY1Error – 로봇이 거부했거나 호출 실패. RBY1ConnectionError 미연결.

Returns:

성공하면 True.

static bool disconnect_wifi(const std::string &robot_model, FlowManagerArgsPtr flow_manager_args = nullptr)#

WiFi 연결을 끊는다.

Parameters:
  • robot_model – 로봇 model (“a” / “m” / “ub”). 연결된 로봇과 다르면 실패.

  • flow_manager_args – Optional PyFM step context. 성공하면 done() 을 호출한다.

Throws:

RBY1Error – 로봇이 거부했거나 호출 실패. RBY1ConnectionError 미연결.

Returns:

성공하면 True.

static std::optional<rb::WifiStatus> get_wifi_status(const std::string &robot_model, FlowManagerArgsPtr flow_manager_args = nullptr)#

WiFi 연결 상태를 조회한다.

Parameters:
  • robot_model – 로봇 model (“a” / “m” / “ub”). 연결된 로봇과 다르면 실패.

  • flow_manager_args – Optional PyFM step context. 성공하면 done() 을 호출한다.

Throws:

RBY1Error – 호출 실패. RBY1ConnectionError 미연결.

Returns:

rby1.WifiStatus (공식 타입). 로봇이 에러 응답을 주면 None.

static std::vector<rb::SerialDevice> get_serial_device_list(const std::string &robot_model, FlowManagerArgsPtr flow_manager_args = nullptr)#

로봇의 시리얼 장치 목록을 조회한다.

Parameters:
  • robot_model – 로봇 model (“a” / “m” / “ub”). 연결된 로봇과 다르면 실패.

  • flow_manager_args – Optional PyFM step context. 성공하면 done() 을 호출한다.

Throws:

RBY1Error – 호출 실패. RBY1ConnectionError 미연결.

Returns:

rby1.SerialDevice 목록 (공식 타입).

static rby1_rt::RobotStateVar get_state(const std::string &robot_model, FlowManagerArgsPtr flow_manager_args = nullptr)#

현재 로봇 상태를 한 번 조회한다.

Parameters:
  • robot_model – 로봇 model (“a” / “m” / “ub”). 연결된 로봇과 다르면 실패.

  • flow_manager_args – Optional PyFM step context. 성공하면 done() 을 호출한다.

Throws:

RBY1Error – 호출 실패. RBY1ConnectionError 미연결.

Returns:

rby1.RobotState_A / _M / _UB (연결된 model 의 공식 타입).

static RBRby1CommandHandle send_command(const std::string &robot_model, RBRby1CommandBuilderRef builder, int priority = 1)#

로봇 명령을 보낸다 (수락까지만 — 완료는 핸들의 wait/get 으로 기다린다).

명령 완료가 PyFM step 완료이므로 flow_manager_args 는 핸들의 wait/get 에 넘긴다. 반환된 핸들을 버리면 명령이 취소된다 (공식 핸들 소멸자). await 가 실행 전에 취소되면 명령은 보내지 않는다.

Parameters:
  • robot_model – 로봇 model (“a” / “m” / “ub”). 연결된 로봇과 다르면 실패.

  • builder – rby1.RobotCommandBuilder (공식 타입).

  • priority – 명령 우선순위 (높을수록 우선).

Throws:

RBY1Error – 호출 실패. RBY1ConnectionError 미연결.

Returns:

RBRby1CommandHandle.

static RBRby1CommandStream create_command_stream(const std::string &robot_model, int priority = 1)#

명령 스트림을 연다 (한 연결로 명령을 연이어 보낸다).

Parameters:
  • robot_model – 로봇 model (“a” / “m” / “ub”). 연결된 로봇과 다르면 실패.

  • priority – 스트림 우선순위 (첫 명령에 실린다).

Throws:

RBY1Error – 호출 실패. RBY1ConnectionError 미연결.

Returns:

RBRby1CommandStream.

static rby1_rt::DynamicsVar get_dynamics(const std::string &robot_model, const std::string &urdf_model = "", FlowManagerArgsPtr flow_manager_args = nullptr)#

로봇 동역학 모델을 만든다.

Parameters:
  • robot_model – 로봇 model (“a” / “m” / “ub”). 연결된 로봇과 다르면 실패.

  • urdf_model – URDF 내용(경로가 아니다). 비우면 로봇에 저장된 모델(get_robot_model)을 쓴다.

  • flow_manager_args – Optional PyFM step context. 성공하면 done() 을 호출한다.

Throws:

RBY1Error – 모델 조회·URDF 파싱 실패(관절 수 ≠ DOF 포함). RBY1ConnectionError 미연결.

Returns:

rby1.dynamics.Robot_24 / _26 / _18 (연결된 model 의 DOF, 공식 타입).

static RBRby1SerialStream open_serial_stream(const std::string &robot_model, const std::string &device_path, int baudrate, int bytesize = 8, char parity = 'N', int stopbits = 1, rby1_rt::SerialSink callback = nullptr)#

로봇의 시리얼 장치 스트림을 연다 (장치는 반환된 스트림의 connect() 로 연다).

Parameters:
  • robot_model – 로봇 model (“a” / “m” / “ub”). 연결된 로봇과 다르면 실패.

  • device_path – 장치 경로 (get_serial_device_list 의 path).

  • baudrate – 보드레이트.

  • bytesize – 데이터 비트 수.

  • parity – 패리티 (‘N’ / ‘E’ / ‘O’).

  • stopbits – 스톱 비트 수.

  • callback – callback(data: bytes) — 받은 데이터. 수신 전용 스레드에서 순서대로 불린다. None 이면 받지 않는다.

Throws:

RBY1Error – 호출 실패. RBY1ConnectionError 미연결.

Returns:

RBRby1SerialStream.

static RBRby1Bytes download_file(const std::string &robot_model, const std::string &path, FlowManagerArgsPtr flow_manager_args = nullptr)#

로봇의 파일을 내려받는다.

Parameters:
  • robot_model – 로봇 model (“a” / “m” / “ub”). 연결된 로봇과 다르면 실패.

  • path – 로봇 파일 경로 (RBY1_HOME 기준 상대 경로).

  • flow_manager_args – Optional PyFM step context. 성공하면 done() 을 호출한다.

Throws:

RBY1Error – 파일 없음·로봇 에러·gRPC 실패. RBY1ConnectionError 미연결.

Returns:

파일 내용 (bytes).

static void start_log_stream(const std::string &robot_model, rby1_rt::LogSink callback, double rate)#

로봇 로그 스트림을 시작한다 (유실 최소화 대기열).

콜백은 스트림 전용 스레드에서 받은 순서대로 한 번에 하나씩 불린다. 콜백이 느려도 gRPC 수신은 막히지 않고 1024 batch 까지 쌓이며, 넘치면 가장 오래된 것부터 버린다 (log_stream_stats 의 dropped). 콜백이 awaitable(코루틴 등)을 돌려주면 등록 시점의 실행 중 이벤트 루프에서 실행하고 끝날 때까지 다음 batch 를 넘기지 않는다. 코루틴 함수를 이벤트 루프 밖에서 등록하면 RuntimeError. 콜백 예외는 stderr 로 출력하고 스트림은 계속된다. 같은 model 로 다시 부르면 이전 스트림을 멈추고 새로 시작한다. disconnect_robot 은 스트림을 멈춘다. 콜백 안에서 stop_log_stream 을 불러도 된다. 끊김 복구는 start_state_update 와 같다 (max(10/rate, 1)초 동안 수신이 없으면 다시 구독, log_stream_stats 의 resubscribes).

Parameters:
  • robot_model – 로봇 model (“a” / “m” / “ub”). 연결된 로봇과 다르면 실패.

  • callback – callback(logs) — logs 는 rby1.Log 목록 (공식 스트림 콜백 1회분).

  • rate – 요청 수신 주기(Hz).

Throws:

RBY1Error – model 불일치. RBY1ConnectionError 미연결.

static bool stop_log_stream(const std::string &robot_model)#

로그 스트림을 멈춘다. 진행 중인 동기 콜백이 끝날 때까지 기다리고 (콜백 안에서 부르면 기다리지 않는다), 진행 중인 코루틴 콜백은 취소한다. 아직 콜백에 넘기지 못한 로그는 버린다.

Parameters:

robot_model – 로봇 model (“a” / “m” / “ub”).

Returns:

동작 중이던 스트림이 있었으면 True.

static std::map<std::string, uint64_t> log_stream_stats(const std::string &robot_model)#

로그 스트림 통계 (멈춘 뒤에도 마지막 값).

Parameters:

robot_model – 로봇 model (“a” / “m” / “ub”).

Returns:

{“received”: 수신 batch 수, “delivered”: 콜백 호출 수, “dropped”: 대기열이 넘쳐 버린 batch 수, “resubscribes”: 끊긴 스트림을 다시 구독한 수}.

static bool control(const std::string &robot_model, rby1_rt::ControlCallback callback, int port = 0, int priority = 1, FlowManagerArgsPtr flow_manager_args = nullptr)#

실시간(UDP) 제어 루프를 돈다 — 콜백이 finish=True 를 돌려줄 때까지 막힌다.

로봇이 보내는 상태 패킷마다 callback(state) 를 부르고 돌려준 입력을 로봇에 보낸다. 콜백은 제어 루프를 도는 스레드에서 불린다 (async: SDK worker 스레드, sync: 호출한 스레드) — 가볍게 유지해야 실시간성이 지켜진다. 콜백 예외는 제어를 끝내고(로봇 RT 명령 취소) 그 예외를 그대로 호출자에게 던진다. async 호출을 기다리던 쪽이 취소되면(Task.cancel, asyncio.wait_for 타임아웃, 루프 종료) 다음 상태 패킷에 콜백 없이 직전 입력(없으면 현재 위치 유지, gain 0)을 finish=True 로 보내 로봇이 제어를 끝낸다 — 이때 flow_manager_args.done() 은 부르지 않는다. sync 는 콜백의 finish 로만 끝난다. 실행 중 async control 은 SDK worker 4개 중 하나를 쓴다.

Parameters:
  • robot_model – 로봇 model (“a” / “m” / “ub”). 연결된 로봇과 다르면 실패.

  • callback – callback(state) -> input — state 는 rby1.Robot_A_ControlState 등, input 은 같은 model 의 rby1.Robot_A_ControlInput 등 (공식 타입).

  • port – 로컬 UDP 포트. 0 이면 OS 가 고른다.

  • priority – RT 제어 명령 우선순위.

  • flow_manager_args – Optional PyFM step context. finish=True 로 끝나면 done() 을 호출한다.

Throws:

RBY1Error – finish 없이 끝남(UDP bind 실패, 로봇 거부·선점·취소, 연결 끊김) 또는 호출 실패. RBY1ConnectionError 미연결. 콜백이 던진 예외는 그대로.

Returns:

True (finish=True 로 끝남).

static bool sync_time(const std::string &robot_model, FlowManagerArgsPtr flow_manager_args = nullptr)#

로봇과 시간 동기화를 한 번 한다 (Ping 왕복으로 로봇 시계 오프셋 추정 — 이후 RobotState/Log 의 timestamp 가 로컬 시계 기준으로 보정된다).

Parameters:
  • robot_model – 로봇 model (“a” / “m” / “ub”). 연결된 로봇과 다르면 실패.

  • flow_manager_args – Optional PyFM step context. 성공하면 done() 을 호출한다.

Throws:

RBY1Error – 로봇 응답에 시각이 없음 또는 호출 실패. RBY1ConnectionError 미연결.

Returns:

성공하면 True.

static bool has_established_time_sync(const std::string &robot_model, FlowManagerArgsPtr flow_manager_args = nullptr)#

시간 동기화가 한 번이라도 성공했는지 조회한다.

Parameters:
  • robot_model – 로봇 model (“a” / “m” / “ub”). 연결된 로봇과 다르면 실패.

  • flow_manager_args – Optional PyFM step context. 성공하면 done() 을 호출한다.

Throws:

RBY1ConnectionError – 미연결.

Returns:

동기화됐으면 True.

static RBRby1CommandResult stop(const std::string &robot_model, int priority = 1, FlowManagerArgsPtr flow_manager_args = nullptr)#

모션 정지 — StopCommand(whole body) 를 보내고 끝날 때까지 기다린다.

finish_code 가 Ok 가 아니면 예외 대신 그대로 반환하고, muscat/{robot_model}/message 로 ERROR 알림 (RBY1 Move Error: <code>, 사유는 로봇 마지막 로그)을 보낸다. 정지 명령이라 await 가 취소돼도 명령은 취소하지 않는다 (끝날 때까지 기다리고 done() 만 막는다).

Parameters:
  • robot_model – 연결된 model (“a” / “m” / “ub”).

  • priority – 명령 우선순위. 진행 중인 명령보다 확실히 우선하려면 높게.

  • flow_manager_args – Optional PyFM step context. 명령이 끝나면 done() 을 호출한다.

Throws:

RBY1ConnectionError – 미연결. RBY1Error model 불일치·gRPC 실패.

Returns:

{“finished”: bool, “finish_code”: str}.

static RBRby1EmergencyStopResult emergency_stop(const std::string &robot_model, FlowManagerArgsPtr flow_manager_args = nullptr)#

비상 정지 — 모션 정지(priority 10) 후 무조건 전원 차단(power_off “.*”). 물리 EMO 와 별개인 SW 트리거.

정지가 실패해도 stderr 에 로그를 남기고 전원 차단은 반드시 시도한다 (최후 안전장치). 재개하려면 power_on + servo_on + enable_control_manager 가 다시 필요하다. await 가 취소돼도 끝까지 수행한다.

Parameters:
  • robot_model – 연결된 model.

  • flow_manager_args – Optional PyFM step context. 끝나면 done() 을 호출한다.

Throws:

RBY1ConnectionError – 미연결. RBY1Error model 불일치·전원 차단 gRPC 실패.

Returns:

{“stopped”: bool} (power_off 결과).

static RBRby1CommandResult move_j(const std::string &robot_model, const RBRby1JogJoints &target, const RBRby1Controllers &controllers = {}, double minimum_time = 3.0, int priority = 1, FlowManagerArgsPtr flow_manager_args = nullptr)#

관절 이동 1회 — 컴포넌트별 목표 각도(deg) 로 이동하고 끝날 때까지 기다린다.

target 의 키가 곧 명령 부위. 컨트롤 매니저는 자동 복구한다. joint_impedance 는 minimum_time 유지 후 Ok. async await 가 취소되면 로봇 명령도 취소한다 (C++: rby1_rt::CancelScope::Enter).

Parameters:
  • robot_model – 연결된 model.

  • target – 컴포넌트(“torso”/”right_arm”/”left_arm”/”head”) → 관절값 [deg], 컴포넌트 전체 길이.

  • controllers – 부위별 컨트롤러 (없으면 position). 팔: “position”/”joint_impedance”. torso·head: “position”.

  • minimum_time – 최소 이동 시간 [s].

  • priority – 명령 우선순위.

  • flow_manager_args – Optional PyFM step context. 정지면 로봇을 세우고 예외, 일시정지면 세웠다가 resume 뒤 남은 시간으로 재전송. 끝나면 done(). args[“variable”] 이 있으면 done 전에 그 이름의 변수에 끝난 자세 저장 (move_j: 부위별 관절 deg, move_l: reference 기준 pose — target 과 같은 형식).

Throws:
  • ValueError – 빈 target, 모르는 컴포넌트, 길이 불일치, 유한수 아님, 허용 안 되는 컨트롤러.

  • RBY1ConnectionError – 미연결. RBY1Error model 불일치·gRPC 실패·enable 실패·smooth jog 중.

Returns:

{“finished”: bool, “finish_code”: str}. Ok 가 아니면 알림도 나간다.

static RBRby1CommandResult move_l(const std::string &robot_model, const RBRby1Cartesians &target, const std::string &reference = "base", const RBRby1Controllers &controllers = {}, double minimum_time = 3.0, int priority = 1, FlowManagerArgsPtr flow_manager_args = nullptr)#

Cartesian 이동 1회 — 손(ee_right/ee_left)·T5(link_torso_5) 자세로 이동하고 끝날 때까지 기다린다.

IK 는 로봇이 푼다. 나머지 규칙은 move_j 와 같다.

Parameters:
  • robot_model – 연결된 model.

  • target – 컴포넌트(“torso”/”right_arm”/”left_arm”) → [x_mm, y_mm, z_mm, rx_deg, ry_deg, rz_deg] (R = Rz·Ry·Rx). torso 는 Base 기준, 손은 reference 기준.

  • reference – “base” 또는 “link_torso_5” (손 목표의 기준 — cartesians_from_position(reference) 와 같은 좌표).

  • controllers – 부위별 컨트롤러. 팔: “position”/”cartesian_impedance”/”impedance”. torso: “position”.

  • minimum_time – 최소 이동 시간 [s].

  • priority – 명령 우선순위.

  • flow_manager_args – move_j 와 같다.

Throws:
  • ValueError – 빈 target, 모르는 컴포넌트·키, reference 오류, 유한수 아님, 허용 안 되는 컨트롤러.

  • RBY1ConnectionError – 미연결. RBY1Error model 불일치·gRPC 실패·enable 실패·smooth jog 중.

Returns:

{“finished”: bool, “finish_code”: str}.

static RBRby1JointLimits get_joint_limits(const std::string &robot_model, FlowManagerArgsPtr flow_manager_args = nullptr)#

관절 리밋 조회 (로봇 dynamics 모델). move_j 전 목표 검증용.

Parameters:
  • robot_model – 연결된 model.

  • flow_manager_args – Optional PyFM step context. 성공하면 done() 을 호출한다.

Throws:

RBY1ConnectionError – 미연결. RBY1Error model 불일치·gRPC 실패·dynamics 모델 로드 실패.

Returns:

{관절명: {“position”: [lo, hi] rad, “velocity”: [lo, hi] rad/s, “acceleration”: [lo, hi] rad/s^2, “torque”: Nm}} (공식 dynamics 관절 순서).

static bool approach_j(const std::string &robot_model, const RBRby1JogJoints &target, const RBRby1Controllers &controllers = {}, double minimum_time = 3.0, int priority = 1)#

Approach J — move_j 와 같은 관절 이동을 시작만 하고 바로 돌아온다 (UI “이 자세로 이동” 용).

완료를 기다리지 않는다 (목표에 닿으면 로봇이 스스로 멈춘다). approach_stop 으로 중단한다. 진행 중 approach 가 있으면 먼저 취소하고 시작한다. 로봇이 거부하면 RBY1Error (사유 포함). 임피던스 컨트롤러는 유지 명령이라 허용하지 않는다 (position 만).

Parameters:
  • robot_model – 연결된 model.

  • target – move_j 와 같음.

  • controllers – 부위별 컨트롤러 — “position” 만.

  • minimum_time – 최소 이동 시간 [s].

  • priority – 명령 우선순위.

Throws:
  • ValueError – move_j 와 같음 + 임피던스 컨트롤러.

  • RBY1ConnectionError – 미연결. RBY1Error model 불일치·gRPC 실패·enable 실패·smooth jog 중.

Returns:

True (명령을 보냈다).

static bool approach_l(const std::string &robot_model, const RBRby1Cartesians &target, const std::string &reference = "base", const RBRby1Controllers &controllers = {}, double minimum_time = 3.0, int priority = 1)#

Approach L — move_l 과 같은 Cartesian 이동을 시작만 하고 바로 돌아온다. 규칙은 approach_j 와 같다.

Parameters:
  • robot_model – 연결된 model.

  • target – move_l 과 같음.

  • reference – “base” 또는 “link_torso_5”.

  • controllers – 부위별 컨트롤러 — “position” 만.

  • minimum_time – 최소 이동 시간 [s].

  • priority – 명령 우선순위.

Throws:
  • ValueError – move_l 과 같음 + 임피던스 컨트롤러.

  • RBY1ConnectionError – 미연결. RBY1Error model 불일치·gRPC 실패·enable 실패·smooth jog 중.

Returns:

True (명령을 보냈다).

static bool approach_stop(const std::string &robot_model)#

진행 중인 approach 를 중단한다 (공식 Cancel, 끝날 때까지 최대 1.5s 대기). 없으면 아무것도 안 한다.

Parameters:

robot_model – 연결된 model.

Returns:

중단한 approach 가 있었으면 True.

static RBRby1Cartesians cartesians_from_position(const std::string &robot_model, const std::vector<double> &position, const std::string &reference = "base")#

관절값 → 손·T5 자세 (FK). gRPC 없이 캐시된 dynamics 모델로 계산한다 (20Hz 상태 콜백용).

Parameters:
  • robot_model – 연결된 model.

  • position – 관절값 [rad], state.position 그대로.

  • reference – “base” (기본) 또는 “link_torso_5” — move_l / smoothjog_l 의 reference 와 같은 기준.

Throws:

ValueError – position 길이가 DOF 와 다름, 모르는 reference. RBY1ConnectionError 미연결. RBY1Error model 불일치·모델 로드 실패.

Returns:

base: {“torso”: pose, “right_arm”: pose, “left_arm”: pose} — Base 기준 link_torso_5 / ee_right / ee_left. link_torso_5: {“right_arm”: pose, “left_arm”: pose} — T5 기준 손 자세 (torso 자신은 항등이라 없음). pose = [x_mm, y_mm, z_mm, rx_deg, ry_deg, rz_deg] (R = Rz·Ry·Rx).

static RBRby1Cartesians smoothjog_l(const std::string &robot_model, const RBRby1Cartesians &target, const std::string &reference = "base")#

Smooth L heartbeat — 손(및 T5) Cartesian 목표를 따라 연속 이동한다.

버튼을 누르는 동안 약 20Hz 로 부른다. 세션이 없으면 시작하고(스트림 1개, smooth_status “start”), 호출마다 CartesianCommand 1개를 보낸다 (minimum_time 0.15s, hold 0.5s). 250ms 동안 heartbeat 가 없으면 스스로 정지한다. target 의 키가 곧 명령에 넣는 부위. 1회 변화량은 위치 1.5mm·회전 0.35° 이하 (이전 목표 기준, 처음 오는 부위는 현재 FK 기준) — 넘으면 정지 + 예외. 세션 중 L/J·reference 변경도 정지 + 예외.

Parameters:
  • robot_model – 연결된 model.

  • target – 컴포넌트(“torso”/”right_arm”/”left_arm”) → [x_mm, y_mm, z_mm, rx_deg, ry_deg, rz_deg]. 비어 있으면 안 된다.

  • reference – “base” 또는 “link_torso_5”.

Throws:
  • ValueError – reference·키·길이 오류, 유한수 아님, 빈 target.

  • RBY1ConnectionError – 미연결. RBY1Error 변화량 초과·로봇 busy·컨트롤러 거부·gRPC 실패.

Returns:

받아들인 목표 (target 과 같음).

static RBRby1JogJoints smoothjog_j(const std::string &robot_model, const RBRby1JogJoints &target)#

Smooth J heartbeat — 관절 목표를 따라 연속 이동한다. 세션·정지 규칙은 smoothjog_l 과 같다.

호출마다 JointPositionCommand 1개 (minimum_time 0.15s, 10°/s, 30°/s²). 1회 변화량은 관절별 0.5° 이하.

Parameters:
  • robot_model – 연결된 model.

  • target – 컴포넌트(“torso”/”right_arm”/”left_arm”/”head”) → 관절값 [deg], 컴포넌트 전체 길이. 비어 있으면 안 된다.

Throws:
  • ValueError – 키·길이 오류, 유한수 아님, 빈 target.

  • RBY1ConnectionError – 미연결. RBY1Error 변화량 초과·로봇 busy·컨트롤러 거부·gRPC 실패.

Returns:

받아들인 목표 (target 과 같음).

static bool smoothjog_stop(const std::string &robot_model, const std::string &reason = "user")#

Smooth jog 정지 (L/J 공용). 스트림 취소 → cancel_control → Idle 대기(최대 1.5s) → smooth_status “stop”.

Parameters:
  • robot_model – 연결된 model.

  • reason – 로그용 정지 사유.

Returns:

정지한 세션이 있었으면 True.

static std::string smooth_status(const std::string &robot_model)#

Smooth jog 상태 — “start”(정지 처리 중 포함) 또는 “stop”.

Parameters:

robot_model – 연결된 model.

Returns:

“start” 또는 “stop”.

Friends

friend void rby1_publish_move_error(const std::string &robot_model, const std::string &finish_code, const std::string &detail)#

실패한 move/stop/approach/smooth jog 를 muscat/{robot_model}/message 로 알린다 (best-effort, 실패는 stderr). detail 이 비면 로봇 로그에서 사유를 뽑는다.

rby1/rby1_runtime.hpp#

namespace rby1_rt#

Typedefs

using CancelScopePtr = std::shared_ptr<CancelScope>#
using RobotA = rb::Robot<rb::y1_model::A>#
using RobotM = rb::Robot<rb::y1_model::M>#
using RobotUB = rb::Robot<rb::y1_model::UB>#
using RobotPtr = std::variant<std::shared_ptr<RobotA>, std::shared_ptr<RobotM>, std::shared_ptr<RobotUB>>#
using RobotStateVar = std::variant<rb::RobotState<rb::y1_model::A>, rb::RobotState<rb::y1_model::M>, rb::RobotState<rb::y1_model::UB>>#
using DynamicsVar = std::variant<std::shared_ptr<rb::dyn::Robot<rb::y1_model::A::kRobotDOF>>, std::shared_ptr<rb::dyn::Robot<rb::y1_model::M::kRobotDOF>>, std::shared_ptr<rb::dyn::Robot<rb::y1_model::UB::kRobotDOF>>>#
using CommandHandlerVar = std::variant<std::shared_ptr<rb::RobotCommandHandler<rb::y1_model::A>>, std::shared_ptr<rb::RobotCommandHandler<rb::y1_model::M>>, std::shared_ptr<rb::RobotCommandHandler<rb::y1_model::UB>>>#
using CommandStreamVar = std::variant<std::shared_ptr<rb::RobotCommandStreamHandler<rb::y1_model::A>>, std::shared_ptr<rb::RobotCommandStreamHandler<rb::y1_model::M>>, std::shared_ptr<rb::RobotCommandStreamHandler<rb::y1_model::UB>>>#
using ControlStateVar = std::variant<rb::ControlState<rb::y1_model::A>, rb::ControlState<rb::y1_model::M>, rb::ControlState<rb::y1_model::UB>>#
using ControlInputVar = std::variant<rb::ControlInput<rb::y1_model::A>, rb::ControlInput<rb::y1_model::M>, rb::ControlInput<rb::y1_model::UB>>#
using ControlCallback = std::function<ControlInputVar(const ControlStateVar&)>#
using StateWorker = StreamWorker<StateSample>#
using StateSlot = StateWorker::Slot#
using StateSink = StateWorker::Sink#
using LogBatch = std::vector<rb::Log>#
using LogWorker = StreamWorker<LogBatch>#
using LogSink = LogWorker::Sink#
using SerialReader = StreamWorker<std::string>#
using SerialSink = SerialReader::Sink#

Functions

template<typename T>
T model_of(const rb::Robot<T>&)#
template<typename T>
rb::ControlInput<T> control_input_of(const rb::ControlState<T>&)#
void jog_after_fork_child()#
template<typename F>
decltype(auto) visit_robot(const RobotPtr &p, F &&f)#

Variables

constexpr size_t kLogStreamQueue = 1024#
constexpr size_t kSerialReadQueue = 1024#
template<typename T>
class BoundedSlot#

Public Functions

inline explicit BoundedSlot(size_t capacity = 1)#
inline void put(T v)#
inline std::optional<T> take(std::optional<std::chrono::milliseconds> idle = std::nullopt, bool *idled = nullptr)#
inline void close()#
inline bool wait_until(const std::function<bool()> &done)#
inline void notify()#
inline uint64_t received() const#
inline uint64_t dropped() const#

Private Members

const size_t capacity_#
mutable std::mutex mu_#
std::condition_variable cv_#
std::deque<T> q_#
bool closed_ = false#
uint64_t received_ = 0#
uint64_t dropped_ = 0#
class CancelScope#

Public Functions

inline void cancel()#
inline void set_canceller(std::function<void()> c)#
inline bool cancelled() const#

Public Static Functions

static inline const std::shared_ptr<CancelScope> &current()#

Private Members

mutable std::mutex mu_#
bool cancelled_ = false#
std::function<void()> canceller_#

Private Static Attributes

static thread_local std::shared_ptr<CancelScope> tl_current_#
class Enter#

Public Functions

inline explicit Enter(std::shared_ptr<CancelScope> s)#
inline ~Enter()#
Enter(const Enter&) = delete#
Enter &operator=(const Enter&) = delete#

Private Members

std::shared_ptr<CancelScope> prev_#
template<typename H>
class HandleSlot#

Public Functions

inline HandleSlot(RobotPtr robot, H h)#
HandleSlot(const HandleSlot&) = delete#
HandleSlot &operator=(const HandleSlot&) = delete#
inline ~HandleSlot()#
inline H get() const#
inline std::optional<H> peek() const#
inline H get_current() const#

Private Functions

inline H get_locked() const#
inline void abandon_locked()#

Private Members

std::optional<RobotPtr> robot_#
std::optional<H> h_#
class Hub#

Public Types

enum class StreamKind#

Values:

enumerator State#
enumerator Log#

Public Functions

std::string connect(const std::string &endpoint, const std::optional<std::string> &model, int max_retries, int timeout_ms)#
bool disconnect()#
std::optional<std::string> model() const#
std::string endpoint() const#
bool is_connected() const#
RobotPtr robot(const std::string &robot_model) const#
void start_state_update(const std::string &robot_model, double rate, StateSink sink)#
void start_log_stream(const std::string &robot_model, double rate, LogSink sink)#
bool stop_stream(StreamKind kind, const std::string &robot_model)#
void stop_all_streams()#
StreamStats stream_stats(StreamKind kind, const std::string &robot_model) const#

Public Static Functions

static Hub &instance()#

Private Types

using StreamKey = std::pair<StreamKind, std::string>#

Private Functions

StreamLiveness liveness(StreamKind kind, const std::string &robot_model, double rate)#
bool resubscribe(StreamKind kind, const std::string &model, const void *slot_id)#
void start_stream(StreamKind kind, const std::string &robot_model, std::shared_ptr<StreamThread> worker, std::function<void(const RobotPtr&)> begin)#
std::shared_ptr<StreamThread> stop_locked(StreamKind kind, Stream &s)#
std::vector<std::shared_ptr<StreamThread>> close_all_streams()#
std::vector<std::shared_ptr<StreamThread>> disconnect_locked(bool &had)#

Private Members

std::mutex connect_mu_#
mutable std::mutex stream_mu_#
std::map<StreamKey, Stream> streams_#
mutable std::mutex mu_#
std::string endpoint_ = "127.0.0.1:50051"#
std::optional<std::string> model_#
std::optional<RobotPtr> robot_#
std::map<const void*, std::function<void()>> handles_#

Friends

friend struct ForkHandlers
friend class HandleSlot
struct Stream#

Public Members

std::optional<RobotPtr> robot#
std::shared_ptr<StreamThread> worker#
std::function<void(const RobotPtr&)> begin#
struct Rby1ConnectionError : public rby1_rt::Rby1Error#
struct Rby1Error : public std::runtime_error#

Subclassed by rby1_rt::Rby1ConnectionError

struct SerialHandle#

Public Members

std::shared_ptr<SerialReader> reader#
std::shared_ptr<rb::SerialStream> stream#
struct StateSample#

Public Members

RobotStateVar state#
rb::ControlManagerState control_manager_state#
struct StreamLiveness#

Public Members

std::string name#
std::chrono::milliseconds stale#
std::function<bool(const void *slot_id)> resubscribe#
struct StreamStats#

Public Members

uint64_t received = 0#
uint64_t delivered = 0#
uint64_t dropped = 0#
uint64_t resubscribes = 0#
class StreamThread#

Subclassed by rby1_rt::StreamWorker< T >

Public Functions

virtual ~StreamThread() = default#
virtual void close() = 0#
virtual void join() = 0#
virtual StreamStats stats() const = 0#
virtual const void *slot_id() const = 0#
struct StreamThreadHooks#

Public Static Functions

static void set(std::function<void()> on_start, std::function<void()> on_exit)#
static void on_start()#
static void on_exit()#
template<typename T>
class StreamWorker : public rby1_rt::StreamThread#

Public Types

using Slot = BoundedSlot<T>#
using Sink = std::function<void(const T&, const std::shared_ptr<Slot>&)>#

Public Functions

inline explicit StreamWorker(Sink sink, size_t capacity = 1, std::optional<StreamLiveness> live = std::nullopt)#
StreamWorker(const StreamWorker&) = delete#
StreamWorker &operator=(const StreamWorker&) = delete#
inline ~StreamWorker() override#
inline std::shared_ptr<Slot> slot() const#
inline virtual void close() override#
inline virtual void join() override#
inline virtual StreamStats stats() const override#
inline virtual const void *slot_id() const override#

Private Members

std::shared_ptr<Slot> slot_#
std::shared_ptr<std::atomic<uint64_t>> delivered_ = std::make_shared<std::atomic<uint64_t>>(0)#
std::shared_ptr<std::atomic<uint64_t>> resubscribes_ = std::make_shared<std::atomic<uint64_t>>(0)#
std::thread th_#
class WorkerPool#

Public Functions

void set_on_thread_start(std::function<void()> fn)#
void submit(std::function<void()> job)#
std::deque<std::function<void()>> shutdown()#

Public Static Functions

static WorkerPool &instance()#

Public Static Attributes

static constexpr int kWorkers = 4#

Private Functions

void ensure_started_locked()#

Private Members

std::mutex mu_#
std::condition_variable cv_#
std::deque<std::function<void()>> q_#
std::vector<std::thread> threads_#
std::function<void()> on_thread_start_#
bool stopping_ = false#

Friends

friend struct ForkHandlers

schema/interface_payload_types.hpp#

namespace rb_payload#
struct TrajectoryNameInput#

Public Members

std::optional<std::string> variable_name#
std::vector<std::vector<double>> waypoints#
struct WriteRegisterValues#

Public Members

std::vector<std::int64_t> values#

schema/move_speed_args.hpp#

struct MoveSpeedArg#

Public Members

std::optional<int32_t> spd_mode#
std::optional<float> spd_vel_para#
std::optional<float> spd_acc_para#

schema/move_target_values_arg.hpp#

struct MoveTargetValuesArg#

Public Members

std::vector<float> tar_values#
struct SafeMoveTargetArg#

Public Members

std::vector<float> tar_values#
int32_t tar_frame = 0#
int32_t tar_unit = 0#

schema/program_setting_args.hpp#

struct UserFrameSelectionArg#

Public Members

int user_frame_num = 0#
struct ShiftLandMarkArg#

Public Members

int shift_mode = 0#
float tolerance = 0.0f#
std::array<IPC::MoveInput_TargetT, 6> points = {}#
struct JointOriginCalibArg#

Public Members

int table_option = 0#
std::vector<float> joints#
float target_x = 0.0f#
float target_y = 0.0f#
float target_z = 0.0f#
float target_rx = 0.0f#
float target_ry = 0.0f#
float target_rz = 0.0f#
int option = 0#
int password = 0#
struct SaveDataLogArg#

Public Members

int mode = 0#
std::vector<std::string> names#

schema/vibration_motion_arg.hpp#

struct VibrationMotionBasedArg#

Public Members

bool motion_on = false#
IPC::Request_Wrapper_VibrationMotion_OnT on = {}#

utils/manipulate.hpp#

namespace rb_manipulate_detail#

Functions

IPC::Response_FunctionsT apply_time_checking(RBManipulateMoveSDK &sdk, IPC::Response_FunctionsT payload, const std::string &call_function, const std::string &robot_model, FlowManagerArgsPtr flow_manager_args, std::vector<MoveFlowManagerBlendParam> *blended_add_list = nullptr, bool unsubscribe = false)#
inline std::vector<float> pad_to_7(std::vector<float> values)#
struct MoveFlowManagerBlendParam#

Public Members

std::string step_id#
FlowValuePtr action_script#
FlowValuePtr finish_at#
FlowValuePtr stop_time#