NJointCartesianVelocityController.cpp
Go to the documentation of this file.
1 /*
2  * This file is part of ArmarX.
3  *
4  * Copyright (C) 2011-2017, High Performance Humanoid Technologies (H2T), Karlsruhe Institute of Technology (KIT), all rights reserved.
5  *
6  * ArmarX is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 as
8  * published by the Free Software Foundation.
9  *
10  * ArmarX is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  *
18  * @package ArmarX
19  * @author Mirko Waechter( mirko.waechter at kit dot edu)
20  * @date 2017
21  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
22  * GNU General Public License
23  */
24 
26 
27 #include <VirtualRobot/Robot.h>
28 #include <VirtualRobot/RobotNodeSet.h>
29 
31 
32 #define DEFAULT_TCP_STRING "default TCP"
33 
34 namespace armarx
35 {
36 
37  NJointControllerRegistration<NJointCartesianVelocityController>
39  "NJointCartesianVelocityController");
40 
41  std::string
43  {
44  return "NJointCartesianVelocityController";
45  }
46 
48  RobotUnit* robotUnit,
49  const NJointCartesianVelocityControllerConfigPtr& config,
50  const VirtualRobot::RobotPtr& r)
51  {
53  ARMARX_CHECK_EXPRESSION(!config->nodeSetName.empty());
54  VirtualRobot::RobotNodeSetPtr rns = rtGetRobot()->getRobotNodeSet(config->nodeSetName);
55  ARMARX_CHECK_EXPRESSION(rns) << config->nodeSetName;
56  for (size_t i = 0; i < rns->getSize(); ++i)
57  {
58  std::string jointName = rns->getNode(i)->getName();
59  ControlTargetBase* ct = useControlTarget(jointName, ControlModes::Velocity1DoF);
60  const SensorValueBase* sv = useSensorValue(jointName);
61  targets.push_back(ct->asA<ControlTarget1DoFActuatorVelocity>());
62 
63  const SensorValue1DoFActuatorTorque* torqueSensor =
64  sv->asA<SensorValue1DoFActuatorTorque>();
65  const SensorValue1DoFGravityTorque* gravityTorqueSensor =
66  sv->asA<SensorValue1DoFGravityTorque>();
67  if (!torqueSensor)
68  {
69  ARMARX_WARNING << "No Torque sensor available for " << jointName;
70  }
71  if (!gravityTorqueSensor)
72  {
73  ARMARX_WARNING << "No Gravity Torque sensor available for " << jointName;
74  }
75  torqueSensors.push_back(torqueSensor);
76  gravityTorqueSensors.push_back(gravityTorqueSensor);
77  };
78 
79  VirtualRobot::RobotNodePtr tcp =
80  (config->tcpName.empty() || config->tcpName == DEFAULT_TCP_STRING)
81  ? rns->getTCP()
82  : rtGetRobot()->getRobotNode(config->tcpName);
83  ARMARX_CHECK_EXPRESSION(tcp) << config->tcpName;
84  tcpController.reset(new CartesianVelocityController(rns, tcp));
85 
86  nodeSetName = config->nodeSetName;
87 
88  torquePIDs.resize(tcpController->rns->getSize(), SimplePID());
89 
91  initData.nullspaceJointVelocities.resize(tcpController->rns->getSize(), 0);
92  initData.torqueKp.resize(tcpController->rns->getSize(), 0);
93  initData.torqueKd.resize(tcpController->rns->getSize(), 0);
94  initData.mode = ModeFromIce(config->mode);
95  reinitTripleBuffer(initData);
96  }
97 
98  void
100  {
101  }
102 
103  void
105  const IceUtil::Time& timeSinceLastIteration)
106  {
107  auto mode = rtGetControlStruct().mode;
108 
109  Eigen::VectorXf x;
110  if (mode == VirtualRobot::IKSolver::All)
111  {
112  x.resize(6);
116  }
117  else if (mode == VirtualRobot::IKSolver::Position)
118  {
119  x.resize(3);
121  }
122  else if (mode == VirtualRobot::IKSolver::Orientation)
123  {
124  x.resize(3);
127  }
128  else
129  {
130  // No mode has been set
131  return;
132  }
133 
134  Eigen::VectorXf jnv = Eigen::VectorXf::Zero(tcpController->rns->getSize());
135  float jointLimitAvoidanceKp = rtGetControlStruct().avoidJointLimitsKp;
136  if (jointLimitAvoidanceKp > 0)
137  {
138  jnv += jointLimitAvoidanceKp * tcpController->calculateJointLimitAvoidance();
139  }
140  for (size_t i = 0; i < tcpController->rns->getSize(); i++)
141  {
143  if (torqueSensors.at(i) && gravityTorqueSensors.at(i) &&
144  rtGetControlStruct().torqueKp.at(i) != 0)
145  {
146  torquePIDs.at(i).Kp = rtGetControlStruct().torqueKp.at(i);
147  torquePIDs.at(i).Kd = rtGetControlStruct().torqueKd.at(i);
148  jnv(i) += torquePIDs.at(i).update(timeSinceLastIteration.toSecondsDouble(),
149  torqueSensors.at(i)->torque -
150  gravityTorqueSensors.at(i)->gravityTorque);
151  //jnv(i) += rtGetControlStruct().torqueKp.at(i) * (torqueSensors.at(i)->torque - gravityTorqueSensors.at(i)->gravityTorque);
152  }
153  else
154  {
155  torquePIDs.at(i).lastError = 0;
156  }
157  }
158 
159  Eigen::VectorXf jointTargetVelocities = tcpController->calculate(x, jnv, mode);
160  for (size_t i = 0; i < targets.size(); ++i)
161  {
162  targets.at(i)->velocity = jointTargetVelocities(i);
163  }
164  }
165 
166  ::armarx::WidgetDescription::WidgetSeq
168  {
169  using namespace armarx::WidgetDescription;
170  ::armarx::WidgetDescription::WidgetSeq widgets;
171  auto addSlider = [&](const std::string& label, float limit)
172  {
173  widgets.emplace_back(new Label(false, label));
174  {
175  FloatSliderPtr c_x = new FloatSlider;
176  c_x->name = label;
177  c_x->min = -limit;
178  c_x->defaultValue = 0.0f;
179  c_x->max = limit;
180  widgets.emplace_back(c_x);
181  }
182  };
183 
184  addSlider("x", 100);
185  addSlider("y", 100);
186  addSlider("z", 100);
187  addSlider("roll", 0.5);
188  addSlider("pitch", 0.5);
189  addSlider("yaw", 0.5);
190  addSlider("avoidJointLimitsKp", 1);
191  return widgets;
192  }
193 
194  WidgetDescription::HBoxLayoutPtr
196  float max,
197  float defaultValue) const
198  {
199  using namespace armarx::WidgetDescription;
200  HBoxLayoutPtr layout = new HBoxLayout;
201  auto addSlider = [&](const std::string& label)
202  {
203  layout->children.emplace_back(new Label(false, label));
204  FloatSliderPtr floatSlider = new FloatSlider;
205  floatSlider->name = label;
206  floatSlider->min = min;
207  floatSlider->defaultValue = defaultValue;
208  floatSlider->max = max;
209  layout->children.emplace_back(floatSlider);
210  };
211 
212  for (const VirtualRobot::RobotNodePtr& rn : tcpController->rns->getAllRobotNodes())
213  {
214  addSlider(rn->getName());
215  }
216 
217  return layout;
218  }
219 
222  const VirtualRobot::RobotPtr& robot,
223  const std::map<std::string, ConstControlDevicePtr>& controlDevices,
224  const std::map<std::string, ConstSensorDevicePtr>&)
225  {
226  using namespace armarx::WidgetDescription;
227  HBoxLayoutPtr layout = new HBoxLayout;
228 
229  LabelPtr label = new Label;
230  label->text = "nodeset name";
231  layout->children.emplace_back(label);
232  StringComboBoxPtr box = new StringComboBox;
233  box->defaultIndex = 0;
234 
235  box->options = robot->getRobotNodeSetNames();
236  box->name = "nodeSetName";
237  layout->children.emplace_back(box);
238 
239  LabelPtr labelTCP = new Label;
240  labelTCP->text = "tcp name";
241  layout->children.emplace_back(labelTCP);
242  StringComboBoxPtr boxTCP = new StringComboBox;
243  boxTCP->defaultIndex = 0;
244 
245  boxTCP->options = robot->getRobotNodeNames();
246  boxTCP->options.insert(boxTCP->options.begin(), DEFAULT_TCP_STRING);
247  boxTCP->name = "tcpName";
248  layout->children.emplace_back(boxTCP);
249 
250  LabelPtr labelMode = new Label;
251  labelMode->text = "mode";
252  layout->children.emplace_back(labelMode);
253  StringComboBoxPtr boxMode = new StringComboBox;
254  boxMode->defaultIndex = 0;
255 
256  boxMode->options = {"Position", "Orientation", "Both"};
257  boxMode->name = "mode";
258  layout->children.emplace_back(boxMode);
259 
260 
261  // auto sliders = createSliders();
262  // layout->children.insert(layout->children.end(),
263  // sliders.begin(),
264  // sliders.end());
265  layout->children.emplace_back(new HSpacer);
266  return layout;
267  }
268 
269  NJointCartesianVelocityControllerConfigPtr
272  {
273  return new NJointCartesianVelocityControllerConfig(
274  values.at("nodeSetName")->getString(),
275  values.at("tcpName")->getString(),
276  IceModeFromString(values.at("mode")->getString()));
277  }
278 
281  {
282  //ARMARX_IMPORTANT_S << "the mode is " << mode;
283  if (mode == "Position")
284  {
286  }
287  if (mode == "Orientation")
288  {
290  }
291  if (mode == "Both")
292  {
293  return VirtualRobot::IKSolver::CartesianSelection::All;
294  }
295  ARMARX_ERROR_S << "invalid mode " << mode;
297  }
298 
301  {
302  if (mode == "Position")
303  {
305  }
306  if (mode == "Orientation")
307  {
309  }
310  if (mode == "Both")
311  {
313  }
314  ARMARX_ERROR_S << "invalid mode " << mode;
316  }
317 
321  {
323  {
325  }
327  {
329  }
331  {
332  return VirtualRobot::IKSolver::CartesianSelection::All;
333  }
334  ARMARX_ERROR_S << "invalid mode " << mode;
336  }
337 
338  void
340  float xVel,
341  float yVel,
342  float zVel,
343  float rollVel,
344  float pitchVel,
345  float yawVel,
347  {
349  getWriterControlStruct().xVel = xVel;
350  getWriterControlStruct().yVel = yVel;
351  getWriterControlStruct().zVel = zVel;
352  getWriterControlStruct().rollVel = rollVel;
353  getWriterControlStruct().pitchVel = pitchVel;
354  getWriterControlStruct().yawVel = yawVel;
355  getWriterControlStruct().mode = mode;
357  }
358 
359  void
361  {
365  }
366 
367  std::string
369  {
370  return nodeSetName;
371  }
372 
373  void
375  {
376  }
377 
380  {
381  using namespace armarx::WidgetDescription;
382  HBoxLayoutPtr layout = new HBoxLayout;
383  auto sliders = createSliders();
384  layout->children.insert(layout->children.end(), sliders.begin(), sliders.end());
385 
386  return {{"ControllerTarget", layout},
387  {"TorqueKp", createJointSlidersLayout(-1, 1, 0)},
388  {"TorqueKd", createJointSlidersLayout(-1, 1, 0)},
389  {"NullspaceJointVelocities", createJointSlidersLayout(-1, 1, 0)}};
390  }
391 
392  void
394  const StringVariantBaseMap& valueMap,
395  const Ice::Current&)
396  {
397  if (name == "ControllerTarget")
398  {
400  getWriterControlStruct().xVel = valueMap.at("x")->getFloat();
401  getWriterControlStruct().yVel = valueMap.at("y")->getFloat();
402  getWriterControlStruct().zVel = valueMap.at("z")->getFloat();
403  getWriterControlStruct().rollVel = valueMap.at("roll")->getFloat();
404  getWriterControlStruct().pitchVel = valueMap.at("pitch")->getFloat();
405  getWriterControlStruct().yawVel = valueMap.at("yaw")->getFloat();
407  valueMap.at("avoidJointLimitsKp")->getFloat();
409  }
410  else if (name == "TorqueKp")
411  {
413  for (size_t i = 0; i < tcpController->rns->getSize(); i++)
414  {
416  valueMap.at(tcpController->rns->getNode(i)->getName())->getFloat();
417  }
419  }
420  else if (name == "TorqueKd")
421  {
423  for (size_t i = 0; i < tcpController->rns->getSize(); i++)
424  {
426  valueMap.at(tcpController->rns->getNode(i)->getName())->getFloat();
427  }
429  }
430  else if (name == "NullspaceJointVelocities")
431  {
433  for (size_t i = 0; i < tcpController->rns->getSize(); i++)
434  {
436  valueMap.at(tcpController->rns->getNode(i)->getName())->getFloat();
437  }
439  }
440  else
441  {
442  ARMARX_WARNING << "Unknown function name called: " << name;
443  }
444  }
445 
446  float
447  SimplePID::update(float dt, float error)
448  {
449  float derivative = (error - lastError) / dt;
450  float retVal = Kp * error + Kd * derivative;
451  lastError = error;
452  return retVal;
453  }
454 
455 } // namespace armarx
456 
457 void
459  float x,
460  float y,
461  float z,
462  float roll,
463  float pitch,
464  float yaw,
465  float avoidJointLimitsKp,
467  const Ice::Current&)
468 {
476  getWriterControlStruct().avoidJointLimitsKp = avoidJointLimitsKp;
479 }
480 
481 void
482 armarx::NJointCartesianVelocityController::setTorqueKp(const StringFloatDictionary& torqueKp,
483  const Ice::Current&)
484 {
486  for (size_t i = 0; i < tcpController->rns->getSize(); i++)
487  {
489  torqueKp.at(tcpController->rns->getNode(i)->getName());
490  }
492 }
493 
494 void
496  const StringFloatDictionary& nullspaceJointVelocities,
497  const Ice::Current&)
498 {
500  for (size_t i = 0; i < tcpController->rns->getSize(); i++)
501  {
503  nullspaceJointVelocities.at(tcpController->rns->getNode(i)->getName());
504  }
506 }
armarx::NJointControllerWithTripleBuffer< NJointCartesianVelocityControllerControlData >::reinitTripleBuffer
void reinitTripleBuffer(const NJointCartesianVelocityControllerControlData &initial)
Definition: NJointControllerWithTripleBuffer.h:68
armarx::SimplePID::update
float update(float dt, float error)
Definition: NJointCartesianVelocityController.cpp:447
armarx::ControlTargetBase::asA
const T * asA() const
Definition: ControlTargetBase.h:76
armarx::NJointCartesianVelocityControllerControlData::rollVel
float rollVel
Definition: NJointCartesianVelocityController.h:48
armarx::NJointCartesianVelocityControllerControlData::mode
VirtualRobot::IKSolver::CartesianSelection mode
Definition: NJointCartesianVelocityController.h:56
armarx::NJointControllerBase::useSynchronizedRtRobot
const VirtualRobot::RobotPtr & useSynchronizedRtRobot(bool updateCollisionModel=false)
Requests a VirtualRobot for use in rtRun *.
Definition: NJointController.cpp:293
armarx::NJointControllerWithTripleBuffer< NJointCartesianVelocityControllerControlData >::rtGetControlStruct
const NJointCartesianVelocityControllerControlData & rtGetControlStruct() const
Definition: NJointControllerWithTripleBuffer.h:32
armarx::StringVariantBaseMap
std::map< std::string, VariantBasePtr > StringVariantBaseMap
Definition: ManagedIceObject.h:111
GfxTL::Orientation
ScalarT Orientation(const VectorXD< 2, ScalarT > &p1, const VectorXD< 2, ScalarT > &p2, const VectorXD< 2, ScalarT > &c)
Definition: Orientation.h:9
armarx::SensorValueBase::asA
const T * asA() const
Definition: SensorValueBase.h:82
armarx::SensorValueBase
The SensorValueBase class.
Definition: SensorValueBase.h:40
armarx::ControlTargetBase
Brief description of class JointControlTargetBase.
Definition: ControlTargetBase.h:47
armarx::NJointCartesianVelocityControllerControlData::torqueKp
std::vector< float > torqueKp
Definition: NJointCartesianVelocityController.h:53
armarx::WidgetDescription::StringWidgetDictionary
::std::map<::std::string, ::armarx::WidgetDescription::WidgetPtr > StringWidgetDictionary
Definition: NJointControllerBase.h:69
armarx::NJointCartesianVelocityController::getFunctionDescriptions
WidgetDescription::StringWidgetDictionary getFunctionDescriptions(const Ice::Current &) const override
Definition: NJointCartesianVelocityController.cpp:379
armarx::NJointControllerBase::useControlTarget
ControlTargetBase * useControlTarget(const std::string &deviceName, const std::string &controlMode)
Declares to calculate the ControlTarget for the given ControlDevice in the given ControlMode when rtR...
Definition: NJointController.cpp:410
armarx::NJointCartesianVelocityController::setNullspaceJointVelocities
void setNullspaceJointVelocities(const StringFloatDictionary &nullspaceJointVelocities, const Ice::Current &) override
Definition: NJointCartesianVelocityController.cpp:495
armarx::RemoteGui::Client::HSpacer
Definition: Widgets.h:209
armarx::max
std::vector< T > max(const std::vector< T > &v1, const std::vector< T > &v2)
Definition: VectorHelpers.h:267
ProsthesisInterface.values
values
Definition: ProsthesisInterface.py:190
armarx::NJointTaskSpaceDMPControllerMode::ePosition
@ ePosition
Definition: ControllerInterface.ice:36
armarx::NJointCartesianVelocityController::setTorqueKp
void setTorqueKp(const StringFloatDictionary &torqueKp, const Ice::Current &) override
Definition: NJointCartesianVelocityController.cpp:482
armarx::NJointCartesianVelocityControllerControlData::xVel
float xVel
Definition: NJointCartesianVelocityController.h:45
armarx::CartesianVelocityController
Definition: CartesianVelocityController.h:36
armarx::NJointControllerWithTripleBuffer< NJointCartesianVelocityControllerControlData >::getWriterControlStruct
NJointCartesianVelocityControllerControlData & getWriterControlStruct()
Definition: NJointControllerWithTripleBuffer.h:54
armarx::NJointCartesianVelocityController::callDescribedFunction
void callDescribedFunction(const std::string &name, const StringVariantBaseMap &valueMap, const Ice::Current &) override
Definition: NJointCartesianVelocityController.cpp:393
armarx::NJointCartesianVelocityController::createSliders
::armarx::WidgetDescription::WidgetSeq createSliders()
Definition: NJointCartesianVelocityController.cpp:167
armarx::NJointControllerWithTripleBuffer< NJointCartesianVelocityControllerControlData >::LockGuardType
std::lock_guard< std::recursive_mutex > LockGuardType
Definition: NJointControllerWithTripleBuffer.h:14
armarx::NJointCartesianVelocityControllerControlData
Definition: NJointCartesianVelocityController.h:42
armarx::NJointCartesianVelocityController::getNodeSetName
std::string getNodeSetName() const
Definition: NJointCartesianVelocityController.cpp:368
armarx::NJointCartesianVelocityController::rtRun
void rtRun(const IceUtil::Time &sensorValuesTimestamp, const IceUtil::Time &timeSinceLastIteration) override
TODO make protected and use attorneys.
Definition: NJointCartesianVelocityController.cpp:104
armarx::NJointCartesianVelocityControllerControlData::zVel
float zVel
Definition: NJointCartesianVelocityController.h:47
IceInternal::Handle
Definition: forward_declarations.h:8
armarx::NJointControllerBase::rtGetRobot
const VirtualRobot::RobotPtr & rtGetRobot()
TODO make protected and use attorneys.
Definition: NJointControllerBase.h:845
visionx::voxelgrid::Label
uint32_t Label
Type of an object label.
Definition: types.h:7
armarx::NJointCartesianVelocityControllerControlData::pitchVel
float pitchVel
Definition: NJointCartesianVelocityController.h:49
armarx::WidgetDescription
Definition: DefaultWidgetDescriptions.cpp:27
DEFAULT_TCP_STRING
#define DEFAULT_TCP_STRING
Definition: NJointCartesianVelocityController.cpp:32
armarx::RemoteGui::Client::FloatSlider
Definition: Widgets.h:107
armarx::NJointCartesianVelocityController::getClassName
std::string getClassName(const Ice::Current &) const override
Definition: NJointCartesianVelocityController.cpp:42
armarx::NJointCartesianVelocityController::NJointCartesianVelocityController
NJointCartesianVelocityController(RobotUnit *prov, const NJointCartesianVelocityControllerConfigPtr &config, const VirtualRobot::RobotPtr &)
Definition: NJointCartesianVelocityController.cpp:47
ARMARX_ERROR_S
#define ARMARX_ERROR_S
Definition: Logging.h:209
armarx::NJointCartesianVelocityController::ModeFromIce
static VirtualRobot::IKSolver::CartesianSelection ModeFromIce(const NJointCartesianVelocityControllerMode::CartesianSelection mode)
Definition: NJointCartesianVelocityController.cpp:319
armarx::NJointCartesianVelocityController::setAvoidJointLimitsKp
void setAvoidJointLimitsKp(float kp)
Definition: NJointCartesianVelocityController.cpp:360
armarx::NJointTaskSpaceDMPControllerMode::CartesianSelection
CartesianSelection
Definition: ControllerInterface.ice:34
armarx::NJointControllerWithTripleBuffer< NJointCartesianVelocityControllerControlData >::writeControlStruct
void writeControlStruct()
Definition: NJointControllerWithTripleBuffer.h:44
armarx::NJointCartesianVelocityController::setVelocities
void setVelocities(float xVel, float yVel, float zVel, float rollVel, float pitchVel, float yawVel, VirtualRobot::IKSolver::CartesianSelection mode)
Definition: NJointCartesianVelocityController.cpp:339
armarx::NJointControllerWithTripleBuffer< NJointCartesianVelocityControllerControlData >::controlDataMutex
MutexType controlDataMutex
Definition: NJointControllerWithTripleBuffer.h:73
armarx::NJointCartesianVelocityController::rtPostDeactivateController
void rtPostDeactivateController() override
This function is called after the controller is deactivated.
Definition: NJointCartesianVelocityController.cpp:374
armarx::armem::Time
armarx::core::time::DateTime Time
Definition: forward_declarations.h:13
armarx::RemoteGui::Client::HBoxLayout
Definition: Widgets.h:160
armarx::NJointCartesianVelocityController::GenerateConfigFromVariants
static NJointCartesianVelocityControllerConfigPtr GenerateConfigFromVariants(const StringVariantBaseMap &values)
Definition: NJointCartesianVelocityController.cpp:270
NJointCartesianVelocityController.h
armarx::NJointCartesianVelocityControllerControlData::avoidJointLimitsKp
float avoidJointLimitsKp
Definition: NJointCartesianVelocityController.h:52
armarx::NJointCartesianVelocityController::rtPreActivateController
void rtPreActivateController() override
This function is called before the controller is activated.
Definition: NJointCartesianVelocityController.cpp:99
ARMARX_CHECK_EXPRESSION
#define ARMARX_CHECK_EXPRESSION(expression)
This macro evaluates the expression and if it turns out to be false it will throw an ExpressionExcept...
Definition: ExpressionException.h:73
armarx::NJointTaskSpaceDMPControllerMode::eAll
@ eAll
Definition: ControllerInterface.ice:38
armarx::NJointCartesianVelocityController::GenerateConfigDescription
static WidgetDescription::WidgetPtr GenerateConfigDescription(const VirtualRobot::RobotPtr &, const std::map< std::string, ConstControlDevicePtr > &, const std::map< std::string, ConstSensorDevicePtr > &)
Definition: NJointCartesianVelocityController.cpp:221
armarx::NJointTaskSpaceDMPControllerMode::eOrientation
@ eOrientation
Definition: ControllerInterface.ice:37
armarx::min
std::vector< T > min(const std::vector< T > &v1, const std::vector< T > &v2)
Definition: VectorHelpers.h:294
armarx::RobotUnit
The RobotUnit class manages a robot and its controllers.
Definition: RobotUnit.h:180
armarx::NJointCartesianVelocityControllerControlData::nullspaceJointVelocities
std::vector< float > nullspaceJointVelocities
Definition: NJointCartesianVelocityController.h:51
armarx::NJointCartesianVelocityController::ModeFromString
static VirtualRobot::IKSolver::CartesianSelection ModeFromString(const std::string mode)
Definition: NJointCartesianVelocityController.cpp:280
armarx::NJointCartesianVelocityController::setControllerTarget
void setControllerTarget(float x, float y, float z, float roll, float pitch, float yaw, float avoidJointLimitsKp, NJointCartesianVelocityControllerMode::CartesianSelection mode, const Ice::Current &) override
Definition: NJointCartesianVelocityController.cpp:458
armarx::NJointCartesianVelocityControllerControlData::yawVel
float yawVel
Definition: NJointCartesianVelocityController.h:50
armarx::NJointCartesianVelocityController::IceModeFromString
static NJointCartesianVelocityControllerMode::CartesianSelection IceModeFromString(const std::string mode)
Definition: NJointCartesianVelocityController.cpp:300
armarx::navigation::core::Position
Eigen::Vector3f Position
Definition: basic_types.h:36
armarx::NJointCartesianVelocityController::createJointSlidersLayout
WidgetDescription::HBoxLayoutPtr createJointSlidersLayout(float min, float max, float defaultValue) const
Definition: NJointCartesianVelocityController.cpp:195
ARMARX_WARNING
#define ARMARX_WARNING
Definition: Logging.h:186
armarx::SimplePID
Definition: NJointCartesianVelocityController.h:59
armarx::NJointCartesianVelocityControllerControlData::torqueKd
std::vector< float > torqueKd
Definition: NJointCartesianVelocityController.h:54
NJointControllerRegistry.h
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28
armarx::NJointCartesianVelocityControllerControlData::yVel
float yVel
Definition: NJointCartesianVelocityController.h:46
dt
constexpr T dt
Definition: UnscentedKalmanFilterTest.cpp:42
armarx::NJointControllerBase::useSensorValue
const SensorValueBase * useSensorValue(const std::string &sensorDeviceName) const
Get a const ptr to the given SensorDevice's SensorValue.
Definition: NJointController.cpp:383
VirtualRobot::RobotPtr
std::shared_ptr< class Robot > RobotPtr
Definition: Bus.h:18
armarx::registrationControllerNJointCartesianVelocityController
NJointControllerRegistration< NJointCartesianVelocityController > registrationControllerNJointCartesianVelocityController("NJointCartesianVelocityController")