3#include <VirtualRobot/VirtualRobot.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;
47 void rtRun(
const IceUtil::Time& sensorValuesTimestamp,
48 const IceUtil::Time& timeSinceLastIteration)
override;
51 void setTrajectory(
const TrajectoryBasePtr& t,
const Ice::Current&)
override;
62 IceUtil::Time startTime;
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;
#define TYPEDEF_PTRS_HANDLE(T)
NJointControllerWithTripleBuffer(const NJointTrajectoryControllerControlData &initialCommands=NJointTrajectoryControllerControlData())
TrajectoryControllerPtr trajectoryCtrl
The NJointTrajectoryController class.
NJointTrajectoryController(RobotUnit *prov, const NJointControllerConfigPtr &config, const VirtualRobot::RobotPtr &)
void onInitNJointController() override
double getCurrentTrajTime() const
bool isFinished(const Ice::Current &) override
double getCurrentTimestamp(const Ice::Current &) override
double getTrajEndTime() const
~NJointTrajectoryController()
TrajectoryPtr getTrajectoryCopy() const
void rtPostDeactivateController() override
This function is called after the controller is deactivated.
void rtRun(const IceUtil::Time &sensorValuesTimestamp, const IceUtil::Time &timeSinceLastIteration) override
TODO make protected and use attorneys.
void onConnectNJointController() override
float getCurrentProgressFraction(const Ice::Current &) override
void setTrajectory(const TrajectoryBasePtr &t, const Ice::Current &) override
std::string getClassName(const Ice::Current &) const override
void setLooping(bool looping)
void rtPreActivateController() override
This function is called before the controller is activated.
The RobotUnit class manages a robot and its controllers.
std::shared_ptr< class Robot > RobotPtr
This file offers overloads of toIce() and fromIce() functions for STL container types.
::IceInternal::ProxyHandle<::IceProxy::armarx::DebugObserverInterface > DebugObserverInterfacePrx
IceInternal::Handle< Trajectory > TrajectoryPtr
std::shared_ptr< TrajectoryController > TrajectoryControllerPtr