Robotics Library  0.7.0
UniversalRobotsRtde.h
Go to the documentation of this file.
1 //
2 // Copyright (c) 2009, Markus Rickert
3 // All rights reserved.
4 //
5 // Redistribution and use in source and binary forms, with or without
6 // modification, are permitted provided that the following conditions are met:
7 //
8 // * Redistributions of source code must retain the above copyright notice,
9 // this list of conditions and the following disclaimer.
10 // * Redistributions in binary form must reproduce the above copyright notice,
11 // this list of conditions and the following disclaimer in the documentation
12 // and/or other materials provided with the distribution.
13 //
14 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
15 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
18 // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
19 // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
20 // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
21 // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
22 // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
23 // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
24 // POSSIBILITY OF SUCH DAMAGE.
25 //
26 
27 #ifndef RL_HAL_UNIVERSALROBOTSRTDE_H
28 #define RL_HAL_UNIVERSALROBOTSRTDE_H
29 
30 #include <cstdint>
31 #include <boost/optional.hpp>
32 
33 #include "AnalogInputReader.h"
34 #include "AnalogOutputReader.h"
35 #include "AnalogOutputWriter.h"
36 #include "CartesianForceSensor.h"
39 #include "CyclicDevice.h"
40 #include "DigitalInputReader.h"
41 #include "DigitalOutputReader.h"
42 #include "DigitalOutputWriter.h"
43 #include "Endian.h"
45 #include "JointCurrentSensor.h"
46 #include "JointPositionActuator.h"
47 #include "JointPositionSensor.h"
48 #include "JointVelocityActuator.h"
49 #include "JointVelocitySensor.h"
50 #include "Socket.h"
51 
52 namespace rl
53 {
54  namespace hal
55  {
60  public CyclicDevice,
61  public AnalogInputReader,
62  public AnalogOutputReader,
63  public AnalogOutputWriter,
64  public CartesianForceSensor,
67  public DigitalInputReader,
68  public DigitalOutputReader,
69  public DigitalOutputWriter,
71  public JointCurrentSensor,
72  public JointPositionActuator,
73  public JointPositionSensor,
74  public JointVelocityActuator,
75  public JointVelocitySensor
76  {
77  public:
78  enum JointMode
79  {
93  };
94 
95  enum RobotMode
96  {
106  };
107 
109  {
114  };
115 
117  {
124  };
125 
127  {
137  };
138 
140  {
152  };
153 
154  UniversalRobotsRtde(const ::std::string& address);
155 
156  virtual ~UniversalRobotsRtde();
157 
158  void close();
159 
160  void doScript(const ::std::string& script);
161 
163 
164  ::rl::math::Real getAnalogInput(const ::std::size_t& i) const;
165 
166  ::std::size_t getAnalogInputCount() const;
167 
168  ::rl::math::Real getAnalogInputMaximum(const ::std::size_t& i) const;
169 
170  ::rl::math::Real getAnalogInputMinimum(const ::std::size_t& i) const;
171 
172  ::std::vector< ::rl::math::Unit> getAnalogInputUnit() const;
173 
174  ::rl::math::Unit getAnalogInputUnit(const ::std::size_t& i) const;
175 
177 
178  ::rl::math::Real getAnalogOutput(const ::std::size_t& i) const;
179 
180  ::std::size_t getAnalogOutputCount() const;
181 
182  ::rl::math::Real getAnalogOutputMaximum(const ::std::size_t& i) const;
183 
184  ::rl::math::Real getAnalogOutputMinimum(const ::std::size_t& i) const;
185 
186  ::std::vector< ::rl::math::Unit> getAnalogOutputUnit() const;
187 
188  ::rl::math::Unit getAnalogOutputUnit(const ::std::size_t& i) const;
189 
191 
193 
195 
197 
199 
200  ::boost::dynamic_bitset<> getDigitalInput() const;
201 
202  bool getDigitalInput(const ::std::size_t& i) const;
203 
204  ::std::size_t getDigitalInputCount() const;
205 
206  ::boost::dynamic_bitset<> getDigitalOutput() const;
207 
208  bool getDigitalOutput(const ::std::size_t& i) const;
209 
210  ::std::size_t getDigitalOutputCount() const;
211 
213 
214  ::std::int32_t getJointMode(const ::std::size_t& i) const;
215 
217 
219 
221 
222  RobotMode getRobotMode() const;
223 
224  ::std::uint32_t getRobotStatusBits() const;
225 
227 
228  SafetyMode getSafetyMode() const;
229 
230  ::std::uint32_t getSafetyStatusBits() const;
231 
232  void open();
233 
235 
236  void setAnalogOutput(const ::std::size_t& i, const ::rl::math::Real& value);
237 
238  void setAnalogOutputUnit(const ::std::vector< ::rl::math::Unit>& values);
239 
240  void setAnalogOutputUnit(const ::std::size_t& i, const ::rl::math::Unit& value);
241 
243 
244  void setDigitalOutput(const ::std::size_t& i, const bool& value);
245 
247 
249 
251 
252  void start();
253 
254  void step();
255 
256  void stop();
257 
258  protected:
259 
260  private:
261  enum Command
262  {
271  };
272 
273  struct Input
274  {
275  ::boost::optional< ::std::uint8_t> configurableDigitalOutput;
276 
277  ::boost::optional< ::std::uint8_t> configurableDigitalOutputMask;
278 
279  ::boost::optional< ::std::uint32_t> inputBitRegisters0;
280 
281  ::boost::optional< ::std::uint32_t> inputBitRegisters1;
282 
283  ::std::vector<double> inputDoubleRegister;
284 
285  ::std::vector< ::std::int32_t> inputIntRegister;
286 
287  ::boost::optional<double> standardAnalogOutput0;
288 
289  ::boost::optional<double> standardAnalogOutput1;
290 
291  ::boost::optional< ::std::uint8_t> standardAnalogOutputMask;
292 
293  ::std::uint8_t standardAnalogOutputType;
294 
295  ::boost::optional< ::std::uint8_t> standardDigitalOutput;
296 
297  ::boost::optional< ::std::uint8_t> standardDigitalOutputMask;
298  };
299 
300  struct Output
301  {
302  double actualCurrent[6];
303 
304  ::std::uint64_t actualDigitalInputBits;
305 
306  ::std::uint64_t actualDigitalOutputBits;
307 
308  double actualQ[6];
309 
310  double actualQd[6];
311 
312  double actualTcpForce[6];
313 
314  double actualTcpPose[6];
315 
316  double actualTcpSpeed[6];
317 
318  ::std::uint32_t analogIoTypes;
319 
320  ::std::int32_t jointMode[6];
321 
322  double jointTemperatures[6];
323 
324  ::std::uint32_t outputBitRegisters0;
325 
326  ::std::uint32_t outputBitRegisters1;
327 
329 
330  ::std::int32_t outputIntRegister[24];
331 
332  ::std::int32_t robotMode;
333 
334  ::std::uint32_t robotStatusBits;
335 
336  ::std::uint32_t runtimeState;
337 
338  ::std::int32_t safetyMode;
339 
340  ::std::uint32_t safetyStatusBits;
341 
343 
345 
347 
349 
350  double targetTcpPose[6];
351 
352  double targetTcpSpeed[6];
353 
355 
357 
358  ::std::uint32_t toolAnalogInputTypes;
359 
360  double toolOutputCurrent;
361 
362  ::std::int32_t toolOutputVoltage;
363  };
364 
365  struct Version
366  {
367  ::std::uint32_t bugfix;
368 
369  ::std::uint32_t build;
370 
371  ::std::uint32_t major;
372 
373  ::std::uint32_t minor;
374  };
375 
376  void recv();
377 
378  void send(::std::uint8_t* buffer, const ::std::size_t& size);
379 
380  void send(const ::std::uint8_t& command);
381 
382  void send(const ::std::uint8_t& command, const ::std::vector< ::std::string>& strings);
383 
384  void send(const ::std::uint8_t& command, const ::std::uint16_t& word);
385 
386  void sendAnalogOutputs();
387 
388  void sendBitRegisters();
389 
390  void sendDigitalOutputs();
391 
392  void sendDoubleRegister();
393 
394  void sendIntegerRegister();
395 
396  template<typename T>
397  void serialize(T& t, ::std::uint8_t*& ptr)
398  {
400  ::std::memcpy(ptr, &t, sizeof(t));
401  ptr += sizeof(t);
402  }
403 
404  template<typename T, ::std::size_t N>
405  void serialize(T (&t)[N], ::std::uint8_t*& ptr)
406  {
407  for (::std::size_t i = 0; i < N; ++i)
408  {
409  this->serialize(t[i], ptr);
410  }
411  }
412 
413  template<typename T>
414  void unserialize(::std::uint8_t*& ptr, T& t)
415  {
416  ::std::memcpy(&t, ptr, sizeof(t));
418  ptr += sizeof(t);
419  }
420 
421  template<typename T, ::std::size_t N>
422  void unserialize(::std::uint8_t*& ptr, T (&t)[N])
423  {
424  for (::std::size_t i = 0; i < N; ++i)
425  {
426  this->unserialize(ptr, t[i]);
427  }
428  }
429 
431 
433 
435 
436  Socket socket4;
437 
439  };
440  }
441 }
442 
443 #endif // RL_HAL_UNIVERSALROBOTSRTDE_H
rl::hal::UniversalRobotsRtde::Output::robotStatusBits
::std::uint32_t robotStatusBits
Definition: UniversalRobotsRtde.h:330
rl::hal::UniversalRobotsRtde::~UniversalRobotsRtde
virtual ~UniversalRobotsRtde()
Definition: UniversalRobotsRtde.cpp:64
rl::hal::UniversalRobotsRtde::Output::actualQ
double actualQ[6]
Definition: UniversalRobotsRtde.h:304
rl::hal::UniversalRobotsRtde::JOINT_MODE_PART_D_CALIBRATION_ERROR
@ JOINT_MODE_PART_D_CALIBRATION_ERROR
Definition: UniversalRobotsRtde.h:87
rl::hal::UniversalRobotsRtde::JOINT_MODE_POWER_OFF
@ JOINT_MODE_POWER_OFF
Definition: UniversalRobotsRtde.h:83
rl::hal::UniversalRobotsRtde::COMMAND_CONTROL_PACKAGE_SETUP_INPUTS
@ COMMAND_CONTROL_PACKAGE_SETUP_INPUTS
Definition: UniversalRobotsRtde.h:260
rl::hal::UniversalRobotsRtde::getAnalogOutputUnit
::std::vector< ::rl::math::Unit > getAnalogOutputUnit() const
Definition: UniversalRobotsRtde.cpp:236
rl::hal::UniversalRobotsRtde::ROBOT_MODE_CONFIRM_SAFETY
@ ROBOT_MODE_CONFIRM_SAFETY
Definition: UniversalRobotsRtde.h:98
rl::hal::UniversalRobotsRtde::getJointVelocity
::rl::math::Vector getJointVelocity() const
Definition: UniversalRobotsRtde.cpp:437
rl::hal::UniversalRobotsRtde::COMMAND_TEXT_MESSAGE
@ COMMAND_TEXT_MESSAGE
Definition: UniversalRobotsRtde.h:266
rl::hal::UniversalRobotsRtde::step
void step()
Definition: UniversalRobotsRtde.cpp:1193
rl::hal::UniversalRobotsRtde::COMMAND_DATA_PACKAGE
@ COMMAND_DATA_PACKAGE
Definition: UniversalRobotsRtde.h:263
rl::hal::UniversalRobotsRtde::Version
Definition: UniversalRobotsRtde.h:362
rl::hal::DigitalOutputWriter::setDigitalOutput
virtual void setDigitalOutput(const ::boost::dynamic_bitset<> &bitset)
Definition: DigitalOutputWriter.cpp:43
rl::hal::JointPositionSensor
Definition: JointPositionSensor.h:39
rl::hal::UniversalRobotsRtde::SAFETY_MODE_REDUCED
@ SAFETY_MODE_REDUCED
Definition: UniversalRobotsRtde.h:129
rl::hal::Socket
Definition: Socket.h:48
rl::hal::AnalogOutputWriter
Definition: AnalogOutputWriter.h:40
rl::hal::JointVelocitySensor
Definition: JointVelocitySensor.h:39
rl::hal::UniversalRobotsRtde::getAnalogOutput
virtual ::std::vector< ::rl::math::Real > getAnalogOutput() const
Definition: AnalogOutputReader.cpp:43
rl::hal::UniversalRobotsRtde::RobotMode
RobotMode
Definition: UniversalRobotsRtde.h:96
AnalogInputReader.h
rl::hal::AnalogOutputReader
Definition: AnalogOutputReader.h:40
rl::hal::UniversalRobotsRtde::JOINT_MODE_MOTOR_INITIALISATION
@ JOINT_MODE_MOTOR_INITIALISATION
Definition: UniversalRobotsRtde.h:85
rl::hal::UniversalRobotsRtde::SAFETY_STATUS_STOPPED_DUE_TO_SAFETY
@ SAFETY_STATUS_STOPPED_DUE_TO_SAFETY
Definition: UniversalRobotsRtde.h:151
rl::math::Transform
::Eigen::Transform< Real, 3, ::Eigen::Affine > Transform
Rigid transformation in 3D.
Definition: Transform.h:46
rl::hal::UniversalRobotsRtde::RUNTIME_STATE_RESUMING
@ RUNTIME_STATE_RESUMING
Definition: UniversalRobotsRtde.h:123
rl::hal::UniversalRobotsRtde::getDigitalInput
::boost::dynamic_bitset getDigitalInput() const
Definition: UniversalRobotsRtde.cpp:357
rl::hal::UniversalRobotsRtde::Output::runtimeState
::std::uint32_t runtimeState
Definition: UniversalRobotsRtde.h:332
rl::hal::UniversalRobotsRtde::SAFETY_STATUS_RECOVERY_MODE
@ SAFETY_STATUS_RECOVERY_MODE
Definition: UniversalRobotsRtde.h:144
rl::hal::JointAccelerationActuator
Definition: JointAccelerationActuator.h:39
rl::hal::UniversalRobotsRtde::RUNTIME_STATE_PLAYING
@ RUNTIME_STATE_PLAYING
Definition: UniversalRobotsRtde.h:120
rl::hal::UniversalRobotsRtde::JointMode
JointMode
Definition: UniversalRobotsRtde.h:79
rl::hal::UniversalRobotsRtde::getSafetyMode
SafetyMode getSafetyMode() const
Definition: UniversalRobotsRtde.cpp:468
rl::hal::UniversalRobotsRtde::stop
void stop()
Definition: UniversalRobotsRtde.cpp:1231
rl::hal::UniversalRobotsRtde::Output::actualDigitalInputBits
::std::uint64_t actualDigitalInputBits
Definition: UniversalRobotsRtde.h:300
rl::hal::UniversalRobotsRtde::setJointVelocity
void setJointVelocity(const ::rl::math::Vector &qd)
Definition: UniversalRobotsRtde.cpp:1141
rl::hal::UniversalRobotsRtde::getDigitalInputCount
::std::size_t getDigitalInputCount() const
Definition: UniversalRobotsRtde.cpp:369
rl::hal::UniversalRobotsRtde::start
void start()
Definition: UniversalRobotsRtde.cpp:1152
rl::hal::UniversalRobotsRtde::Input::standardDigitalOutput
::boost::optional< ::std::uint8_t > standardDigitalOutput
Definition: UniversalRobotsRtde.h:291
rl::hal::UniversalRobotsRtde::SAFETY_STATUS_EMERGENCY_STOPPED
@ SAFETY_STATUS_EMERGENCY_STOPPED
Definition: UniversalRobotsRtde.h:148
rl::hal::UniversalRobotsRtde::JOINT_MODE_IDLE_MODE
@ JOINT_MODE_IDLE_MODE
Definition: UniversalRobotsRtde.h:92
rl::hal::UniversalRobotsRtde::Output::toolAnalogInputTypes
::std::uint32_t toolAnalogInputTypes
Definition: UniversalRobotsRtde.h:354
rl::hal::UniversalRobotsRtde::Output::analogIoTypes
::std::uint32_t analogIoTypes
Definition: UniversalRobotsRtde.h:314
rl::hal::UniversalRobotsRtde::getCartesianVelocity
::rl::math::MotionVector getCartesianVelocity() const
Definition: UniversalRobotsRtde.cpp:333
rl::hal::UniversalRobotsRtde::SAFETY_STATUS_NORMAL_MODE
@ SAFETY_STATUS_NORMAL_MODE
Definition: UniversalRobotsRtde.h:141
rl::hal::UniversalRobotsRtde::SAFETY_MODE_SAFEGUARD_STOP
@ SAFETY_MODE_SAFEGUARD_STOP
Definition: UniversalRobotsRtde.h:132
rl::hal::UniversalRobotsRtde::SAFETY_MODE_ROBOT_EMERGENCY_STOP
@ SAFETY_MODE_ROBOT_EMERGENCY_STOP
Definition: UniversalRobotsRtde.h:134
rl::hal::UniversalRobotsRtde::unserialize
void unserialize(::std::uint8_t *&ptr, T &t)
Definition: UniversalRobotsRtde.h:410
rl::hal::UniversalRobotsRtde::getAnalogInputMaximum
::rl::math::Real getAnalogInputMaximum(const ::std::size_t &i) const
Definition: UniversalRobotsRtde.cpp:114
rl::hal::UniversalRobotsRtde::Output::standardAnalogInput0
double standardAnalogInput0
Definition: UniversalRobotsRtde.h:338
rl::hal::UniversalRobotsRtde::COMMAND_CONTROL_PACKAGE_START
@ COMMAND_CONTROL_PACKAGE_START
Definition: UniversalRobotsRtde.h:262
rl::hal::JointVelocityActuator
Definition: JointVelocityActuator.h:39
rl::hal::UniversalRobotsRtde::JOINT_MODE_BOOTLOADER
@ JOINT_MODE_BOOTLOADER
Definition: UniversalRobotsRtde.h:88
rl::hal::UniversalRobotsRtde::Output::actualTcpSpeed
double actualTcpSpeed[6]
Definition: UniversalRobotsRtde.h:312
rl::hal::UniversalRobotsRtde::RobotStatus
RobotStatus
Definition: UniversalRobotsRtde.h:109
rl::hal::UniversalRobotsRtde::Output::actualQd
double actualQd[6]
Definition: UniversalRobotsRtde.h:306
rl::hal::UniversalRobotsRtde::sendDigitalOutputs
void sendDigitalOutputs()
Definition: UniversalRobotsRtde.cpp:918
rl::hal::UniversalRobotsRtde::ROBOT_STATUS_TEACH_BUTTON_PRESSED
@ ROBOT_STATUS_TEACH_BUTTON_PRESSED
Definition: UniversalRobotsRtde.h:112
rl::hal::UniversalRobotsRtde::SAFETY_STATUS_REDUCED_MODE
@ SAFETY_STATUS_REDUCED_MODE
Definition: UniversalRobotsRtde.h:142
rl::hal::UniversalRobotsRtde::JOINT_MODE_PART_D_CALIBRATION
@ JOINT_MODE_PART_D_CALIBRATION
Definition: UniversalRobotsRtde.h:81
rl::hal::UniversalRobotsRtde::Version::build
::std::uint32_t build
Definition: UniversalRobotsRtde.h:365
rl::hal::UniversalRobotsRtde::getJointMode
::std::int32_t getJointMode(const ::std::size_t &i) const
Definition: UniversalRobotsRtde.cpp:404
rl::hal::UniversalRobotsRtde::getJointCurrent
::rl::math::Vector getJointCurrent() const
Definition: UniversalRobotsRtde.cpp:391
rl::hal::UniversalRobotsRtde::COMMAND_GET_URCONTROL_VERSION
@ COMMAND_GET_URCONTROL_VERSION
Definition: UniversalRobotsRtde.h:264
rl::hal::UniversalRobotsRtde::Output::toolOutputCurrent
double toolOutputCurrent
Definition: UniversalRobotsRtde.h:356
rl::hal::UniversalRobotsRtde::Input::inputDoubleRegister
::std::vector< double > inputDoubleRegister
Definition: UniversalRobotsRtde.h:279
rl::hal::UniversalRobotsRtde::Input::configurableDigitalOutput
::boost::optional< ::std::uint8_t > configurableDigitalOutput
Definition: UniversalRobotsRtde.h:271
rl::hal::UniversalRobotsRtde::Input::inputBitRegisters0
::boost::optional< ::std::uint32_t > inputBitRegisters0
Definition: UniversalRobotsRtde.h:275
JointVelocityActuator.h
rl::hal::UniversalRobotsRtde::Version::minor
::std::uint32_t minor
Definition: UniversalRobotsRtde.h:369
rl::hal::UniversalRobotsRtde::getJointPosition
::rl::math::Vector getJointPosition() const
Definition: UniversalRobotsRtde.cpp:411
rl::hal::UniversalRobotsRtde::Output
Definition: UniversalRobotsRtde.h:297
DigitalInputReader.h
rl::hal::UniversalRobotsRtde::ROBOT_MODE_UPDATING_FIRMWARE
@ ROBOT_MODE_UPDATING_FIRMWARE
Definition: UniversalRobotsRtde.h:105
rl::math::Vector
::Eigen::Matrix< Real, ::Eigen::Dynamic, 1 > Vector
Definition: Vector.h:42
rl::hal::UniversalRobotsRtde::getDigitalOutput
::boost::dynamic_bitset getDigitalOutput() const
Definition: UniversalRobotsRtde.cpp:373
rl::hal::CartesianForceSensor
Definition: CartesianForceSensor.h:39
JointAccelerationActuator.h
rl::hal::UniversalRobotsRtde::getCartesianPosition
::rl::math::Transform getCartesianPosition() const
Definition: UniversalRobotsRtde.cpp:285
rl::hal::UniversalRobotsRtde::Output::targetTcpSpeed
double targetTcpSpeed[6]
Definition: UniversalRobotsRtde.h:348
rl::hal::UniversalRobotsRtde::JOINT_MODE_BOOTING
@ JOINT_MODE_BOOTING
Definition: UniversalRobotsRtde.h:86
rl::hal::UniversalRobotsRtde::Output::outputDoubleRegister
double outputDoubleRegister[24]
Definition: UniversalRobotsRtde.h:324
rl::hal::UniversalRobotsRtde::RuntimeState
RuntimeState
Definition: UniversalRobotsRtde.h:117
JointVelocitySensor.h
rl::hal::UniversalRobotsRtde::sendIntegerRegister
void sendIntegerRegister()
Definition: UniversalRobotsRtde.cpp:966
rl::hal::UniversalRobotsRtde::Input::inputIntRegister
::std::vector< ::std::int32_t > inputIntRegister
Definition: UniversalRobotsRtde.h:281
rl::hal::UniversalRobotsRtde::Output::safetyStatusBits
::std::uint32_t safetyStatusBits
Definition: UniversalRobotsRtde.h:336
rl::hal::UniversalRobotsRtde::getAnalogInputUnit
::std::vector< ::rl::math::Unit > getAnalogInputUnit() const
Definition: UniversalRobotsRtde.cpp:143
rl::hal::UniversalRobotsRtde::Output::actualDigitalOutputBits
::std::uint64_t actualDigitalOutputBits
Definition: UniversalRobotsRtde.h:302
rl::hal::UniversalRobotsRtde::COMMAND_CONTROL_PACKAGE_PAUSE
@ COMMAND_CONTROL_PACKAGE_PAUSE
Definition: UniversalRobotsRtde.h:259
rl::hal::UniversalRobotsRtde::SAFETY_MODE_FAULT
@ SAFETY_MODE_FAULT
Definition: UniversalRobotsRtde.h:136
rl::hal::UniversalRobotsRtde::Output::outputBitRegisters1
::std::uint32_t outputBitRegisters1
Definition: UniversalRobotsRtde.h:322
rl::hal::UniversalRobotsRtde::Command
Command
Definition: UniversalRobotsRtde.h:258
rl::hal::UniversalRobotsRtde::sendDoubleRegister
void sendDoubleRegister()
Definition: UniversalRobotsRtde.cpp:942
AnalogOutputReader.h
rl::hal::UniversalRobotsRtde::socket4
Socket socket4
Definition: UniversalRobotsRtde.h:432
rl::hal::CyclicDevice
Definition: CyclicDevice.h:39
rl::hal::UniversalRobotsRtde::Input::standardAnalogOutput1
::boost::optional< double > standardAnalogOutput1
Definition: UniversalRobotsRtde.h:285
rl::hal::UniversalRobotsRtde::SAFETY_STATUS_SYSTEM_EMERGENCY_STOPPED
@ SAFETY_STATUS_SYSTEM_EMERGENCY_STOPPED
Definition: UniversalRobotsRtde.h:146
JointCurrentSensor.h
rl::hal::UniversalRobotsRtde::SAFETY_MODE_PROTECTIVE_STOP
@ SAFETY_MODE_PROTECTIVE_STOP
Definition: UniversalRobotsRtde.h:130
rl::hal::UniversalRobotsRtde::getAnalogInput
virtual ::std::vector< ::rl::math::Real > getAnalogInput() const
Definition: AnalogInputReader.cpp:43
rl::hal::UniversalRobotsRtde::serialize
void serialize(T &t, ::std::uint8_t *&ptr)
Definition: UniversalRobotsRtde.h:393
rl::hal::UniversalRobotsRtde::Input
Definition: UniversalRobotsRtde.h:270
Endian.h
rl::hal::UniversalRobotsRtde::getCartesianPositionTarget
::rl::math::Transform getCartesianPositionTarget() const
Definition: UniversalRobotsRtde.cpp:309
rl::hal::UniversalRobotsRtde::socket2
Socket socket2
Definition: UniversalRobotsRtde.h:430
rl::hal::UniversalRobotsRtde::JOINT_MODE_RUNNING
@ JOINT_MODE_RUNNING
Definition: UniversalRobotsRtde.h:91
rl::hal::UniversalRobotsRtde::SAFETY_MODE_RECOVERY
@ SAFETY_MODE_RECOVERY
Definition: UniversalRobotsRtde.h:131
rl::hal::UniversalRobotsRtde::Output::standardAnalogInput1
double standardAnalogInput1
Definition: UniversalRobotsRtde.h:340
rl::hal::UniversalRobotsRtde::ROBOT_MODE_DISCONNECTED
@ ROBOT_MODE_DISCONNECTED
Definition: UniversalRobotsRtde.h:97
rl::hal::UniversalRobotsRtde::SafetyStatus
SafetyStatus
Definition: UniversalRobotsRtde.h:140
rl::hal::UniversalRobotsRtde::UniversalRobotsRtde
UniversalRobotsRtde(const ::std::string &address)
Definition: UniversalRobotsRtde.cpp:38
rl::hal::UniversalRobotsRtde::JOINT_MODE_NOT_RESPONDING
@ JOINT_MODE_NOT_RESPONDING
Definition: UniversalRobotsRtde.h:84
rl::hal::UniversalRobotsRtde::input
Input input
Definition: UniversalRobotsRtde.h:426
rl::hal::UniversalRobotsRtde::Version::bugfix
::std::uint32_t bugfix
Definition: UniversalRobotsRtde.h:363
rl::hal::UniversalRobotsRtde::RUNTIME_STATE_PAUSING
@ RUNTIME_STATE_PAUSING
Definition: UniversalRobotsRtde.h:121
CartesianPositionSensor.h
rl::hal::UniversalRobotsRtde::getRobotStatusBits
::std::uint32_t getRobotStatusBits() const
Definition: UniversalRobotsRtde.cpp:456
rl::hal::UniversalRobotsRtde::ROBOT_STATUS_POWER_ON
@ ROBOT_STATUS_POWER_ON
Definition: UniversalRobotsRtde.h:110
rl::hal::UniversalRobotsRtde::RUNTIME_STATE_PAUSED
@ RUNTIME_STATE_PAUSED
Definition: UniversalRobotsRtde.h:122
rl::hal::UniversalRobotsRtde::Version::major
::std::uint32_t major
Definition: UniversalRobotsRtde.h:367
rl::hal::UniversalRobotsRtde
Universal Robots RTDE interface (3.3).
Definition: UniversalRobotsRtde.h:76
rl::hal::UniversalRobotsRtde::Input::standardAnalogOutput0
::boost::optional< double > standardAnalogOutput0
Definition: UniversalRobotsRtde.h:283
rl::hal::UniversalRobotsRtde::Output::actualCurrent
double actualCurrent[6]
Definition: UniversalRobotsRtde.h:298
rl::hal::UniversalRobotsRtde::SAFETY_STATUS_PROTECTIVE_STOPPED
@ SAFETY_STATUS_PROTECTIVE_STOPPED
Definition: UniversalRobotsRtde.h:143
rl::hal::Endian::hostToBig
static void hostToBig(::std::int8_t &character)
Definition: Endian.h:121
rl::hal::UniversalRobotsRtde::RUNTIME_STATE_STOPPING
@ RUNTIME_STATE_STOPPING
Definition: UniversalRobotsRtde.h:118
rl::hal::UniversalRobotsRtde::getDigitalOutputCount
::std::size_t getDigitalOutputCount() const
Definition: UniversalRobotsRtde.cpp:385
rl::hal::UniversalRobotsRtde::Output::toolAnalogInput1
double toolAnalogInput1
Definition: UniversalRobotsRtde.h:352
rl::hal::DigitalOutputReader
Definition: DigitalOutputReader.h:39
rl::hal::UniversalRobotsRtde::ROBOT_MODE_BOOTING
@ ROBOT_MODE_BOOTING
Definition: UniversalRobotsRtde.h:99
rl::hal::UniversalRobotsRtde::setJointAcceleration
void setJointAcceleration(const ::rl::math::Vector &qdd)
Definition: UniversalRobotsRtde.cpp:1122
CartesianForceSensor.h
rl::hal::UniversalRobotsRtde::ROBOT_MODE_BACKDRIVE
@ ROBOT_MODE_BACKDRIVE
Definition: UniversalRobotsRtde.h:103
rl::hal::UniversalRobotsRtde::output
Output output
Definition: UniversalRobotsRtde.h:428
rl::hal::UniversalRobotsRtde::Output::robotMode
::std::int32_t robotMode
Definition: UniversalRobotsRtde.h:328
DigitalOutputWriter.h
rl::hal::DigitalOutputWriter
Definition: DigitalOutputWriter.h:39
rl::math::Unit
Unit
Definition: Unit.h:162
CartesianVelocitySensor.h
DigitalOutputReader.h
rl::hal::Endian::bigToHost
static void bigToHost(::std::int8_t &character)
Definition: Endian.h:55
rl::hal::UniversalRobotsRtde::COMMAND_REQUEST_PROTOCOL_VERSION
@ COMMAND_REQUEST_PROTOCOL_VERSION
Definition: UniversalRobotsRtde.h:265
rl::hal::UniversalRobotsRtde::setAnalogOutput
virtual void setAnalogOutput(const ::std::vector< ::rl::math::Real > &values)
Definition: AnalogOutputWriter.cpp:43
rl::hal::AnalogInputReader::getAnalogInput
virtual ::std::vector< ::rl::math::Real > getAnalogInput() const
Definition: AnalogInputReader.cpp:43
rl::hal::UniversalRobotsRtde::getCartesianVelocityTarget
::rl::math::MotionVector getCartesianVelocityTarget() const
Definition: UniversalRobotsRtde.cpp:346
rl::hal::UniversalRobotsRtde::SAFETY_STATUS_SAFEGUARD_STOPPED
@ SAFETY_STATUS_SAFEGUARD_STOPPED
Definition: UniversalRobotsRtde.h:145
rl::hal::UniversalRobotsRtde::ROBOT_MODE_RUNNING
@ ROBOT_MODE_RUNNING
Definition: UniversalRobotsRtde.h:104
rl::hal::UniversalRobotsRtde::send
void send(::std::uint8_t *buffer, const ::std::size_t &size)
Definition: UniversalRobotsRtde.cpp:787
JointPositionSensor.h
rl::hal::UniversalRobotsRtde::Output::targetTcpPose
double targetTcpPose[6]
Definition: UniversalRobotsRtde.h:346
rl::hal::UniversalRobotsRtde::SAFETY_STATUS_VIOLATION
@ SAFETY_STATUS_VIOLATION
Definition: UniversalRobotsRtde.h:149
rl::hal::UniversalRobotsRtde::Output::standardAnalogOutput0
double standardAnalogOutput0
Definition: UniversalRobotsRtde.h:342
rl::hal::UniversalRobotsRtde::SAFETY_STATUS_FAULT
@ SAFETY_STATUS_FAULT
Definition: UniversalRobotsRtde.h:150
rl::hal::UniversalRobotsRtde::Input::standardDigitalOutputMask
::boost::optional< ::std::uint8_t > standardDigitalOutputMask
Definition: UniversalRobotsRtde.h:293
rl::hal::UniversalRobotsRtde::version
Version version
Definition: UniversalRobotsRtde.h:434
rl::hal::UniversalRobotsRtde::Output::toolOutputVoltage
::std::int32_t toolOutputVoltage
Definition: UniversalRobotsRtde.h:358
rl::hal::UniversalRobotsRtde::RUNTIME_STATE_STOPPED
@ RUNTIME_STATE_STOPPED
Definition: UniversalRobotsRtde.h:119
rl::hal::UniversalRobotsRtde::JOINT_MODE_BACKDRIVE
@ JOINT_MODE_BACKDRIVE
Definition: UniversalRobotsRtde.h:82
rl::hal::UniversalRobotsRtde::Output::jointTemperatures
double jointTemperatures[6]
Definition: UniversalRobotsRtde.h:318
rl::hal::UniversalRobotsRtde::COMMAND_CONTROL_PACKAGE_SETUP_OUTPUTS
@ COMMAND_CONTROL_PACKAGE_SETUP_OUTPUTS
Definition: UniversalRobotsRtde.h:261
rl::hal::AnalogInputReader
Definition: AnalogInputReader.h:40
rl::hal::UniversalRobotsRtde::getAnalogOutputMinimum
::rl::math::Real getAnalogOutputMinimum(const ::std::size_t &i) const
Definition: UniversalRobotsRtde.cpp:230
JointPositionActuator.h
rl::hal::UniversalRobotsRtde::JOINT_MODE_SHUTTING_DOWN
@ JOINT_MODE_SHUTTING_DOWN
Definition: UniversalRobotsRtde.h:80
rl::hal::UniversalRobotsRtde::Output::actualTcpPose
double actualTcpPose[6]
Definition: UniversalRobotsRtde.h:310
rl::hal::UniversalRobotsRtde::Output::safetyMode
::std::int32_t safetyMode
Definition: UniversalRobotsRtde.h:334
rl::hal::CartesianPositionSensor
Definition: CartesianPositionSensor.h:39
rl::hal::UniversalRobotsRtde::ROBOT_STATUS_POWER_BUTTON_PRESSED
@ ROBOT_STATUS_POWER_BUTTON_PRESSED
Definition: UniversalRobotsRtde.h:113
rl::hal::UniversalRobotsRtde::setJointPosition
void setJointPosition(const ::rl::math::Vector &q)
Definition: UniversalRobotsRtde.cpp:1130
rl::hal::UniversalRobotsRtde::sendBitRegisters
void sendBitRegisters()
Definition: UniversalRobotsRtde.cpp:889
rl::hal::UniversalRobotsRtde::getAnalogInputMinimum
::rl::math::Real getAnalogInputMinimum(const ::std::size_t &i) const
Definition: UniversalRobotsRtde.cpp:137
rl::hal::UniversalRobotsRtde::getJointTemperature
::rl::math::Vector getJointTemperature() const
Definition: UniversalRobotsRtde.cpp:424
rl::hal::UniversalRobotsRtde::Output::actualTcpForce
double actualTcpForce[6]
Definition: UniversalRobotsRtde.h:308
rl::hal::UniversalRobotsRtde::Input::standardAnalogOutputType
::std::uint8_t standardAnalogOutputType
Definition: UniversalRobotsRtde.h:289
CyclicDevice.h
rl::hal::UniversalRobotsRtde::SAFETY_STATUS_ROBOT_EMERGENCY_STOPPED
@ SAFETY_STATUS_ROBOT_EMERGENCY_STOPPED
Definition: UniversalRobotsRtde.h:147
rl::hal::UniversalRobotsRtde::SAFETY_MODE_VIOLATION
@ SAFETY_MODE_VIOLATION
Definition: UniversalRobotsRtde.h:135
rl::hal::UniversalRobotsRtde::Output::toolAnalogInput0
double toolAnalogInput0
Definition: UniversalRobotsRtde.h:350
rl::hal::CartesianVelocitySensor
Definition: CartesianVelocitySensor.h:39
rl::hal::DigitalInputReader
Definition: DigitalInputReader.h:39
rl::hal::UniversalRobotsRtde::getSafetyStatusBits
::std::uint32_t getSafetyStatusBits() const
Definition: UniversalRobotsRtde.cpp:474
AnalogOutputWriter.h
rl::hal::UniversalRobotsRtde::getAnalogInputCount
::std::size_t getAnalogInputCount() const
Definition: UniversalRobotsRtde.cpp:108
rl::hal::UniversalRobotsRtde::close
void close()
Definition: UniversalRobotsRtde.cpp:78
rl::hal::UniversalRobotsRtde::getAnalogOutputMaximum
::rl::math::Real getAnalogOutputMaximum(const ::std::size_t &i) const
Definition: UniversalRobotsRtde.cpp:207
rl::hal::UniversalRobotsRtde::JOINT_MODE_FAULT
@ JOINT_MODE_FAULT
Definition: UniversalRobotsRtde.h:90
rl::hal::UniversalRobotsRtde::recv
void recv()
Definition: UniversalRobotsRtde.cpp:635
rl::hal::UniversalRobotsRtde::getCartesianForce
::rl::math::ForceVector getCartesianForce() const
Definition: UniversalRobotsRtde.cpp:272
rl::math::spatial::ForceVector
Force vector.
Definition: ForceVector.h:46
rl::hal::UniversalRobotsRtde::sendAnalogOutputs
void sendAnalogOutputs()
Definition: UniversalRobotsRtde.cpp:865
rl::hal::UniversalRobotsRtde::Output::outputBitRegisters0
::std::uint32_t outputBitRegisters0
Definition: UniversalRobotsRtde.h:320
rl::hal::JointCurrentSensor
Definition: JointCurrentSensor.h:39
rl::hal::UniversalRobotsRtde::Input::configurableDigitalOutputMask
::boost::optional< ::std::uint8_t > configurableDigitalOutputMask
Definition: UniversalRobotsRtde.h:273
rl::hal::UniversalRobotsRtde::ROBOT_MODE_IDLE
@ ROBOT_MODE_IDLE
Definition: UniversalRobotsRtde.h:102
rl::hal::UniversalRobotsRtde::getRobotMode
RobotMode getRobotMode() const
Definition: UniversalRobotsRtde.cpp:450
rl::hal::UniversalRobotsRtde::getRuntimeState
RuntimeState getRuntimeState() const
Definition: UniversalRobotsRtde.cpp:462
rl::hal::JointPositionActuator
Definition: JointPositionActuator.h:39
rl::math::Real
double Real
Definition: Real.h:42
rl::hal::UniversalRobotsRtde::SAFETY_MODE_NORMAL
@ SAFETY_MODE_NORMAL
Definition: UniversalRobotsRtde.h:128
rl::hal::UniversalRobotsRtde::doScript
void doScript(const ::std::string &script)
rl::hal::UniversalRobotsRtde::open
void open()
Definition: UniversalRobotsRtde.cpp:480
rl::math::spatial::MotionVector
Motion vector.
Definition: MotionVector.h:45
rl::hal::UniversalRobotsRtde::Input::inputBitRegisters1
::boost::optional< ::std::uint32_t > inputBitRegisters1
Definition: UniversalRobotsRtde.h:277
rl::hal::UniversalRobotsRtde::Input::standardAnalogOutputMask
::boost::optional< ::std::uint8_t > standardAnalogOutputMask
Definition: UniversalRobotsRtde.h:287
rl::hal::AnalogOutputWriter::setAnalogOutput
virtual void setAnalogOutput(const ::std::vector< ::rl::math::Real > &values)
Definition: AnalogOutputWriter.cpp:43
rl::hal::UniversalRobotsRtde::getAnalogOutputCount
::std::size_t getAnalogOutputCount() const
Definition: UniversalRobotsRtde.cpp:201
rl::hal::UniversalRobotsRtde::SafetyMode
SafetyMode
Definition: UniversalRobotsRtde.h:127
Socket.h
rl::hal::UniversalRobotsRtde::ROBOT_MODE_POWER_ON
@ ROBOT_MODE_POWER_ON
Definition: UniversalRobotsRtde.h:101
rl::hal::UniversalRobotsRtde::setDigitalOutput
virtual void setDigitalOutput(const ::boost::dynamic_bitset<> &bitset)
Definition: DigitalOutputWriter.cpp:43
rl::hal::UniversalRobotsRtde::Output::jointMode
::std::int32_t jointMode[6]
Definition: UniversalRobotsRtde.h:316
rl::hal::UniversalRobotsRtde::ROBOT_MODE_POWER_OFF
@ ROBOT_MODE_POWER_OFF
Definition: UniversalRobotsRtde.h:100
rl::hal::UniversalRobotsRtde::Output::standardAnalogOutput1
double standardAnalogOutput1
Definition: UniversalRobotsRtde.h:344
rl::hal::UniversalRobotsRtde::JOINT_MODE_CALIBRATION
@ JOINT_MODE_CALIBRATION
Definition: UniversalRobotsRtde.h:89
rl::hal::UniversalRobotsRtde::SAFETY_MODE_SYSTEM_EMERGENCY_STOP
@ SAFETY_MODE_SYSTEM_EMERGENCY_STOP
Definition: UniversalRobotsRtde.h:133
rl::hal::UniversalRobotsRtde::ROBOT_STATUS_PROGRAM_RUNNING
@ ROBOT_STATUS_PROGRAM_RUNNING
Definition: UniversalRobotsRtde.h:111
rl::hal::UniversalRobotsRtde::setAnalogOutputUnit
void setAnalogOutputUnit(const ::std::vector< ::rl::math::Unit > &values)
Definition: UniversalRobotsRtde.cpp:1023
rl::hal::AnalogOutputReader::getAnalogOutput
virtual ::std::vector< ::rl::math::Real > getAnalogOutput() const
Definition: AnalogOutputReader.cpp:43
rl::hal::UniversalRobotsRtde::Output::outputIntRegister
::std::int32_t outputIntRegister[24]
Definition: UniversalRobotsRtde.h:326
rl
Robotics Library.
Definition: AnalogInput.cpp:30