diff --git a/etc/doxygen/pages/Components.dox b/etc/doxygen/pages/Components.dox index 023de80200bd3c6cbcadd9a163710562f4305b11..d5aa5901c10c8f836bee1dde0bd6f52d1aa323f1 100644 --- a/etc/doxygen/pages/Components.dox +++ b/etc/doxygen/pages/Components.dox @@ -1,5 +1,5 @@ /** -\addtogroup Components 5. Components +\addtogroup Components Components \defgroup RobotAPI-Components RobotAPI Components \ingroup RobotAPI Components diff --git a/etc/doxygen/pages/Overview.dox b/etc/doxygen/pages/Overview.dox index 5475ae60eb25e7a350e9d258836a893c3cedd7b0..0674f2b8497ba3c52106cab461f8ab5323062de4 100644 --- a/etc/doxygen/pages/Overview.dox +++ b/etc/doxygen/pages/Overview.dox @@ -1,7 +1,5 @@ /** \page RobotAPI-Overview RobotAPI Overview -\brief - The RobotAPI package provides a robot-intependent API that other ArmarX packages can use for accessing central functionality of a robot. The central elements of RobotAPI are Sensor-Actor Units, i.e. components responsible for the propagation of sensor values and actor targets. Sensor-Actor Units work as a link between higher level ArmarX components and the actual robot hardware or a robot simulation environment, respectively. @@ -55,4 +53,11 @@ RobotAPI also provides a GUI-plugin for robot visualization. \par \link RobotAPI-GuiPlugins Read more \endlink + + +\defgroup RobotAPI RobotAPI +\copydoc RobotAPI-Overview + +\defgroup RobotAPI-Statecharts Statecharts +\ingroup RobotAPI */ diff --git a/etc/doxygen/pages/armarpose.dox b/etc/doxygen/pages/armarpose.dox index 983134d4fcbd15d731f208208a6905139f1e408c..f4cb6eb1eb1303cb0cdea4111e39c1f53acafce4 100644 --- a/etc/doxygen/pages/armarpose.dox +++ b/etc/doxygen/pages/armarpose.dox @@ -36,7 +36,7 @@ So an example code for creating a new FramedPosition looks like this: armarx::FramedPositionPtr position = new armarx::FramedPosition(pos, frame, agentName); \endcode -\section FramedPose-ChangeFrame Change the frame of an FramedPosition +\section FramedPose-ChangeFrame Change the frame of a FramedPosition In ArmarX the most common coordinate type is the FramedX, e.g. FramedPosition. To change the frame in this coordinate type, you can call \ref armarx::FramedPosition::changeFrame "changeFrame()" on the FramedPosition. You need to know the new frame, in which you want to have the diff --git a/source/RobotAPI/components/DebugDrawer/DebugDrawerComponent.h b/source/RobotAPI/components/DebugDrawer/DebugDrawerComponent.h index 0ccd7836f79902f2cabe4021d8e89adeda37c606..6b31222ef1e726cbe7de04b32f0e708a3d057bc0 100644 --- a/source/RobotAPI/components/DebugDrawer/DebugDrawerComponent.h +++ b/source/RobotAPI/components/DebugDrawer/DebugDrawerComponent.h @@ -63,7 +63,7 @@ public: }; /*! - * \class DebugDrawerComponent + * \defgroup Component-DebugDrawerComponent DebugDrawerComponent * \ingroup RobotAPI-Components * \brief Visualizes debug information. * @@ -94,6 +94,11 @@ public: } \endcode */ + +/** + * @brief The DebugDrawerComponent class + * @ingroup Component-DebugDrawerComponent + */ class DebugDrawerComponent : virtual public armarx::DebugDrawerInterface, virtual public Component diff --git a/source/RobotAPI/components/RobotState/RobotStateComponent.h b/source/RobotAPI/components/RobotState/RobotStateComponent.h index e3c8db3ea6b38a78b4ce81b6abfe8ace93f5538e..6e74c02c23ab540f26c7c318a131b0f78e38584a 100644 --- a/source/RobotAPI/components/RobotState/RobotStateComponent.h +++ b/source/RobotAPI/components/RobotState/RobotStateComponent.h @@ -56,7 +56,7 @@ namespace armarx /** - * \class RobotStateComponent + * \defgroup Component-RobotStateComponent RobotStateComponent * \ingroup RobotAPI-Components * \brief Maintains a robot representation based on VirtualRobot (see [Simox](http://simox.sourceforge.net/)). * @@ -71,6 +71,11 @@ namespace armarx * to calculate on the same values. * See \ref armarx::RemoteRobot "RemoteRobot" for more details and the usage of this component. */ + + /** + * @brief The RobotStateComponent class + * @ingroup Component-RobotStateComponent + */ class ARMARXCOMPONENT_IMPORT_EXPORT RobotStateComponent : virtual public Component, virtual public RobotStateComponentInterface diff --git a/source/RobotAPI/components/RobotState/SharedRobotServants.h b/source/RobotAPI/components/RobotState/SharedRobotServants.h index cff51585f49e312ce5034a8881dec38ba4705fdf..ba01ebe81ef083154b73f054396f66fa3199dae9 100644 --- a/source/RobotAPI/components/RobotState/SharedRobotServants.h +++ b/source/RobotAPI/components/RobotState/SharedRobotServants.h @@ -41,10 +41,10 @@ namespace armarx { /** * @brief The SharedRobotNodeServant class is a remote represenation of a Simox VirtualRobot::Robot - * + * @ingroup Component-RobotStateComponent * @details This class is used only internally by the the RobotStateComponent. Other classes such as the LinkedPose, RemoteRobot, * TCPControlUnit and HeadIKUnit classes address this class by the SharedRobotNodeInterface and SharedRobotNodeInterfacePrx generated by - * ICE. + * Ice. */ class SharedRobotNodeServant : virtual public SharedRobotNodeInterface, @@ -81,6 +81,7 @@ namespace armarx { }; /** + * @ingroup Component-RobotStateComponent * @brief The SharedRobotNodeServant class is a remote represenation of a Simox VirtualRobot::Robot * * @details This class is used only internally by the the RobotStateComponent. The RemoteRobot class SharedRobotInterface and SharedRobotInterfacePrx diff --git a/source/RobotAPI/components/units/ForceTorqueUnit.h b/source/RobotAPI/components/units/ForceTorqueUnit.h index 947a4b60431ec9731130476dd58e65d0a706d670..fbe8b41b701a59f3b468ef7ba05fabebd28ddd18 100644 --- a/source/RobotAPI/components/units/ForceTorqueUnit.h +++ b/source/RobotAPI/components/units/ForceTorqueUnit.h @@ -54,7 +54,7 @@ namespace armarx }; /** - * \class ForceTorqueUnit + * \defgroup Component-ForceTorqueUnit ForceTorqueUnit * \ingroup RobotAPI-SensorActorUnits * \brief Base unit for force/torque sensors. * @@ -63,6 +63,11 @@ namespace armarx * RobotAPI contains the ForceTorqueUnitSimulation class that does a very basic simulation of F/T-sensors. * Other (hardware related) implementations of this unit can be found in the respective ArmarX projects. */ + + /** + * @ingroup Component-ForceTorqueUnit + * @brief The ForceTorqueUnit class + */ class ForceTorqueUnit : virtual public ForceTorqueUnitInterface, virtual public SensorActorUnit diff --git a/source/RobotAPI/components/units/HandUnit.h b/source/RobotAPI/components/units/HandUnit.h index d68c4f5f7f6002ca722ae4a55c2c016f7a528dde..6bc729ddc7442585926aeaeffe4c73cdcbcd6581 100644 --- a/source/RobotAPI/components/units/HandUnit.h +++ b/source/RobotAPI/components/units/HandUnit.h @@ -60,7 +60,7 @@ namespace armarx /** - * \class HandUnit + * @ingroup Component-HandUnit HandUnit * \brief Base unit for high-level access to robot hands. * \ingroup RobotAPI-SensorActorUnits * @@ -68,6 +68,11 @@ namespace armarx * It uses the HandUnitListener Ice interface to report updates of its current state * */ + + /** + * @brief The HandUnit class + * @ingroup Component-HandUnit + */ class HandUnit : virtual public HandUnitInterface, virtual public SensorActorUnit diff --git a/source/RobotAPI/components/units/HapticUnit.h b/source/RobotAPI/components/units/HapticUnit.h index a5837e80024d9afece25ba2e8334ba81b7a32175..e3aefb2e7eca0579541804d5faad3fc64cc8acf9 100644 --- a/source/RobotAPI/components/units/HapticUnit.h +++ b/source/RobotAPI/components/units/HapticUnit.h @@ -49,10 +49,15 @@ namespace armarx }; /** - * \class HapticUnit + * \defgroup Component-HapticUnit HapticUnit * \ingroup RobotAPI-SensorActorUnits * \brief Base unit for haptic sensors. */ + + /** + * @ingroup Component-HapticUnit + * @brief The HapticUnit class + */ class HapticUnit : virtual public HapticUnitInterface, virtual public SensorActorUnit diff --git a/source/RobotAPI/components/units/HeadIKUnit.h b/source/RobotAPI/components/units/HeadIKUnit.h index 0805fd78086eddc33e87e2b5c4bd49e71a112049..2ecd2dbd3c55e0e79a79123ed835f8e74eb416e8 100644 --- a/source/RobotAPI/components/units/HeadIKUnit.h +++ b/source/RobotAPI/components/units/HeadIKUnit.h @@ -52,10 +52,15 @@ namespace armarx }; /** - * \class HeadIKUnit + * \defgroup Component-HeadIKUnit HeadIKUnit * \ingroup RobotAPI-SensorActorUnits * \brief Unit for controlling a robot head via IK targets. */ + + /** + * @ingroup Component-HeadIKUnit + * @brief The HeadIKUnit class + */ class HeadIKUnit : virtual public Component, virtual public HeadIKUnitInterface { public: diff --git a/source/RobotAPI/components/units/KinematicUnit.cpp b/source/RobotAPI/components/units/KinematicUnit.cpp index e6de3483d47f4f83f2b6cbce3a3e752478bb6f6d..1de87940111bbb4323e48b7c0bec22c524daa21f 100644 --- a/source/RobotAPI/components/units/KinematicUnit.cpp +++ b/source/RobotAPI/components/units/KinematicUnit.cpp @@ -29,6 +29,7 @@ #include <VirtualRobot/VirtualRobotException.h> #include <VirtualRobot/RuntimeEnvironment.h> #include <ArmarXCore/core/system/ArmarXDataPath.h> +#include <ArmarXCore/core/system/cmake/CMakePackageFinder.h> using namespace armarx; @@ -40,7 +41,22 @@ void KinematicUnit::onInitComponent() std::string robotFile = getProperty<std::string>("RobotFileName").getValue(); robotNodeSetName = getProperty<std::string>("RobotNodeSetName").getValue(); - if (!ArmarXDataPath::getAbsolutePath(robotFile,robotFile)) + std::string project = getProperty<std::string>("RobotFileNameProject").getValue(); + StringList includePaths; + + if (!project.empty()) + { + CMakePackageFinder finder(project); + StringList projectIncludePaths; + auto pathsString = finder.getDataDir(); + boost::split(projectIncludePaths, + pathsString, + boost::is_any_of(";,"), + boost::token_compress_on); + includePaths.insert(includePaths.end(), projectIncludePaths.begin(), projectIncludePaths.end()); + } + + if (!ArmarXDataPath::getAbsolutePath(robotFile,robotFile,includePaths)) { throw UserException("Could not find robot file " + robotFile); } diff --git a/source/RobotAPI/components/units/KinematicUnit.h b/source/RobotAPI/components/units/KinematicUnit.h index 5a94b5a6717c8da81e4d9ee37b56476a96ed9336..e91ef47c346be52b73d4ea0dd8aa1487042b2628 100644 --- a/source/RobotAPI/components/units/KinematicUnit.h +++ b/source/RobotAPI/components/units/KinematicUnit.h @@ -49,12 +49,13 @@ namespace armarx { defineRequiredProperty<std::string>("RobotNodeSetName","Robot node set name as defined in robot xml file, e.g. 'LeftArm'"); defineRequiredProperty<std::string>("RobotFileName", "Robot file name, e.g. robot_model.xml"); + defineOptionalProperty<std::string>("RobotFileNameProject", "", "Project in which the robot filename is located (if robot is loaded from an external project)"); } }; /** - * \class KinematicUnit + * \defgroup Component-KinematicUnit KinematicUnit * \ingroup RobotAPI-SensorActorUnits * \brief Base unit for kinematic sensors and actors. * @@ -64,6 +65,11 @@ namespace armarx * The KinematicUnit retrieves its configuration from a VirtualRobot robot model. Within the model, the joints, the unit * controls are defined with a RobotNodeSet. */ + + /** + * @ingroup Component-KinematicUnit + * @brief The KinematicUnit class + */ class KinematicUnit : virtual public KinematicUnitInterface, virtual public SensorActorUnit diff --git a/source/RobotAPI/components/units/KinematicUnitObserver.cpp b/source/RobotAPI/components/units/KinematicUnitObserver.cpp index f940879f99083b494d917cdff63b2fd5a2f6a4d7..65ab623d4393bad0a661c86f1843171cf4851f52 100644 --- a/source/RobotAPI/components/units/KinematicUnitObserver.cpp +++ b/source/RobotAPI/components/units/KinematicUnitObserver.cpp @@ -30,6 +30,7 @@ #include <ArmarXCore/observers/checks/ConditionCheckSmaller.h> #include <ArmarXCore/observers/variant/ChannelRef.h> #include <ArmarXCore/core/system/ArmarXDataPath.h> +#include <ArmarXCore/core/system/cmake/CMakePackageFinder.h> #include <VirtualRobot/VirtualRobot.h> #include <VirtualRobot/XML/RobotIO.h> @@ -63,9 +64,22 @@ void KinematicUnitObserver::onConnectObserver() // read names of kinematic chain elements belonging to this unit from XML and setup a map of all joints // the kinematic chain elements belonging to this unit are defined in a RobotNodeSet std::string robotFile = getProperty<std::string>("RobotFileName").getValue(); + std::string project = getProperty<std::string>("RobotFileNameProject").getValue(); + StringList includePaths; + if (!project.empty()) + { + CMakePackageFinder finder(project); + StringList projectIncludePaths; + auto pathsString = finder.getDataDir(); + boost::split(projectIncludePaths, + pathsString, + boost::is_any_of(";,"), + boost::token_compress_on); + includePaths.insert(includePaths.end(), projectIncludePaths.begin(), projectIncludePaths.end()); + } - if (!ArmarXDataPath::getAbsolutePath(robotFile,robotFile)) + if (!ArmarXDataPath::getAbsolutePath(robotFile,robotFile,includePaths)) { throw UserException("Could not find robot file " + robotFile); } diff --git a/source/RobotAPI/components/units/PlatformUnit.h b/source/RobotAPI/components/units/PlatformUnit.h index 1d46043a134842fcb8415ac86d126f828852aa05..8d2b53baa04461d0f856a7cee4faa6c808c00c38 100644 --- a/source/RobotAPI/components/units/PlatformUnit.h +++ b/source/RobotAPI/components/units/PlatformUnit.h @@ -51,7 +51,7 @@ namespace armarx /** - * \class PlatformUnit + * \defgroup Component-PlatformUnit PlatformUnit * \ingroup RobotAPI-SensorActorUnits * \brief Base unit for high-level access to robot platforms. * @@ -59,6 +59,11 @@ namespace armarx * An instance of a PlatformUnit provides means to set target positions. * It uses the PlatformUnitListener Ice interface to report updates of its current state. */ + + /** + * @ingroup Component-PlatformUnit + * @brief The PlatformUnit class + */ class PlatformUnit : virtual public PlatformUnitInterface, virtual public SensorActorUnit diff --git a/source/RobotAPI/components/units/TCPControlUnit.h b/source/RobotAPI/components/units/TCPControlUnit.h index 6b585979dd667e4b50118375038a421c82c7fd71..d585c73fa6e9f59412fe8c3014825692f52420b9 100644 --- a/source/RobotAPI/components/units/TCPControlUnit.h +++ b/source/RobotAPI/components/units/TCPControlUnit.h @@ -57,7 +57,7 @@ namespace armarx }; /** - * \class TCPControlUnit + * \defgroup Component-TCPControlUnit TCPControlUnit * \ingroup RobotAPI-SensorActorUnits * \brief Unit for controlling a tool center point (TCP). * @@ -74,6 +74,11 @@ namespace armarx * * \note After usage release() **must** be called to stop the recalcuation and setting of joint velocities. */ + + /** + * @ingroup Component-TCPControlUnit + * @brief The TCPControlUnit class + */ class TCPControlUnit : virtual public Component, virtual public TCPControlUnitInterface