DSRTBimanualController.h
Go to the documentation of this file.
1 /*
2  * This file is part of ArmarX.
3  *
4  * ArmarX is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 as
6  * published by the Free Software Foundation.
7  *
8  * ArmarX is distributed in the hope that it will be useful, but
9  * WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program. If not, see <http://www.gnu.org/licenses/>.
15  *
16  * @package DSController::ArmarXObjects::DSRTBimanualController
17  * @author Mahdi Khoramshahi ( m80 dot khoramshahi at gmail dot com )
18  * @date 2018
19  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20  * GNU General Public License
21  */
22 
23 #ifndef _ARMARX_LIB_DSController_DSRTBimanualController_H
24 #define _ARMARX_LIB_DSController_DSRTBimanualController_H
25 
26 #include <VirtualRobot/Robot.h>
27 #include <VirtualRobot/Tools/Gravity.h>
28 #include <VirtualRobot/IK/DifferentialIK.h>
30 
36 
37 #include <armarx/control/ds_controller/DSControllerInterface.h>
38 
39 #include "GMRDynamics.h"
40 #include "MathLib.h"
41 
42 
44 {
46  {
47  public:
49  Eigen::Vector3f left_tcpDesiredAngularError;
50 
53 
54  Eigen::Vector3f left_right_distanceInMeter;
55 
56  };
57 
59 
61  {
62  int K_gmm_;
63  int dim_;
64  std::vector<double> Priors_;
65  std::vector<double> Mu_;
66  std::vector<double> Sigma_;
67  std::vector<double> attractor_;
68  double dt_;
69  };
70 
71 
73  {
74  public:
76 
77  BimanualGMMMotionGen(const std::string& fileName)
78  {
79  getGMMParamsFromJsonFile(fileName);
80  }
81 
84 
87 
88  Eigen::Vector3f leftarm_Target;
89  Eigen::Vector3f rightarm_Target;
90 
91  Eigen::Vector3f left_DS_DesiredVelocity;
92  Eigen::Vector3f right_DS_DesiredVelocity;
94 
95 
96 
97  float scaling;
98  float v_max;
99 
100  void getGMMParamsFromJsonFile(const std::string& fileName)
101  {
102  std::ifstream infile { fileName };
103  std::string objDefs = { std::istreambuf_iterator<char>(infile), std::istreambuf_iterator<char>() };
104  // StructuralJsonParser jsonParser(objDefs);
105  // jsonParser.parse();
106  // JPathNavigator jpnav(jsonParser.parsedJson);
107  // float k = jpnav.selectSingleNode("left/K").asFloat();
108  // ARMARX_INFO << "k: " << k ;
109  // jpnav.selectSingleNode("left")
110  JSONObjectPtr json = new JSONObject();
111  json->fromString(objDefs);
112 
113  // leftarm_gmmParas.K_gmm_ = AbstractObjectSerializerPtr::dynamicCast<JSONObjectPtr>(json->getElement("left"))->getInt("K");
114  // leftarm_gmmParas.dim_ = json->getElement("left")->getInt("dim");
115  // boost::dynamic_pointer_cast<JSONObjectPtr>(json->getElement("left"))->getArray<double>("Priors", leftarm_gmmParas.Priors_);
116 
117  // json->getElement("left")->getArray<double>("Mu", leftarm_gmmParas.Mu_);
118  // json->getElement("left")->getArray<double>("attractor", leftarm_gmmParas.attractor_);
119  // json->getElement("left")->getArray<double>("Sigma", leftarm_gmmParas.Sigma_);
120 
121  // rightarm_gmmParas.K_gmm_ = json->getElement("right")->getInt("K");
122  // rightarm_gmmParas.dim_ = json->getElement("right")->getInt("dim");
123  // json->getElement("right")->getArray<double>("Priors", rightarm_gmmParas.Priors_);
124  // json->getElement("right")->getArray<double>("Mu", rightarm_gmmParas.Mu_);
125  // json->getElement("right")->getArray<double>("attractor", rightarm_gmmParas.attractor_);
126  // json->getElement("right")->getArray<double>("Sigma", rightarm_gmmParas.Sigma_);
127 
128 
129  leftarm_gmmParas.K_gmm_ = json->getInt("leftK");
130  leftarm_gmmParas.dim_ = json->getInt("leftDim");
131  json->getArray<double>("leftPriors", leftarm_gmmParas.Priors_);
132  json->getArray<double>("leftMu", leftarm_gmmParas.Mu_);
133  json->getArray<double>("leftAttractor", leftarm_gmmParas.attractor_);
134  json->getArray<double>("leftSigma", leftarm_gmmParas.Sigma_);
135 
136 
137  rightarm_gmmParas.K_gmm_ = json->getInt("rightK");
138  rightarm_gmmParas.dim_ = json->getInt("rightDim");
139  json->getArray<double>("rightPriors", rightarm_gmmParas.Priors_);
140  json->getArray<double>("rightMu", rightarm_gmmParas.Mu_);
141  json->getArray<double>("rightAttractor", rightarm_gmmParas.attractor_);
142  json->getArray<double>("rightSigma", rightarm_gmmParas.Sigma_);
143 
144 
145  scaling = json->getDouble("Scaling");
146  v_max = json->getDouble("MaxVelocity");
147 
149  leftarm_gmm->initGMR(0, 2, 3, 5);
150 
152  rightarm_gmm->initGMR(0, 2, 3, 5);
153 
154 
155  // if (leftarm_gmmParas.attractor_.size() < 3)
156  // {
157  // ARMARX_ERROR << "attractor in json file for the left arm should be 6 dimension vector ... ";
158  // }
159 
160  // if (rightarm_gmmParas.attractor_.size() < 3)
161  // {
162  // ARMARX_ERROR << "attractor in json file for the left arm should be 6 dimension vector ... ";
163  // }
164 
165  std::cout << "line 162." << std::endl;
166 
167 
168  for (int i = 0; i < 3; ++i)
169  {
172  }
173 
174  std::cout << "Finished GMM." << std::endl;
175 
176  }
177 
178 
180  const Eigen::Vector3f& leftarm_PositionInMeter,
181  const Eigen::Vector3f& rightarm_PositionInMeter,
182  float positionErrorToleranceInMeter,
183  float desiredZ,
184  float correction_x,
185  float correction_y,
186  float correction_z)
187  {
188  MathLib::Vector position_error;
189  position_error.Resize(3);
190 
191  MathLib::Vector desired_vel;
192  desired_vel.Resize(3);
193 
194 
195 
196  Eigen::Vector3f leftarm_Target_corrected = leftarm_Target;
197  Eigen::Vector3f rightarm_Target_corrected = rightarm_Target;
198 
199  leftarm_Target_corrected(0) += correction_x;
200  rightarm_Target_corrected(0) += correction_x;
201 
202  leftarm_Target_corrected(1) += correction_y;
203  rightarm_Target_corrected(1) += correction_y;
204 
205  leftarm_Target_corrected(2) = desiredZ + correction_z;
206  rightarm_Target_corrected(2) = desiredZ + correction_z;
207 
208 
209 
210  // for the left arm
211  Eigen::Vector3f leftarm_PositionError = leftarm_PositionInMeter - leftarm_Target_corrected;
212  if (leftarm_PositionError.norm() < positionErrorToleranceInMeter)
213  {
214  leftarm_PositionError.setZero();
215  }
216 
217  for (int i = 0; i < 3; ++i)
218  {
219  position_error(i) = leftarm_PositionError(i);
220  }
221 
222  desired_vel = leftarm_gmm->getVelocity(position_error);
223 
224  Eigen::Vector3f leftarm_desired_vel;
225  leftarm_desired_vel << desired_vel(0), desired_vel(1), desired_vel(2);
226 
227  leftarm_desired_vel = scaling * leftarm_desired_vel;
228 
229  float lenVec = leftarm_desired_vel.norm();
230 
231  if (std::isnan(lenVec))
232  {
233  leftarm_desired_vel.setZero();
234  }
235 
236  if (desiredZ < 1.5)
237  {
238  v_max = 0.2;
239  }
240  else
241  {
242  v_max = 0.5;
243  }
244 
245  if (lenVec > v_max)
246  {
247  leftarm_desired_vel = (v_max / lenVec) * leftarm_desired_vel;
248  }
249 
250  left_DS_DesiredVelocity = leftarm_desired_vel;
251 
252 
253  // for the right arm
254  Eigen::Vector3f rightarm_PositionError = rightarm_PositionInMeter - rightarm_Target_corrected;
255  if (rightarm_PositionError.norm() < positionErrorToleranceInMeter)
256  {
257  rightarm_PositionError.setZero();
258  }
259 
260  for (int i = 0; i < 3; ++i)
261  {
262  position_error(i) = rightarm_PositionError(i);
263  }
264 
265  desired_vel = rightarm_gmm->getVelocity(position_error);
266 
267  Eigen::Vector3f rightarm_desired_vel;
268  rightarm_desired_vel << desired_vel(0), desired_vel(1), desired_vel(2);
269 
270  rightarm_desired_vel = scaling * rightarm_desired_vel;
271 
272  lenVec = rightarm_desired_vel.norm();
273  if (std::isnan(lenVec))
274  {
275  rightarm_desired_vel.setZero();
276  }
277 
278  if (lenVec > v_max)
279  {
280  rightarm_desired_vel = (v_max / lenVec) * rightarm_desired_vel;
281  }
282 
283  right_DS_DesiredVelocity = rightarm_desired_vel;
284 
285  left_right_position_errorInMeter = leftarm_PositionError - rightarm_PositionError;
286 
287  }
288 
289 
290 
291  };
292 
294 
295 
296 
297 
298  /**
299  * @defgroup Library-DSRTBimanualController DSRTBimanualController
300  * @ingroup armarx_control
301  * A description of the library DSRTBimanualController.
302  *
303  * @class DSRTBimanualController
304  * @ingroup Library-DSRTBimanualController
305  * @brief Brief description of class DSRTBimanualController.
306  *
307  * Detailed description of class DSRTBimanualController.
308  */
309  class DSRTBimanualController : public NJointControllerWithTripleBuffer<DSRTBimanualControllerControlData>, public DSBimanualControllerInterface
310  {
311 
312  // ManagedIceObject interface
313  protected:
314  void onInitNJointController();
316 
317 
318  void controllerRun();
319 
320 
321 
322  // NJointControllerInterface interface
323  public:
324  using ConfigPtrT = DSRTBimanualControllerConfigPtr;
325 
326  DSRTBimanualController(const RobotUnitPtr& robotUnit, const NJointControllerConfigPtr& config, const VirtualRobot::RobotPtr&);
327 
328 
329  std::string getClassName(const Ice::Current&) const
330  {
331  return "DSRTBimanualController";
332  }
333 
334  // NJointController interface
335  void rtRun(const IceUtil::Time& sensorValuesTimestamp, const IceUtil::Time& timeSinceLastIteration);
336 
337  void setToDefaultTarget(const Ice::Current&);
338  private:
339 
340  float deadzone(float currentValue, float targetValue, float threshold);
341  Eigen::Quaternionf quatSlerp(double t, const Eigen::Quaternionf& q0, const Eigen::Quaternionf& q1);
342 
343  // PeriodicTask<DSRTBimanualController>::pointer_type controllerTask;
344  BimanualGMMMotionGenPtr gmmMotionGenerator;
345  struct DSRTBimanualControllerSensorData
346  {
347  Eigen::Matrix4f left_tcpPose;
348  Eigen::Matrix4f right_tcpPose;
349 
350  // Eigen::Vector3f left_linearVelocity;
351  // Eigen::Vector3f right_linearVelocity;
352 
353  Eigen::Vector3f left_force;
354  Eigen::Vector3f right_force;
355 
356 
357  double currentTime;
358 
359 
360  };
362 
363  struct DSCtrlDebugInfo
364  {
365  float desredZ;
366  float force_error_z;
367  float guardXYHighFrequency;
368  float guard_mounting_correction_x;
369  float guard_mounting_correction_y;
370  float guard_mounting_correction_z;
371  };
372  TripleBuffer<DSCtrlDebugInfo> debugCtrlDataInfo;
373 
374  struct DSRTDebugInfo
375  {
376  StringFloatDictionary desired_torques;
377  float desiredForce_x;
378  float desiredForce_y;
379  float desiredForce_z;
380  float tcpDesiredTorque_x;
381  float tcpDesiredTorque_y;
382  float tcpDesiredTorque_z;
383 
384  float tcpDesiredAngularError_x;
385  float tcpDesiredAngularError_y;
386  float tcpDesiredAngularError_z;
387 
388  float currentTCPAngularVelocity_x;
389  float currentTCPAngularVelocity_y;
390  float currentTCPAngularVelocity_z;
391 
392  float currentTCPLinearVelocity_x;
393  float currentTCPLinearVelocity_y;
394  float currentTCPLinearVelocity_z;
395 
396  // force torque sensor in root
397  float left_realForce_x;
398  float left_realForce_y;
399  float left_realForce_z;
400  float right_realForce_x;
401  float right_realForce_y;
402  float right_realForce_z;
403  float left_force_error;
404  float right_force_error;
405 
406  float left_tcpDesiredTorque_x;
407  float left_tcpDesiredTorque_y;
408  float left_tcpDesiredTorque_z;
409  float right_tcpDesiredTorque_x;
410  float right_tcpDesiredTorque_y;
411  float right_tcpDesiredTorque_z;
412 
413  };
414  TripleBuffer<DSRTDebugInfo> debugDataInfo;
415 
416 
417  std::vector<const SensorValue1DoFActuatorTorque*> left_torqueSensors;
418  std::vector<const SensorValue1DoFGravityTorque*> left_gravityTorqueSensors;
419  std::vector<const SensorValue1DoFActuatorVelocity*> left_velocitySensors;
420  std::vector<const SensorValue1DoFActuatorPosition*> left_positionSensors;
421 
422  std::vector<const SensorValue1DoFActuatorTorque*> right_torqueSensors;
423  std::vector<const SensorValue1DoFGravityTorque*> right_gravityTorqueSensors;
424  std::vector<const SensorValue1DoFActuatorVelocity*> right_velocitySensors;
425  std::vector<const SensorValue1DoFActuatorPosition*> right_positionSensors;
426 
427  const SensorValueForceTorque* leftForceTorque;
428  const SensorValueForceTorque* rightForceTorque;
429 
430  std::vector<ControlTarget1DoFActuatorTorque*> left_torque_targets;
431  std::vector<ControlTarget1DoFActuatorTorque*> right_torque_targets;
432 
433 
434  VirtualRobot::RobotNodePtr left_arm_tcp;
435  VirtualRobot::RobotNodePtr right_arm_tcp;
436 
437  VirtualRobot::RobotNodePtr left_sensor_frame;
438  VirtualRobot::RobotNodePtr right_sensor_frame;
439 
440  VirtualRobot::DifferentialIKPtr left_ik;
441  Eigen::MatrixXf left_jacobip;
442  Eigen::MatrixXf left_jacobio;
443 
444  VirtualRobot::DifferentialIKPtr right_ik;
445  Eigen::MatrixXf right_jacobip;
446  Eigen::MatrixXf right_jacobio;
447 
448  Eigen::Quaternionf left_desiredQuaternion;
449  Eigen::Vector3f left_oldPosition;
450  Eigen::Matrix3f left_oldOrientation;
451 
452  Eigen::Quaternionf right_desiredQuaternion;
453  Eigen::Vector3f right_oldPosition;
454  Eigen::Matrix3f right_oldOrientation;
455 
456  Eigen::Vector3f left_currentTCPLinearVelocity_filtered;
457  Eigen::Vector3f left_currentTCPAngularVelocity_filtered;
458 
459  Eigen::VectorXf left_jointVelocity_filtered;
460  Eigen::VectorXf right_jointVelocity_filtered;
461 
462  Eigen::VectorXf left_desiredTorques_filtered;
463  Eigen::VectorXf right_desiredTorques_filtered;
464 
465 
466  Eigen::Vector3f left_tcpDesiredTorque_filtered;
467  Eigen::Vector3f right_tcpDesiredTorque_filtered;
468 
469  Eigen::Vector3f leftForceOffset;
470  Eigen::Vector3f rightForceOffset;
471 
472  float left_contactForceZ_correction;
473  float right_contactForceZ_correction;
474 
475  float smooth_startup;
476 
477  DSRTBimanualControllerConfigPtr cfg;
478 
479  Eigen::Vector3f right_currentTCPLinearVelocity_filtered;
480  Eigen::Vector3f right_currentTCPAngularVelocity_filtered;
481 
482  float filterTimeConstant;
483 
484  std::vector<std::string> left_jointNames;
485  std::vector<std::string> right_jointNames;
486 
487  float posiKp;
488  float v_max;
489  std::vector<float> Damping;
490  float torqueLimit;
491  float null_torqueLimit;
492 
493  float Coupling_stiffness;
494  float Coupling_force_limit;
495 
496  float forward_gain;
497 
498  float oriKp;
499  float oriDamping;
500 
501  float nullspaceKp;
502  float nullspaceDamping;
503 
504  float contactForce;
505 
506  float guardTargetZUp;
507  float guardTargetZDown;
508  float guardDesiredZ;
509  float guard_mounting_correction_z;
510 
511  float guardXYHighFrequency;
512  Eigen::Vector3f left_force_old;
513  Eigen::Vector3f right_force_old;
514 
515  Eigen::VectorXf left_qnullspace;
516  Eigen::VectorXf right_qnullspace;
517 
518  Eigen::Quaternionf left_oriUp;
519  Eigen::Quaternionf left_oriDown;
520  Eigen::Quaternionf right_oriUp;
521  Eigen::Quaternionf right_oriDown;
522 
523  // std::vector<BimanualGMMMotionGenPtr> BimanualGMMMotionGenList;
524 
525 
526  float forceFilterCoeff;
527 
528  float positionErrorTolerance;
529  bool controllerStopRequested = false;
530  bool controllerRunFinished = false;
531 
532  bool isDefaultTarget = true;
533 
534  /// intermediate variables
535  Eigen::Vector6f left_tcptwist;
536  Eigen::Vector6f right_tcptwist;
537 
538  Eigen::Matrix4f left_currentTCPPose;
539  Eigen::Matrix4f right_currentTCPPose;
540 
541  unsigned int nJointLeft = 0;
542  unsigned int nJointRight = 0;
543 
544  Eigen::MatrixXf left_jacobi;
545  Eigen::MatrixXf right_jacobi;
546 
547  Eigen::VectorXf left_qpos;
548  Eigen::VectorXf left_qvel;
549 
550  Eigen::VectorXf right_qpos;
551  Eigen::VectorXf right_qvel;
552 
553  Eigen::Vector3f left_forceInRoot;
554  Eigen::Vector3f right_forceInRoot;
555 
556  double deltaT = 0.0;
557 
558  Eigen::Vector3f left_DS_force;
559  Eigen::Vector3f right_DS_force;
560  Eigen::Vector3f coupling_force;
561 
562  Eigen::Vector3f left_tcpDesiredForce;
563  Eigen::Vector3f right_tcpDesiredForce;
564  Eigen::Vector3f left_tcpDesiredTorque;
565  Eigen::Vector3f right_tcpDesiredTorque;
566 
567  Eigen::VectorXf left_nullspaceTorque;
568  Eigen::VectorXf right_nullspaceTorque;
569 
570  Eigen::MatrixXf I;
571 
572  Eigen::Vector6f left_tcpDesiredWrench;
573  Eigen::Vector6f right_tcpDesiredWrench;
574 
575  Eigen::VectorXf left_jointDesiredTorques;
576  Eigen::VectorXf right_jointDesiredTorques;
577 
578  Eigen::MatrixXf left_jtpinv;
579  Eigen::MatrixXf right_jtpinv;
580 
581  Eigen::VectorXf left_nullqerror;
582  Eigen::VectorXf right_nullqerror;
583 
584  // NJointController interface
585  protected:
587 
588  // NJointController interface
589  protected:
592  };
593 
594 }
595 
596 #endif
armarx::control::ds_controller::BimanualGMMMotionGen::left_DS_DesiredVelocity
Eigen::Vector3f left_DS_DesiredVelocity
Definition: DSRTBimanualController.h:91
armarx::control::ds_controller::BimanualGMMMotionGenPtr
boost::shared_ptr< BimanualGMMMotionGen > BimanualGMMMotionGenPtr
Definition: DSRTBimanualController.h:293
armarx::control::ds_controller::DSRTBimanualController::DSRTBimanualController
DSRTBimanualController(const RobotUnitPtr &robotUnit, const NJointControllerConfigPtr &config, const VirtualRobot::RobotPtr &)
Definition: DSRTBimanualController.cpp:69
armarx::control::ds_controller::DSRTBimanualController::rtRun
void rtRun(const IceUtil::Time &sensorValuesTimestamp, const IceUtil::Time &timeSinceLastIteration)
TODO make protected and use attorneys.
Definition: DSRTBimanualController.cpp:498
armarx::control::ds_controller::DSRTBimanualControllerControlData::right_tcpDesiredLinearVelocity
Eigen::Vector3f right_tcpDesiredLinearVelocity
Definition: DSRTBimanualController.h:51
armarx::control::ds_controller::DSRTBimanualControllerControlData::left_tcpDesiredAngularError
Eigen::Vector3f left_tcpDesiredAngularError
Definition: DSRTBimanualController.h:49
armarx::control::ds_controller::BimanualGMRParameters::Sigma_
std::vector< double > Sigma_
Definition: DSRTBimanualController.h:66
boost::shared_ptr< GMRDynamics >
armarx::control::ds_controller::BimanualGMMMotionGen::leftarm_gmm
BimanualGMMPtr leftarm_gmm
Definition: DSRTBimanualController.h:82
Vector
Eigen::Matrix< T, 3, 1 > Vector
Definition: UnscentedKalmanFilterTest.cpp:36
JSONObject.h
armarx::NJointControllerWithTripleBuffer
Definition: NJointControllerWithTripleBuffer.h:10
RobotUnit.h
armarx::control::ds_controller::BimanualGMRParameters::dt_
double dt_
Definition: DSRTBimanualController.h:68
armarx::control::ds_controller::DSRTBimanualControllerControlData::left_tcpDesiredLinearVelocity
Eigen::Vector3f left_tcpDesiredLinearVelocity
Definition: DSRTBimanualController.h:48
armarx::control::ds_controller::BimanualGMMMotionGen::rightarm_gmm
BimanualGMMPtr rightarm_gmm
Definition: DSRTBimanualController.h:83
armarx::JSONObject
The JSONObject class is used to represent and (de)serialize JSON objects.
Definition: JSONObject.h:43
armarx::DebugObserverInterfacePrx
::IceInternal::ProxyHandle<::IceProxy::armarx::DebugObserverInterface > DebugObserverInterfacePrx
Definition: JointController.h:44
armarx::control::ds_controller::DSRTBimanualController::controllerRun
void controllerRun()
Definition: DSRTBimanualController.cpp:327
SensorValueForceTorque.h
armarx::control::ds_controller::BimanualGMMMotionGen::v_max
float v_max
Definition: DSRTBimanualController.h:98
armarx::control::ds_controller::BimanualGMMMotionGen::rightarm_Target
Eigen::Vector3f rightarm_Target
Definition: DSRTBimanualController.h:89
armarx::control::ds_controller
Definition: DSJointCarryController.cpp:28
armarx::control::ds_controller::BimanualGMMMotionGen::updateDesiredVelocity
void updateDesiredVelocity(const Eigen::Vector3f &leftarm_PositionInMeter, const Eigen::Vector3f &rightarm_PositionInMeter, float positionErrorToleranceInMeter, float desiredZ, float correction_x, float correction_y, float correction_z)
Definition: DSRTBimanualController.h:179
armarx::NJointControllerBase::ConfigPtrT
NJointControllerConfigPtr ConfigPtrT
Definition: NJointControllerBase.h:586
armarx::control::ds_controller::DSRTBimanualController::rtPreActivateController
void rtPreActivateController()
This function is called before the controller is activated.
Definition: DSRTBimanualController.cpp:947
armarx::control::ds_controller::DSRTBimanualControllerControlData::right_tcpDesiredAngularError
Eigen::Vector3f right_tcpDesiredAngularError
Definition: DSRTBimanualController.h:52
armarx::SensorAndControl
detail::ControlThreadOutputBufferEntry SensorAndControl
Definition: NJointControllerBase.h:72
armarx::control::ds_controller::DSRTBimanualController::rtPostDeactivateController
void rtPostDeactivateController()
This function is called after the controller is deactivated.
Definition: DSRTBimanualController.cpp:993
armarx::control::ds_controller::BimanualGMMMotionGen
Definition: DSRTBimanualController.h:72
armarx::control::ds_controller::BimanualGMMMotionGen::leftarm_Target
Eigen::Vector3f leftarm_Target
Definition: DSRTBimanualController.h:88
IceInternal::Handle< JSONObject >
GMRDynamics
Definition: GMRDynamics.h:20
armarx::control::ds_controller::BimanualGMMMotionGen::scaling
float scaling
Definition: DSRTBimanualController.h:97
armarx::control::ds_controller::DSRTBimanualController
Brief description of class DSRTBimanualController.
Definition: DSRTBimanualController.h:309
armarx::control::ds_controller::BimanualGMRParameters::attractor_
std::vector< double > attractor_
Definition: DSRTBimanualController.h:67
armarx::control::ds_controller::DSRTBimanualController::onPublish
void onPublish(const SensorAndControl &, const DebugDrawerInterfacePrx &, const DebugObserverInterfacePrx &)
Definition: DSRTBimanualController.cpp:866
armarx::control::ds_controller::BimanualGMMMotionGen::leftarm_gmmParas
BimanualGMRParameters leftarm_gmmParas
Definition: DSRTBimanualController.h:85
armarx::control::ds_controller::BimanualGMMMotionGen::BimanualGMMMotionGen
BimanualGMMMotionGen()
Definition: DSRTBimanualController.h:75
armarx::control::ds_controller::BimanualGMRParameters
Definition: DSRTBimanualController.h:60
armarx::control::ds_controller::BimanualGMMMotionGen::getGMMParamsFromJsonFile
void getGMMParamsFromJsonFile(const std::string &fileName)
Definition: DSRTBimanualController.h:100
armarx::control::ds_controller::DSRTBimanualController::getClassName
std::string getClassName(const Ice::Current &) const
Definition: DSRTBimanualController.h:329
ControlTarget1DoFActuator.h
armarx::control::ds_controller::DSRTBimanualController::onInitNJointController
void onInitNJointController()
Definition: DSRTBimanualController.cpp:32
armarx::control::ds_controller::DSRTBimanualControllerControlData
Definition: DSRTBimanualController.h:45
armarx::armem::Time
armarx::core::time::DateTime Time
Definition: forward_declarations.h:13
armarx::control::ds_controller::BimanualGMRParameters::Mu_
std::vector< double > Mu_
Definition: DSRTBimanualController.h:65
NJointController.h
armarx::control::ds_controller::BimanualGMRParameters::dim_
int dim_
Definition: DSRTBimanualController.h:63
GfxTL::Matrix3f
MatrixXX< 3, 3, float > Matrix3f
Definition: MatrixXX.h:600
GfxTL::Matrix4f
MatrixXX< 4, 4, float > Matrix4f
Definition: MatrixXX.h:601
armarx::control::ds_controller::BimanualGMMMotionGen::left_right_position_errorInMeter
Eigen::Vector3f left_right_position_errorInMeter
Definition: DSRTBimanualController.h:93
armarx::control::ds_controller::BimanualGMMMotionGen::rightarm_gmmParas
BimanualGMRParameters rightarm_gmmParas
Definition: DSRTBimanualController.h:86
armarx::Quaternion< float, 0 >
armarx::control::ds_controller::DSRTBimanualControllerControlData::left_right_distanceInMeter
Eigen::Vector3f left_right_distanceInMeter
Definition: DSRTBimanualController.h:54
Eigen::Matrix< float, 6, 1 >
armarx::control::ds_controller::BimanualGMMMotionGen::BimanualGMMMotionGen
BimanualGMMMotionGen(const std::string &fileName)
Definition: DSRTBimanualController.h:77
GMRDynamics.h
armarx::control::ds_controller::BimanualGMMPtr
boost::shared_ptr< GMRDynamics > BimanualGMMPtr
Definition: DSRTBimanualController.h:58
armarx::DebugDrawerInterfacePrx
::IceInternal::ProxyHandle<::IceProxy::armarx::DebugDrawerInterface > DebugDrawerInterfacePrx
Definition: JointController.h:40
armarx::control::ds_controller::BimanualGMRParameters::K_gmm_
int K_gmm_
Definition: DSRTBimanualController.h:62
SensorValue1DoFActuator.h
armarx::control::ds_controller::BimanualGMRParameters::Priors_
std::vector< double > Priors_
Definition: DSRTBimanualController.h:64
VirtualRobot::RobotPtr
std::shared_ptr< class Robot > RobotPtr
Definition: Bus.h:18
armarx::DSBimanualControllerInterface
Definition: DSControllerInterface.ice:132
armarx::DSBimanualControllerInterface::setToDefaultTarget
void setToDefaultTarget()
armarx::control::ds_controller::DSRTBimanualController::onDisconnectNJointController
void onDisconnectNJointController()
Definition: DSRTBimanualController.cpp:57
armarx::TripleBuffer< DSRTBimanualControllerSensorData >
armarx::control::ds_controller::BimanualGMMMotionGen::right_DS_DesiredVelocity
Eigen::Vector3f right_DS_DesiredVelocity
Definition: DSRTBimanualController.h:92