Go to the documentation of this file.
3 #include <VirtualRobot/Robot.h>
5 #include <ArmarXGui/interface/StaticPlotterInterface.h>
9 #include <RobotAPI/interface/units/RobotUnit/NJointTrajectoryController.h>
30 public NJointTrajectoryControllerInterface
34 const NJointControllerConfigPtr& config,
40 std::string
getClassName(
const Ice::Current&)
const override;
51 void setTrajectory(
const TrajectoryBasePtr& t,
const Ice::Current&)
override;
63 std::vector<ControlTarget1DoFActuatorVelocity*> targets;
64 std::vector<const SensorValue1DoFActuatorPosition*> sensors;
65 LimitlessStateSeq limitlessStates;
66 StaticPlotterInterfacePrx plotter;
69 Eigen::VectorXf currentPos;
71 float direction = 1.0;
74 NJointTrajectoryControllerConfigPtr cfg;
75 bool finished =
false;
76 double currentTimestamp = 0;
78 double startTimestamp = 0, endTimestamp = 1;
void onConnectNJointController() override
double getCurrentTimestamp(const Ice::Current &) override
TYPEDEF_PTRS_HANDLE(NJointCartesianNaturalPositionController)
void setTrajectory(const TrajectoryBasePtr &t, const Ice::Current &) override
The NJointTrajectoryController class.
void onInitNJointController() override
bool isFinished(const Ice::Current &) override
TrajectoryPtr getTrajectoryCopy() const
double getCurrentTrajTime() const
std::string getClassName(const Ice::Current &) const override
void rtPostDeactivateController() override
This function is called after the controller is deactivated.
NJointTrajectoryController(RobotUnit *prov, const NJointControllerConfigPtr &config, const VirtualRobot::RobotPtr &)
std::shared_ptr< TrajectoryController > TrajectoryControllerPtr
armarx::core::time::DateTime Time
void rtRun(const IceUtil::Time &sensorValuesTimestamp, const IceUtil::Time &timeSinceLastIteration) override
TODO make protected and use attorneys.
The RobotUnit class manages a robot and its controllers.
void setLooping(bool looping)
TrajectoryControllerPtr trajectoryCtrl
void rtPreActivateController() override
This function is called before the controller is activated.
float getCurrentProgressFraction(const Ice::Current &) override
~NJointTrajectoryController()
This file offers overloads of toIce() and fromIce() functions for STL container types.
double getTrajEndTime() const
std::shared_ptr< class Robot > RobotPtr