Flexiv TDK APIs 1.7
Loading...
Searching...
No Matches
device_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 DeviceTeleopLan(const std::vector<std::string>& robot_sn_vec,
44 const std::vector<std::string>& network_interface_whitelist = {});
45 virtual ~DeviceTeleopLan();
46
56 void Init(ZeroFTSensor zero_ft_sensor = ZeroFTSensor::Enable);
57
68 void Start(const std::vector<std::shared_ptr<MotionControlCmds>>& cmds);
69
75 void Stop();
76
90 void SetRobotMaxContactWrench(unsigned int idx, const std::array<double, kCartDoF>& max_wrench);
91
113 void SetNullSpacePostures(unsigned int idx, const std::vector<double>& ref_positions);
114
123 bool fault(unsigned int idx) const;
124
129 bool any_fault(void) const;
130
146 std::vector<bool> ClearFault(unsigned int timeout_sec = 30);
147
157 const std::array<bool, kIOPorts> digital_inputs(unsigned int idx) const;
158
165 std::shared_ptr<Robot> instance(unsigned int idx) const;
166
167private:
168 class Impl;
169 std::unique_ptr<Impl> pimpl_;
170};
171
172} // namespace tdk
173} // namespace flexiv
Teleoperation control interface to use device to teleop one or more robots connected to the same LAN.
void Start(const std::vector< std::shared_ptr< MotionControlCmds > > &cmds)
[Blocking] Start the teleoperation control loop.
std::vector< bool > ClearFault(unsigned int timeout_sec=30)
[Blocking] Try to clear minor or critical fault of the robot without a power cycle.
const 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 Stop()
[Blocking] Stop the teleoperation control loop and make all robots hold their pose.
void Init(ZeroFTSensor zero_ft_sensor=ZeroFTSensor::Enable)
[Blocking] Get all robots ready for teleoperation. The following actions will happen in sequence: a) ...
std::shared_ptr< Robot > instance(unsigned int idx) const
[Non-blocking] Pointer to the underlying rdk::Robot instances of the robot.
bool fault(unsigned int idx) const
[Non-blocking] Fault state of the specified robot.
bool any_fault(void) const
[Non-blocking] Whether any of the connected robots is in fault state.
DeviceTeleopLan(const std::vector< std::string > &robot_sn_vec, const std::vector< std::string > &network_interface_whitelist={})
[Blocking] Create an instance of the control interface. More than one pair of [device-robot] can be c...
void SetNullSpacePostures(unsigned int idx, const std::vector< double > &ref_positions)
[Blocking] Set reference joint positions used in the robot's null-space posture control module for th...
void SetRobotMaxContactWrench(unsigned int idx, const std::array< double, kCartDoF > &max_wrench)
[Non-blocking] Set maximum contact wrench for the specified robot. The controller will regulate its o...
Header file containing various constant expressions, data structs, and enums.
ZeroFTSensor
Sensor calibration options.
Definition data.hpp:274