MasterArm

rb::upc::MasterArm is the SDK-side helper for the RB-Y1 master-arm device. It wraps device initialization, torque management, and a local control loop around the master-arm hardware.

Header

Header

#include <rby1-sdk/upc/master_arm.h>

Declaration

Namespace

rb::upc

Kind

class

Primary role

Manage master-arm initialization, torque, and callback-driven control.

Public Member Functions

Method group

Purpose

Notes

MasterArm(...) and Initialize(...)

Construct and initialize the device.

Initialization is the required bring-up step.

EnableTorque() and DisableTorque()

Turn master-arm torque on or off.

Common in startup and shutdown flow.

SetControlPeriod(...), SetModelPath(...), SetTorqueConstant(...)

Configure control timing and model constants.

Use before entering control.

StartControl(...) and StopControl(...)

Run or stop the master-arm control callback.

StopControl(...) can optionally disable torque.

Detailed Reference

class MasterArm

Public Functions

explicit MasterArm(const std::string &dev_name = kMasterArmDeviceName)
~MasterArm()
bool DisableTorque()
bool EnableTorque()
std::vector<int> Initialize(bool verbose = false)
void SetControlPeriod(double control_period)
void SetModelPath(const std::string &model_path)
void SetTorqueConstant(const std::array<double, kDOF> &torque_constant)
bool StartControl(const std::function<ControlInput(const State &state)> &control = nullptr)
bool StopControl(bool torque_disable = false)

Public Static Attributes

static int kDeivceCount = kDOF + 2
static int kDOF = 14
static int kLeftToolId = 0x81
static double kMaximumTorque = 4.
static int kRightToolId = 0x80
static double kTorqueScaling = 0.5
struct ControlInput

Public Members

Eigen::Vector<int, kDOF> target_operating_mode
Eigen::Vector<double, kDOF> target_position
Eigen::Vector<double, kDOF> target_torque
struct State

Public Members

DynamixelBus::ButtonState button_left
DynamixelBus::ButtonState button_right
Eigen::Vector<double, kDOF> gravity_term
Eigen::Vector<int, kDOF> operating_mode
Eigen::Vector<double, kDOF> q_joint
Eigen::Vector<double, kDOF> qvel_joint
math::SE3::MatrixType T_left
math::SE3::MatrixType T_right
Eigen::Vector<double, kDOF> target_position
Eigen::Vector<double, kDOF> torque_joint

Related Types

Examples

  • demo_motion_with_master_arm.cpp

  • module_test/master_arm.cpp

  • teleoperation_with_joint_mapping.cpp