diff --git a/source/RobotAPI/components/robotstate/RobotStateComponent.h b/source/RobotAPI/components/robotstate/RobotStateComponent.h index 8bd87085c81106b0ad350afb710968073d510f56..8d46f163a682c720bedc4d12bad68721374899c5 100644 --- a/source/RobotAPI/components/robotstate/RobotStateComponent.h +++ b/source/RobotAPI/components/robotstate/RobotStateComponent.h @@ -59,38 +59,31 @@ namespace armarx * @class RobotStateComponent * @ingroup Components * The RobotStateComponent creates an internal robot representation from - * a VirtualRobot XML file. + * a VirtualRobot (see [Simox](http://simox.sourceforge.net/)) XML file. * Upon request, an Ice proxy to a shared instance of this internal robot * can be acquired through a call to RobotStateComponent::getSynchronizedRobot(). * Additionally it is possible to retrieve a proxy for robot snapshot with * RobotStateComponent::getRobotSnapshot(). * While the synchronized robot will constantly update its internal state - * the robot snapshot is a clone of the original robot an won't update its - * configuration over time. - * See \ref remoterobot for more details and the usage of this component. + * the robot snapshot is a clone of the original robot and won't update its + * configuration over time. This is useful, if several components need + * to calculate on the same values. + * See \ref armarx::RemoteRobot "RemoteRobot" for more details and the usage of this component. */ class ARMARXCOMPONENT_IMPORT_EXPORT RobotStateComponent : virtual public Component, virtual public RobotStateComponentInterface { public: - // inherited from KinematicUnitInterface - void reportControlModeChanged(const NameControlModeMap& jointModes, bool aValueChanged, const Ice::Current& c = ::Ice::Current()); - void reportJointAngles(const NameValueMap& jointAngles, bool aValueChanged, const Ice::Current& c = ::Ice::Current()); - void reportJointVelocities(const NameValueMap& jointVelocities, bool aValueChanged, const Ice::Current& c = ::Ice::Current()); - void reportJointTorques(const NameValueMap& jointTorques, bool aValueChanged, const Ice::Current& c = ::Ice::Current()); - void reportJointAccelerations(const NameValueMap& jointAccelerations, bool aValueChanged, const Ice::Current& c); - void reportJointCurrents(const NameValueMap& jointCurrents, bool aValueChanged, const Ice::Current& c = ::Ice::Current()); - void reportJointMotorTemperatures(const NameValueMap& jointMotorTemperatures, bool aValueChanged, const Ice::Current& c = ::Ice::Current()); - void reportJointStatuses(const NameStatusMap& jointStatuses, bool aValueChanged, const Ice::Current& c = ::Ice::Current()); + /** - * \return SharedRobotInterface proxy to the internal synchronized robot (gets created upon first call) + * \return SharedRobotInterface proxy to the internal synchronized robot. */ virtual SharedRobotInterfacePrx getSynchronizedRobot(const Ice::Current&) const; /** - * \return clone of the internal synchronized robot + * \return Clone of the internal synchronized robot. */ virtual SharedRobotInterfacePrx getRobotSnapshot(const std::string & time, const Ice::Current&); @@ -99,6 +92,10 @@ namespace armarx */ virtual std::string getRobotFilename(const Ice::Current&) const; + /** + * + * \return The name of this robot instance. + */ virtual std::string getRobotName(const Ice::Current &) const; /** @@ -127,6 +124,16 @@ namespace armarx * Calls unref() on RobotStateComponent::_synchronizedPrx. */ virtual ~RobotStateComponent(); + + // inherited from KinematicUnitInterface + void reportControlModeChanged(const NameControlModeMap& jointModes, bool aValueChanged, const Ice::Current& c = ::Ice::Current()); + void reportJointAngles(const NameValueMap& jointAngles, bool aValueChanged, const Ice::Current& c = ::Ice::Current()); + void reportJointVelocities(const NameValueMap& jointVelocities, bool aValueChanged, const Ice::Current& c = ::Ice::Current()); + void reportJointTorques(const NameValueMap& jointTorques, bool aValueChanged, const Ice::Current& c = ::Ice::Current()); + void reportJointAccelerations(const NameValueMap& jointAccelerations, bool aValueChanged, const Ice::Current& c); + void reportJointCurrents(const NameValueMap& jointCurrents, bool aValueChanged, const Ice::Current& c = ::Ice::Current()); + void reportJointMotorTemperatures(const NameValueMap& jointMotorTemperatures, bool aValueChanged, const Ice::Current& c = ::Ice::Current()); + void reportJointStatuses(const NameStatusMap& jointStatuses, bool aValueChanged, const Ice::Current& c = ::Ice::Current()); private: SharedRobotInterfacePrx _synchronizedPrx; SharedRobotServantPtr _sharedRobotServant; diff --git a/source/RobotAPI/components/units/TCPControlUnit.h b/source/RobotAPI/components/units/TCPControlUnit.h index 60f455365f07c237ebc1eba9835b72029eef2167..a63f4b17b07ef313594c6433c3e8a2bc76753fbc 100644 --- a/source/RobotAPI/components/units/TCPControlUnit.h +++ b/source/RobotAPI/components/units/TCPControlUnit.h @@ -67,7 +67,7 @@ namespace armarx { * updates the joint velocities. To set another cycle time use setCycleTime(). * To set the velocity for a node use setTCPVelocity. Calling setTCPVelocity again with another nodeset * will add this nodeset to the list of currently controlled TCPs. - * @node After usage release() must be called to stop the recalcuation and setting of joint velocities. + * @node After usage release() **must** be called to stop the recalcuation and setting of joint velocities. */ class TCPControlUnit : @@ -127,14 +127,15 @@ namespace armarx { // UnitResourceManagementInterface interface /** - * @brief Triggers the calculation loop for using cartesian velocity. Call once before setting a tcp velocity, with SetTCPVelocity. + * @brief Triggers the calculation loop for using cartesian velocity. Call once before/after setting a tcp velocity with SetTCPVelocity. * @param c Ice Context, leave blank. */ void request(const Ice::Current &c = Ice::Current()); /** * @brief Releases and stops the recalculation and updating of joint velocities. - * Call always when finished with cartesian control. + * Call always when finished with cartesian control. The target velocity values of + * all node set will be deleted in this function. * @param c Ice Context, leave blank. */ void release(const Ice::Current &c = Ice::Current()); diff --git a/source/RobotAPI/libraries/core/remoterobot/RemoteRobot.h b/source/RobotAPI/libraries/core/remoterobot/RemoteRobot.h index fd7af89c404901bd64c3ce7358f74fc3ecf69a22..bbe6f70b96938faa938666c52776dba25aa77964 100644 --- a/source/RobotAPI/libraries/core/remoterobot/RemoteRobot.h +++ b/source/RobotAPI/libraries/core/remoterobot/RemoteRobot.h @@ -163,6 +163,10 @@ namespace armarx virtual VirtualRobot::RobotNodeSetPtr getRobotNodeSet(const std::string &nodeSetName); virtual void getRobotNodeSets(std::vector<VirtualRobot::RobotNodeSetPtr> &storeNodeSet); + /** + * + * @return Global pose of the robot + */ virtual Eigen::Matrix4f getGlobalPose(); @@ -215,7 +219,11 @@ namespace armarx virtual void deregisterRobotNodeSet(VirtualRobot::RobotNodeSetPtr nodeSet); /// Not implemented yet virtual void registerEndEffector(VirtualRobot::EndEffectorPtr endEffector); - /// Not implemented yet + /** + * @brief Sets the global pose of the robot. + * @param globalPose new global pose + * @param applyValues No effect. Will be always applied. + */ virtual void setGlobalPose(const Eigen::Matrix4f &globalPose, bool applyValues = true); VirtualRobot::RobotNodePtr createLocalNode(SharedRobotNodeInterfacePrx remoteNode, std::vector<VirtualRobot::RobotNodePtr> &allNodes, std::map<VirtualRobot::RobotNodePtr, std::vector<std::string> > &childrenMap, VirtualRobot::RobotPtr robo);