Go to the documentation of this file.
27 #include <VirtualRobot/IK/DifferentialIK.h>
28 #include <VirtualRobot/VirtualRobot.h>
33 #include <RobotAPI/interface/units/RobotUnit/NJointCartesianVelocityController.h>
73 public NJointCartesianVelocityControllerInterface
76 using ConfigPtrT = NJointCartesianVelocityControllerConfigPtr;
78 const NJointCartesianVelocityControllerConfigPtr& config,
82 std::string
getClassName(
const Ice::Current&)
const override;
87 const Ice::Current&)
override;
94 const std::map<std::string, ConstControlDevicePtr>&,
95 const std::map<std::string, ConstSensorDevicePtr>&);
97 static NJointCartesianVelocityControllerConfigPtr
100 NJointCartesianVelocityControllerConfigPtr config,
113 static ::armarx::WidgetDescription::WidgetSeq
createSliders();
114 WidgetDescription::HBoxLayoutPtr
128 std::vector<ControlTarget1DoFActuatorVelocity*> targets;
130 std::vector<const SensorValue1DoFActuatorTorque*> torqueSensors;
131 std::vector<const SensorValue1DoFGravityTorque*> gravityTorqueSensors;
132 std::vector<SimplePID> torquePIDs;
136 std::string nodeSetName;
147 float avoidJointLimitsKp,
149 const Ice::Current&)
override;
150 void setTorqueKp(
const StringFloatDictionary& torqueKp,
const Ice::Current&)
override;
152 const Ice::Current&)
override;
float update(float dt, float error)
VirtualRobot::IKSolver::CartesianSelection mode
std::map< std::string, VariantBasePtr > StringVariantBaseMap
TYPEDEF_PTRS_HANDLE(NJointCartesianNaturalPositionController)
The NJointCartesianVelocityController class.
std::vector< float > torqueKp
WidgetDescription::StringWidgetDictionary getFunctionDescriptions(const Ice::Current &) const override
void setNullspaceJointVelocities(const StringFloatDictionary &nullspaceJointVelocities, const Ice::Current &) override
std::vector< T > max(const std::vector< T > &v1, const std::vector< T > &v2)
void setTorqueKp(const StringFloatDictionary &torqueKp, const Ice::Current &) override
void callDescribedFunction(const std::string &name, const StringVariantBaseMap &valueMap, const Ice::Current &) override
::armarx::WidgetDescription::WidgetSeq createSliders()
std::shared_ptr< CartesianVelocityController > CartesianVelocityControllerPtr
std::string getNodeSetName() const
void rtRun(const IceUtil::Time &sensorValuesTimestamp, const IceUtil::Time &timeSinceLastIteration) override
TODO make protected and use attorneys.
std::string getClassName(const Ice::Current &) const override
NJointCartesianVelocityController(RobotUnit *prov, const NJointCartesianVelocityControllerConfigPtr &config, const VirtualRobot::RobotPtr &)
static VirtualRobot::IKSolver::CartesianSelection ModeFromIce(const NJointCartesianVelocityControllerMode::CartesianSelection mode)
void setAvoidJointLimitsKp(float kp)
void setVelocities(float xVel, float yVel, float zVel, float rollVel, float pitchVel, float yawVel, VirtualRobot::IKSolver::CartesianSelection mode)
void rtPostDeactivateController() override
This function is called after the controller is deactivated.
armarx::core::time::DateTime Time
static NJointCartesianVelocityControllerConfigPtr GenerateConfigFromVariants(const StringVariantBaseMap &values)
void rtPreActivateController() override
This function is called before the controller is activated.
static WidgetDescription::WidgetPtr GenerateConfigDescription(const VirtualRobot::RobotPtr &, const std::map< std::string, ConstControlDevicePtr > &, const std::map< std::string, ConstSensorDevicePtr > &)
std::vector< T > min(const std::vector< T > &v1, const std::vector< T > &v2)
The RobotUnit class manages a robot and its controllers.
std::vector< float > nullspaceJointVelocities
NJointCartesianVelocityControllerConfigPtr ConfigPtrT
static VirtualRobot::IKSolver::CartesianSelection ModeFromString(const std::string mode)
void setControllerTarget(float x, float y, float z, float roll, float pitch, float yaw, float avoidJointLimitsKp, NJointCartesianVelocityControllerMode::CartesianSelection mode, const Ice::Current &) override
static NJointCartesianVelocityControllerMode::CartesianSelection IceModeFromString(const std::string mode)
WidgetDescription::HBoxLayoutPtr createJointSlidersLayout(float min, float max, float defaultValue) const
std::vector< float > torqueKd
This file offers overloads of toIce() and fromIce() functions for STL container types.
std::shared_ptr< class Robot > RobotPtr