50 NJointKinematicUnitPassThroughControllerPtr
ctrlPos;
51 NJointKinematicUnitPassThroughControllerPtr
ctrlVel;
52 NJointKinematicUnitPassThroughControllerPtr
ctrlTor;
62 std::map<std::string, ActuatorData>&& newDevs,
63 std::vector<std::set<std::string>> controlDeviceHardwareControlModeGrps,
64 std::set<std::string> controlDeviceHardwareControlModeGrpsMerged,
69 void requestJoints(
const Ice::StringSeq&,
const Ice::Current&)
override;
70 void releaseJoints(
const Ice::StringSeq&,
const Ice::Current&)
override;
72 void setJointAngles(
const NameValueMap& angles,
const Ice::Current&)
override;
74 void setJointTorques(
const NameValueMap& torques,
const Ice::Current&)
override;
75 void switchControlMode(
const NameControlModeMap& ncm,
const Ice::Current&)
override;
83 Ice::StringSeq
getJoints(
const Ice::Current&
c)
const override;
85 DebugInfo
getDebugInfo(
const Ice::Current&
c = Ice::emptyCurrent)
const override;
103 std::map<std::string, ActuatorData> devs;
106 mutable std::mutex dataMutex;
107 NameControlModeMap ctrlModes;
112 NameValueMap motorCurrents;
113 NameValueMap motorTemperatures;
114 NameStatusMap statuses;
115 std::vector<std::set<std::string>> controlDeviceHardwareControlModeGroups;
116 std::set<std::string> controlDeviceHardwareControlModeGroupsMerged;
118 std::vector<VirtualRobot::RobotNodePtr> sensorLessJoints;
120 template <
class ValueT,
class SensorValueT, ValueT SensorValueT::*Member>
122 UpdateNameValueMap(std::map<std::string, ValueT>& nvm,
123 const std::string& name,
127 const SensorValueT* s = sv->
asA<SensorValueT>();
132 const ValueT& v = s->*Member;
133 if (!nvm.count(name) || (nvm.at(name) != v))
#define TYPEDEF_PTRS_HANDLE(T)
void switchControlMode(const NameControlModeMap &ncm, const Ice::Current &) override
void setJointAngles(const NameValueMap &angles, const Ice::Current &) override
void releaseJoints(const Ice::StringSeq &, const Ice::Current &) override
void setupData(std::string relRobFile, VirtualRobot::RobotPtr rob, std::map< std::string, ActuatorData > &&newDevs, std::vector< std::set< std::string > > controlDeviceHardwareControlModeGrps, std::set< std::string > controlDeviceHardwareControlModeGrpsMerged, RobotUnit *newRobotUnit)
void requestJoints(const Ice::StringSeq &, const Ice::Current &) override
void update(const SensorAndControl &sc, const JointAndNJointControllers &c) override
void onInitKinematicUnit() override
void setJointDecelerations(const NameValueMap &, const Ice::Current &) override
NameControlModeMap getControlModes(const Ice::Current &) override
DebugInfo getDebugInfo(const Ice::Current &c=Ice::emptyCurrent) const override
void onStartKinematicUnit() override
void setJointVelocities(const NameValueMap &velocities, const Ice::Current &) override
void setJointAccelerations(const NameValueMap &, const Ice::Current &) override
void setJointTorques(const NameValueMap &torques, const Ice::Current &) override
Ice::StringSeq getJoints(const Ice::Current &c) const override
void onExitKinematicUnit() override
NameValueMap getJointAngles(const Ice::Current &) const override
NameValueMap getJointVelocities(const Ice::Current &) const override
The RobotUnit class manages a robot and its controllers.
The SensorValueBase class.
std::shared_ptr< class Robot > RobotPtr
double v(double t, double v0, double a0, double j)
This file offers overloads of toIce() and fromIce() functions for STL container types.
SynchronousNJointControllerPtr NJointControllerPtr
detail::ControlThreadOutputBufferEntry SensorAndControl
Structure used by the RobotUnit to swap lists of Joint and NJoint controllers.
NJointControllerPtr getActiveController() const
NJointKinematicUnitPassThroughControllerPtr ctrlPos
NJointControllerPtr getController(ControlMode c) const
std::size_t sensorDeviceIndex
NJointKinematicUnitPassThroughControllerPtr ctrlTor
NJointKinematicUnitPassThroughControllerPtr ctrlVel