Franky 0.12.0
A High-Level Motion API for Franka
Loading...
Searching...
No Matches
robot_state.hpp
Go to the documentation of this file.
1// Adapted from https://github.com/frankaemika/libfranka/blob/main/include/franka/robot_state.h
2#pragma once
3
4#include <franka/robot_state.h>
5
7#include "franky/twist.hpp"
9#include "franky/types.hpp"
10#include "franky/util.hpp"
11
12namespace franky {
13
20struct RobotState {
22 const franka::RobotState& robot_state, std::optional<Vector7d> ddq_est = std::nullopt,
23 std::optional<Twist> O_dP_EE_est = std::nullopt, std::optional<TwistAcceleration> O_ddP_EE_est = std::nullopt,
24 std::optional<double> delbow_est = std::nullopt, std::optional<double> ddelbow_est = std::nullopt);
25
27 const franka::RobotState& robot_state, const Jacobian& ee_jacobian, const Vector7d& ddq_est);
28
33 Affine O_T_EE{}; // NOLINT(readability-identifier-naming)
34
39 Affine O_T_EE_d{}; // NOLINT(readability-identifier-naming)
40
49 Affine F_T_EE{}; // NOLINT(readability-identifier-naming)
50
51#ifdef FRANKA_0_8
60 Affine F_T_NE{}; // NOLINT(readability-identifier-naming)
61
71 Affine NE_T_EE{}; // NOLINT(readability-identifier-naming)
72#endif
73
80 Affine EE_T_K{}; // NOLINT(readability-identifier-naming)
81
86 double m_ee{};
87
92 IntertiaMatrix I_ee{}; // NOLINT(readability-identifier-naming)
93
98 Eigen::Vector3d F_x_Cee{}; // NOLINT(readability-identifier-naming)
99
104 double m_load{};
105
110 IntertiaMatrix I_load{}; // NOLINT(readability-identifier-naming)
111
116 Eigen::Vector3d F_x_Cload{}; // NOLINT(readability-identifier-naming)
117
122 double m_total{};
123
129 IntertiaMatrix I_total{}; // NOLINT(readability-identifier-naming)
130
136 Eigen::Vector3d F_x_Ctotal{}; // NOLINT(readability-identifier-naming)
137
142
147
152
156 double delbow_c{};
157
161 double ddelbow_c{};
162
167 Vector7d tau_J{}; // NOLINT(readability-identifier-naming)
168
173 Vector7d tau_J_d{}; // NOLINT(readability-identifier-naming)
174
179 Vector7d dtau_J{}; // NOLINT(readability-identifier-naming)
180
186
192
198
204
210
218
226
235
244
252
261 Vector6d O_F_ext_hat_K{}; // NOLINT(readability-identifier-naming)
262
271 Vector6d K_F_ext_hat_K{}; // NOLINT(readability-identifier-naming)
272
278 Twist O_dP_EE_d{}; // NOLINT(readability-identifier-naming)
279
280#ifdef FRANKA_0_9
288 Eigen::Vector3d O_ddP_O{}; // NOLINT(readability-identifier-naming)
289#endif
290
295 Affine O_T_EE_c{}; // NOLINT(readability-identifier-naming)
296
301 Twist O_dP_EE_c{}; // NOLINT(readability-identifier-naming)
302
309 TwistAcceleration O_ddP_EE_c{}; // NOLINT(readability-identifier-naming)
310
316
322
326 franka::Errors current_errors{};
327
331 franka::Errors last_motion_errors{};
332
341
345 franka::RobotMode robot_mode = franka::RobotMode::kUserStopped;
346
353 franka::Duration time{};
354
359 std::optional<Vector7d> ddq_est{};
360
366 std::optional<Twist> O_dP_EE_est{};
367
373 std::optional<TwistAcceleration> O_ddP_EE_est{};
374
380 std::optional<double> delbow_est{};
381
387 std::optional<double> ddelbow_est{};
388};
389
390} // namespace franky
Elbow state of the robot.
Definition elbow_state.hpp:27
TwistAcceleration acceleration of a frame (2nd derivative of a pose).
Definition twist_acceleration.hpp:14
Twist of a frame.
Definition twist.hpp:13
Definition dynamics_limit.cpp:8
std::array< double, dims > toStdD(const Eigen::Matrix< double, dims, 1 > &vector)
Definition util.hpp:18
Eigen::Matrix< double, 3, 3 > IntertiaMatrix
Definition types.hpp:14
Eigen::Vector< double, 7 > Vector7d
Definition types.hpp:12
Eigen::Vector< double, 6 > Vector6d
Definition types.hpp:11
Eigen::Matrix< double, 6, 7 > Jacobian
Definition types.hpp:13
Eigen::Affine3d Affine
Definition types.hpp:16
Full state of the robot.
Definition robot_state.hpp:20
franka::Errors last_motion_errors
Definition robot_state.hpp:331
Affine O_T_EE
Definition robot_state.hpp:33
Vector6d K_F_ext_hat_K
Definition robot_state.hpp:271
Vector7d tau_ext_hat_filtered
Definition robot_state.hpp:251
Vector7d joint_contact
Definition robot_state.hpp:217
Eigen::Vector3d F_x_Cee
Definition robot_state.hpp:98
Eigen::Vector3d F_x_Ctotal
Definition robot_state.hpp:136
Vector7d dq_d
Definition robot_state.hpp:203
TwistAcceleration O_ddP_EE_c
Definition robot_state.hpp:309
std::optional< TwistAcceleration > O_ddP_EE_est
Definition robot_state.hpp:373
double delbow_c
Definition robot_state.hpp:156
Vector6d cartesian_contact
Definition robot_state.hpp:225
Affine EE_T_K
Definition robot_state.hpp:80
IntertiaMatrix I_total
Definition robot_state.hpp:129
Vector7d tau_J_d
Definition robot_state.hpp:173
ElbowState elbow_c
Definition robot_state.hpp:151
Vector7d joint_collision
Definition robot_state.hpp:234
Vector7d dtau_J
Definition robot_state.hpp:179
Vector6d cartesian_collision
Definition robot_state.hpp:243
Vector7d dtheta
Definition robot_state.hpp:321
Vector7d theta
Definition robot_state.hpp:315
double m_total
Definition robot_state.hpp:122
IntertiaMatrix I_ee
Definition robot_state.hpp:92
Affine O_T_EE_d
Definition robot_state.hpp:39
franka::Duration time
Definition robot_state.hpp:353
double control_command_success_rate
Definition robot_state.hpp:340
std::optional< Twist > O_dP_EE_est
Definition robot_state.hpp:366
Vector7d tau_J
Definition robot_state.hpp:167
Affine F_T_EE
Definition robot_state.hpp:49
std::optional< Vector7d > ddq_est
Definition robot_state.hpp:359
Twist O_dP_EE_d
Definition robot_state.hpp:278
static RobotState from_franka(const franka::RobotState &robot_state, std::optional< Vector7d > ddq_est=std::nullopt, std::optional< Twist > O_dP_EE_est=std::nullopt, std::optional< TwistAcceleration > O_ddP_EE_est=std::nullopt, std::optional< double > delbow_est=std::nullopt, std::optional< double > ddelbow_est=std::nullopt)
Definition robot_state.cpp:7
double m_ee
Definition robot_state.hpp:86
Twist O_dP_EE_c
Definition robot_state.hpp:301
ElbowState elbow_d
Definition robot_state.hpp:146
ElbowState elbow
Definition robot_state.hpp:141
Vector7d ddq_d
Definition robot_state.hpp:209
Vector7d q_d
Definition robot_state.hpp:191
franka::RobotMode robot_mode
Definition robot_state.hpp:345
double ddelbow_c
Definition robot_state.hpp:161
Eigen::Vector3d F_x_Cload
Definition robot_state.hpp:116
double m_load
Definition robot_state.hpp:104
Vector6d O_F_ext_hat_K
Definition robot_state.hpp:261
std::optional< double > delbow_est
Definition robot_state.hpp:380
IntertiaMatrix I_load
Definition robot_state.hpp:110
Vector7d q
Definition robot_state.hpp:185
std::optional< double > ddelbow_est
Definition robot_state.hpp:387
Vector7d dq
Definition robot_state.hpp:197
Affine O_T_EE_c
Definition robot_state.hpp:295
franka::Errors current_errors
Definition robot_state.hpp:326