Flexiv TDK APIs 1.7
Loading...
Searching...
No Matches
joint_teleop_lan.hpp
Go to the documentation of this file.
1
5#pragma once
6
7#include "data.hpp"
8#include <string>
9#include <memory>
10
11#include <flexiv/rdk/robot.hpp>
12namespace flexiv {
13namespace tdk {
14
15using namespace rdk;
16
22{
23public:
43 JointTeleopLAN(const std::vector<std::pair<std::string, std::string>>& robot_pairs_sn,
44 const std::vector<std::string>& network_interface_whitelist = {});
45 virtual ~JointTeleopLAN();
46
55 void Init();
56
70 void SyncPose(unsigned int idx, const std::vector<double>& sync_positions = {});
71
81 void Start();
82
88 void Stop();
89
98 void HomeAll();
99
108 void Activate(unsigned int idx, bool activated);
109
120 void SetSoftLimit(unsigned int idx, double zone_degrees);
121
140 void SetJointImpedance(unsigned int idx, const std::vector<double>& K_q_ratio,
141 const std::vector<double>& Z_q = {0.7, 0.7, 0.7, 0.7, 0.7, 0.7, 0.7});
142
162 unsigned int idx, const std::vector<std::pair<bool, double>>& shaped_joint_inertia);
163
170 size_t DoF(unsigned int idx) const;
171
180 const std::pair<bool, bool> fault(unsigned int idx) const;
181
186 bool any_fault(void) const;
187
203 std::vector<std::pair<bool, bool>> ClearFault(unsigned int timeout_sec = 30);
204
214 const std::pair<std::array<bool, kIOPorts>, std::array<bool, kIOPorts>> digital_inputs(
215 unsigned int idx) const;
216
223 std::pair<std::shared_ptr<Robot>, std::shared_ptr<Robot>> instances(unsigned int idx) const;
224
225private:
226 class Impl;
227 std::unique_ptr<Impl> pimpl_;
228};
229
230} // namespace tdk
231} // namespace flexiv
Teleoperation control interface to run joint-space robot-robot teleoperation for one or more pairs of...
void SyncPose(unsigned int idx, const std::vector< double > &sync_positions={})
[Blocking] Sync pose of the specified robot pair.
bool any_fault(void) const
[Non-blocking] Whether any of the connected robots is in fault state.
void SetInertiaShaping(unsigned int idx, const std::vector< std::pair< bool, double > > &shaped_joint_inertia)
[Non-blocking] Set joint inertia shaping for the specified robot pair.
void SetJointImpedance(unsigned int idx, const std::vector< double > &K_q_ratio, const std::vector< double > &Z_q={0.7, 0.7, 0.7, 0.7, 0.7, 0.7, 0.7})
[Blocking] Set joint impedance properties for the specified robot pair.
JointTeleopLAN(const std::vector< std::pair< std::string, std::string > > &robot_pairs_sn, const std::vector< std::string > &network_interface_whitelist={})
[Blocking] Create an instance of the control interface. More than one pair of teleoperated robots can...
void SetSoftLimit(unsigned int idx, double zone_degrees)
[Non-blocking] Set the size of soft limit zone on both sides of all joints for the specified robot pa...
void Activate(unsigned int idx, bool activated)
[Non-blocking] Activate/deactivate teleoperation for the specified robot pair.
void Init()
[Blocking] Get all robots ready for teleoperation. The following actions will happen in sequence: a) ...
size_t DoF(unsigned int idx) const
Joint-space degrees of freedom of both robots in the specified robot pair.
void Start()
[Blocking] Start the teleoperation control loop.
std::vector< std::pair< bool, bool > > ClearFault(unsigned int timeout_sec=30)
[Blocking] Try to clear minor or critical fault of the robot without a power cycle.
void Stop()
[Blocking] Stop the teleoperation control loop and make all robots hold their pose.
const std::pair< bool, bool > fault(unsigned int idx) const
[Non-blocking] Fault state of the specified robot pair.
const std::pair< std::array< bool, kIOPorts >, std::array< bool, kIOPorts > > digital_inputs(unsigned int idx) const
[Non-blocking] Current reading from all digital input ports (16 on the control box + 2 inside the wri...
void HomeAll()
[Blocking] Move all connected robots to their home posture simultaneously.
std::pair< std::shared_ptr< Robot >, std::shared_ptr< Robot > > instances(unsigned int idx) const
[Non-blocking] Pointers to the underlying rdk::Robot instances of the robot pair.
Header file containing various constant expressions, data structs, and enums.