Go to the documentation of this file.
28 #include <SimoxUtility/math/convert/mat3f_to_rpy.h>
29 #include <SimoxUtility/math/convert/mat4f_to_rpy.h>
30 #include <SimoxUtility/math/periodic/periodic_clamp.h>
31 #include <VirtualRobot/Robot.h>
40 NJointControllerRegistration<NJointHolonomicPlatformGlobalPositionController>
42 "NJointHolonomicPlatformGlobalPositionController");
47 const NJointHolonomicPlatformGlobalPositionControllerConfigPtr& cfg,
49 pid(cfg->p, cfg->i, cfg->d, cfg->maxVelocity, cfg->maxAcceleration),
53 cfg->maxRotationVelocity,
54 cfg->maxRotationAcceleration,
78 const Eigen::Vector3f rpy = simox::math::mat4f_to_rpy(global_T_robot);
79 const float global_orientation = rpy.z();
80 const Eigen::Vector2f global_P_robot = global_T_robot.block<2, 1>(0, 3);
126 const float measuredOrientation = global_orientation;
130 opid.
update(timeSinceLastIteration.toSecondsDouble(),
131 static_cast<double>(measuredOrientation),
134 const Eigen::Rotation2Df global_R_local(-measuredOrientation);
154 float translationAccuracy,
155 float rotationAccuracy)
163 simox::math::periodic_clamp(
static_cast<double>(yaw), -
M_PI,
M_PI);
const NJointHolonomicPlatformGlobalPositionControllerTarget & rtGetControlStruct() const
The SensorValueBase class.
static std::string DeviceName()
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...
void update(const double deltaSec, const PIDVectorX &measuredValue, const PIDVectorX &targetValue)
void preallocate(size_t size)
NJointHolonomicPlatformGlobalPositionControllerTarget & getWriterControlStruct()
double getControlValue() const
Transformation global_T_root
void update(double deltaSec, double measuredValue, double targetValue)
void writeControlStruct()
MutexType controlDataMutex
armarx::core::time::DateTime Time
NJointControllerRegistration< NJointHolonomicPlatformGlobalPositionController > registrationNJointHolonomicPlatformGlobalPositionController("NJointHolonomicPlatformGlobalPositionController")
const PIDVectorX & getControlValue() const
The RobotUnit class manages a robot and its controllers.
This file offers overloads of toIce() and fromIce() functions for STL container types.
const SensorValueBase * useSensorValue(const std::string &sensorDeviceName) const
Get a const ptr to the given SensorDevice's SensorValue.
std::shared_ptr< class Robot > RobotPtr