8#include <Ice/Current.h>
10#include <IceUtil/Time.h>
12#include <VirtualRobot/VirtualRobot.h>
19#include <RobotAPI/interface/aron/Aron.h>
20#include <RobotAPI/interface/units/RobotUnit/NJointController.h>
22#include <armarx/control/interface/ConfigurableNJointControllerInterface.h>
28 class ControlTarget1DoFActuatorPosition;
62 virtual public armarx::control::ConfigurableNJointControllerInterface
65 using ConfigPtrT = control::ConfigurableNJointControllerConfigPtr;
68 const NJointControllerConfigPtr& config,
73 void updateConfig(const ::armarx::aron::data::dto::DictPtr& dto,
74 const Ice::Current& iceCurrent = Ice::emptyCurrent)
override;
77 getConfig(const ::Ice::Current& = ::Ice::emptyCurrent)
override;
87 std::string
getClassName(
const Ice::Current& = Ice::emptyCurrent)
const override;
90 void rtRun(
const IceUtil::Time& sensorValuesTimestamp,
91 const IceUtil::Time& timeSinceLastIteration)
override;
107 std::string _rtGazeNodeName;
108 VirtualRobot::RobotNodePtr _rtYawNode;
109 VirtualRobot::RobotNodePtr _rtPitchNode;
110 VirtualRobot::RobotNodePtr _rtCameraNode;
113 armarx::ControlTarget1DoFActuatorPosition* _rtPitchCtrlTarget;
114 armarx::ControlTarget1DoFActuatorPosition* _rtYawCtrlTarget;
115 float* _rtPitchCtrlPos;
116 float* _rtYawCtrlPos;
119 mutable std::recursive_mutex _tripRt2NonRtMutex;
122 std::atomic<float> _publishCurrentPitchAngle = 0.0;
123 std::atomic<float> _publishCurrentYawAngle = 0.0;
124 std::atomic<float> _publishTargetPitchAngle = 0.0;
125 std::atomic<float> _publishTargetYawAngle = 0.0;
#define TYPEDEF_PTRS_HANDLE(T)
NJointControllerWithTripleBuffer(const Config &initialCommands=Config())
A simple triple buffer for lockfree comunication between a single writer and a single reader.
std::string getClassName(const Ice::Current &=Ice::emptyCurrent) const override
::armarx::aron::data::dto::DictPtr getConfig(const ::Ice::Current &=::Ice::emptyCurrent) override
GazeController(RobotUnitPtr robotUnit, const NJointControllerConfigPtr &config, const VirtualRobot::RobotPtr &robot)
void onPublish(const SensorAndControl &, const DebugDrawerInterfacePrx &, const DebugObserverInterfacePrx &) override
void onInitNJointController() override
~GazeController() override
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
void updateConfig(const ::armarx::aron::data::dto::DictPtr &dto, const Ice::Current &iceCurrent=Ice::emptyCurrent) override
void rtPreActivateController() override
This function is called before the controller is activated.
control::ConfigurableNJointControllerConfigPtr ConfigPtrT
std::shared_ptr< class Robot > RobotPtr
::IceInternal::Handle< Dict > DictPtr
::armarx::view_selection::gaze_targets::GazeTarget Target
This file offers overloads of toIce() and fromIce() functions for STL container types.
::IceInternal::ProxyHandle<::IceProxy::armarx::DebugObserverInterface > DebugObserverInterfacePrx
IceUtil::Handle< class RobotUnit > RobotUnitPtr
::IceInternal::ProxyHandle<::IceProxy::armarx::DebugDrawerInterface > DebugDrawerInterfacePrx
detail::ControlThreadOutputBufferEntry SensorAndControl
armarx::view_selection::gaze_controller::Target target
std::string cameraNodeName
std::string pitchNodeName
std::string gazeRootNodeName