diff --git a/CMakeLists.txt b/CMakeLists.txt index 7883e3c69d586e3016f35bc3d7cccdf334d1fd07..19d6498c21e86f3eb2beeaff748c61a582a631fc 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,4 +1,4 @@ -# HumanoidRobotAPI +# RobotAPI cmake_minimum_required(VERSION 2.8) @@ -10,7 +10,7 @@ find_package("ArmarXCore" REQUIRED include(${ArmarXCore_CMAKE_DIR}/ArmarXProject.cmake) -armarx_project("HumanoidRobotAPI") +armarx_project("RobotAPI") add_subdirectory(source) diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index 82feb6142590b59559f191e169e92b0c0e8311df..e4d27c6874f1e04fd2cec70d6f2c68375cf8e946 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -1,2 +1,2 @@ -add_subdirectory(HumanoidRobotAPI) +add_subdirectory(RobotAPI) diff --git a/source/HumanoidRobotAPI/CMakeLists.txt b/source/RobotAPI/CMakeLists.txt similarity index 100% rename from source/HumanoidRobotAPI/CMakeLists.txt rename to source/RobotAPI/CMakeLists.txt diff --git a/source/HumanoidRobotAPI/applications/CMakeLists.txt b/source/RobotAPI/applications/CMakeLists.txt similarity index 100% rename from source/HumanoidRobotAPI/applications/CMakeLists.txt rename to source/RobotAPI/applications/CMakeLists.txt diff --git a/source/HumanoidRobotAPI/applications/MotionControlTest/CMakeLists.txt b/source/RobotAPI/applications/MotionControlTest/CMakeLists.txt similarity index 100% rename from source/HumanoidRobotAPI/applications/MotionControlTest/CMakeLists.txt rename to source/RobotAPI/applications/MotionControlTest/CMakeLists.txt diff --git a/source/HumanoidRobotAPI/applications/MotionControlTest/MotionControlTestApp.h b/source/RobotAPI/applications/MotionControlTest/MotionControlTestApp.h similarity index 87% rename from source/HumanoidRobotAPI/applications/MotionControlTest/MotionControlTestApp.h rename to source/RobotAPI/applications/MotionControlTest/MotionControlTestApp.h index d8f4cd26191ee9d757da402d07a2301b6b26e354..abac52768b1f277e1da164066332e9f3119d5cbc 100755 --- a/source/HumanoidRobotAPI/applications/MotionControlTest/MotionControlTestApp.h +++ b/source/RobotAPI/applications/MotionControlTest/MotionControlTestApp.h @@ -23,7 +23,7 @@ #include <Core/core/application/Application.h> -#include <HumanoidRobotAPI/motioncontrol/MotionControl.h> +#include <RobotAPI/motioncontrol/MotionControl.h> namespace armarx { @@ -32,10 +32,10 @@ namespace armarx { void setup(const ManagedIceObjectRegistryInterfacePtr& registry, Ice::PropertiesPtr properties) { - registry->addObject( Component::create<MoveHelpers::MotionControlHandler>(properties) ); - }; + registry->addObject( Component::create<MotionControl::MotionControlHandler>(properties) ); + } }; -}; +} diff --git a/source/HumanoidRobotAPI/core/CMakeLists.txt b/source/RobotAPI/core/CMakeLists.txt similarity index 100% rename from source/HumanoidRobotAPI/core/CMakeLists.txt rename to source/RobotAPI/core/CMakeLists.txt diff --git a/source/HumanoidRobotAPI/core/RobotStatechartContext.cpp b/source/RobotAPI/core/RobotStatechartContext.cpp similarity index 100% rename from source/HumanoidRobotAPI/core/RobotStatechartContext.cpp rename to source/RobotAPI/core/RobotStatechartContext.cpp diff --git a/source/HumanoidRobotAPI/core/RobotStatechartContext.h b/source/RobotAPI/core/RobotStatechartContext.h similarity index 100% rename from source/HumanoidRobotAPI/core/RobotStatechartContext.h rename to source/RobotAPI/core/RobotStatechartContext.h diff --git a/source/HumanoidRobotAPI/motioncontrol/CMakeLists.txt b/source/RobotAPI/motioncontrol/CMakeLists.txt similarity index 100% rename from source/HumanoidRobotAPI/motioncontrol/CMakeLists.txt rename to source/RobotAPI/motioncontrol/CMakeLists.txt diff --git a/source/HumanoidRobotAPI/motioncontrol/MotionControl.cpp b/source/RobotAPI/motioncontrol/MotionControl.cpp similarity index 99% rename from source/HumanoidRobotAPI/motioncontrol/MotionControl.cpp rename to source/RobotAPI/motioncontrol/MotionControl.cpp index 27e192fe34e1d0b4dc90d48de0f7a34612cee7c2..649fe4b0db2f23121291b260b9bf88658d4606be 100644 --- a/source/HumanoidRobotAPI/motioncontrol/MotionControl.cpp +++ b/source/RobotAPI/motioncontrol/MotionControl.cpp @@ -13,7 +13,7 @@ #include <Eigen/src/Geometry/Quaternion.h> using namespace armarx; -using namespace armarx::MoveHelpers; +using namespace armarx::MotionControl; MotionControlHandler::MotionControlHandler() { @@ -648,7 +648,7 @@ void MotionControlTestStateIK::defineSubstates() -void MoveHelpers::StopRobot::onEnter() +void MotionControl::StopRobot::onEnter() { RobotStatechartContext* context = getContext<RobotStatechartContext>(); diff --git a/source/HumanoidRobotAPI/motioncontrol/MotionControl.h b/source/RobotAPI/motioncontrol/MotionControl.h similarity index 81% rename from source/HumanoidRobotAPI/motioncontrol/MotionControl.h rename to source/RobotAPI/motioncontrol/MotionControl.h index 850621e83bc568fa7a764a0183c77afd49e66a20..fb63e94d8bce3765e891790e75891c782ea98b2a 100644 --- a/source/HumanoidRobotAPI/motioncontrol/MotionControl.h +++ b/source/RobotAPI/motioncontrol/MotionControl.h @@ -2,43 +2,46 @@ #define MOTIONCONTROL_H #include <Core/statechart/Statechart.h> -#include <HumanoidRobotAPI/core/RobotStatechartContext.h> +#include <RobotAPI/core/RobotStatechartContext.h> namespace armarx { -namespace MoveHelpers +namespace MotionControl { /** - \defgroup MoveHelpers ArmarX MoveHelpers - \section Overview Overview of the implemented functions in MoveHelpers - The following functionality is available in the MoveHelpers: - - Direct kinematics: move joints to a desired configuration (armarx::MoveHelpers::MoveJoints) - - Velocity control: set the desired velocities for joints (armarx::MoveHelpers::MoveJointsVelocityControl) - - Inverse kinematics: move the TCP of a kinematic chain to a desired pose (armarx::MoveHelpers::MoveTCPPoseIK) - - Trajectory: move the TCP of a kinematic chain along a trajectory defined by a list of poses (armarx::MoveHelpers::MoveTCPTrajectory) - - Stop: stop all motion of the robot (armarx::MoveHelpers::StopRobot) + \defgroup MotionControl ArmarX MotionControl + \section Overview Overview of the implemented functionality in MotionControl + All functionality is implemented with State to provide a convenient interface + for the non-instant move functions (States receive events when desired targets + are reached).<br/> + The following functionality is available in the MotionControl: + - Direct kinematics: move joints to a desired configuration (armarx::MotionControl::MoveJoints) + - Velocity control: set the desired velocities for joints (armarx::MotionControl::MoveJointsVelocityControl) + - Inverse kinematics: move the TCP of a kinematic chain to a desired pose (armarx::MotionControl::MoveTCPPoseIK) + - Trajectory: move the TCP of a kinematic chain along a trajectory defined by a list of poses (armarx::MotionControl::MoveTCPTrajectory) + - Stop: stop all motion of the robot (armarx::MotionControl::StopRobot) \section HowTo How to use the states - To use one of the Move Helpers state, you have to make it a substate of your own state (see Statechart). To set its parameters, - you can either modify the configuration file (${ArmarX_Home}/data/HumanoidRobotAPIConfigs/stateconfigs/MotionControl.xml) or map them from you own state to it. + To use one of the MotionControl states, you have to make it a substate of your own state (see ArmarXCore::Statechart). To set its parameters, + map them from you own state to it. The standard configuration is set in file ${ArmarX_Home}/data/HumanoidRobotAPIConfigs/stateconfigs/MotionControl.xml. - Two kinds of kinematic entities are controlled using the MoveHelpers: single joints and kinematic chains. A kinematic chain is a list of joints + Two kinds of kinematic entities are controlled using the MotionControl: single joints and kinematic chains. A kinematic chain is a list of joints that usually belong to a part of the robot, e.g. an arm. The joints and the kinematic chains are all defined in the xml files that describe the - kinematic model of the robot (data/ArmarIV/RobotModel/ArmarIV.xml and the files for the subparts). Look in these files to find out the name of + kinematic model of the robot (e.g. ${ArmarX_Home/data/ArmarIV/RobotModel/ArmarIV.xml and the files for the subparts). Look in these files to find out the name of the joint or kinematic chain you want to move. - \subsection UsingMoveJoints Using armarx::MoveHelpers::MoveJoints + \subsection UsingMoveJoints Using armarx::MotionControl::MoveJoints This state moves the specified joints to the desired configuration. Input parameters: - jointNames: the names of the joints to be moved - targetJointValues: the desired joint values - targetTolerance: tolerance defining how precisely the joint position has to be reached - - timeoutInMs: a timout after which the attempt to move is aborted + - timeoutInMs: a timeout after which the attempt to move is aborted Output parameters: - jointDistancesToTargets: the distance of each joint to the desired configuration - \subsection UsingMoveJointsVelocityControl Using armarx::MoveHelpers::MoveJointsVelocityControl + \subsection UsingMoveJointsVelocityControl Using armarx::MotionControl::MoveJointsVelocityControl This state moves the specified joints with the desired velocity. Input parameters: - jointNames: the names of the joints to be moved @@ -48,7 +51,7 @@ namespace MoveHelpers Output parameters: - jointVelocitiesDistancesToTargets: the difference between the desired and actual joint velocities - \subsection UsingMoveTCPPoseIK Using armarx::MoveHelpers::MoveTCPPoseIK + \subsection UsingMoveTCPPoseIK Using armarx::MotionControl::MoveTCPPoseIK Moves the TCP of the specified kinematic chain to the desired pose if possible. Input parameters: - kinematicChainName: the name of the kinematic chain that is used @@ -61,7 +64,7 @@ namespace MoveHelpers - TCPDistanceToTarget: kartesian distance between TCP and target position - TCPOrientationDistanceToTarget: the difference between desired and actual orientation of the TCP - \subsection UsingMoveTCPTrajectory Using armarx::MoveHelpers::MoveTCPTrajectory + \subsection UsingMoveTCPTrajectory Using armarx::MotionControl::MoveTCPTrajectory Moves the TCP of the specified kinematic chain along the defined poses. Input parameters: - kinematicChainName: the name of the kinematic chain that is used @@ -74,14 +77,14 @@ namespace MoveHelpers - TCPDistanceToTarget: kartesian distance between TCP and target position - TCPOrientationDistanceToTarget: the difference between desired and actual orientation of the TCP - \subsection UsingStopRobot Using armarx::MoveHelpers::StopRobot + \subsection UsingStopRobot Using armarx::MotionControl::StopRobot Stops all motion of the robot. No parameters. */ /** * \class MotionControlHandler - * \ingroup MoveHelpers + * \ingroup MotionControl * MotionControlHandler is the remote state interface for the MotionControl- * States. It contains convenience states that allow to move parts of the robot, * i.e. direct and inverse kinematics for arbitrary kinematic chains and predefined @@ -121,7 +124,7 @@ namespace MoveHelpers /** - * \ingroup MoveHelpers + * \ingroup MotionControl * Move the joints of a kinematic chain to the desired values. * \param jointNames the names of the joints to be moved * \param targetJointValues the desired joint values @@ -141,7 +144,7 @@ namespace MoveHelpers /** - * \ingroup MoveHelpers + * \ingroup MotionControl * Move the joints of a kinematic chain to the desired values using velocity control. * \param jointNames the names of the joints to be moved * \param targetJointVelocities the desired joint velocities @@ -160,7 +163,7 @@ namespace MoveHelpers /** - * \ingroup MoveHelpers + * \ingroup MotionControl * Move the TCP to a desired pose. * \param kinematicChainName the name of the kinematic chain that is used * \param targetTCPPosition the target position for the TCP @@ -185,7 +188,7 @@ namespace MoveHelpers DEFINEEVENT(EvLastPointNotYetReached) /** - * \ingroup MoveHelpers + * \ingroup MotionControl * Move the TCP along a trajectory of poses. * \param kinematicChainName the name of the kinematic chain that is used * \param targetTCPPositions the list of target positions for the TCP @@ -209,7 +212,7 @@ namespace MoveHelpers /** - * \ingroup MoveHelpers + * \ingroup MotionControl * Stop all motion of the robot. It sets all velocities to 0. No Smooth stopping * is implemented here. */ @@ -273,7 +276,7 @@ namespace MoveHelpers void onEnter(); }; -} // namespace MoveHelpers +} // namespace MotionControl } // namespace armarx