diff --git a/source/RobotAPI/interface/libraries/RTControllers/PlatformPassThroughController.ice b/source/RobotAPI/interface/libraries/RTControllers/PlatformPassThroughController.ice new file mode 100644 index 0000000000000000000000000000000000000000..98ceaca265a285a137e689adf357cf39cde03ea6 --- /dev/null +++ b/source/RobotAPI/interface/libraries/RTControllers/PlatformPassThroughController.ice @@ -0,0 +1,38 @@ +/* + * This file is part of ArmarX. + * + * ArmarX is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * ArmarX is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + * @package RobotAPI::PlatformPassThroughController + * @date 2017 + * @copyright http://www.gnu.org/licenses/gpl-2.0.txt + * GNU General Public License + */ + +#ifndef _ARMARX_ROBOTAPI_PlatformPassThroughController_SLICE_ +#define _ARMARX_ROBOTAPI_PlatformPassThroughController_SLICE_ + +#include <ArmarXCore/interface/core/BasicTypes.ice> +#include <RobotAPI/interface/libraries/RTControllers/LVL1Controller.ice> + +module armarx +{ + + interface PlatformPassThroughControllerInterface extends LVL1ControllerInterface + { + idempotent void setXTargetValue(float value) throws InvalidArgumentException; + idempotent void setYTargetValue(float value) throws InvalidArgumentException; + idempotent void setAlphaTargetValue(float value) throws InvalidArgumentException; + }; +}; +#endif \ No newline at end of file diff --git a/source/RobotAPI/libraries/RobotRTControllers/Targets/PlatformVelocityTarget.h b/source/RobotAPI/libraries/RobotRTControllers/Targets/PlatformVelocityTarget.h new file mode 100644 index 0000000000000000000000000000000000000000..31315213a7e1b00a1a570721c45a65ad58892b97 --- /dev/null +++ b/source/RobotAPI/libraries/RobotRTControllers/Targets/PlatformVelocityTarget.h @@ -0,0 +1,80 @@ +/* + * This file is part of ArmarX. + * + * Copyright (C) 2012-2016, High Performance Humanoid Technologies (H2T), + * Karlsruhe Institute of Technology (KIT), all rights reserved. + * + * ArmarX is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * ArmarX is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + * @author Markus Swarowsky (markus dot swarowsky at student dot kit dot edu) + * @copyright http://www.gnu.org/licenses/gpl-2.0.txt + * GNU General Public License + */ + +#ifndef armarx_Targets_PlatformVelocityTarget +#define armarx_Targets_PlatformVelocityTarget + +#include <boost/shared_ptr.hpp> + +namespace armarx +{ + class PlatformVelocityTarget; + + typedef boost::shared_ptr <PlatformVelocityTarget> PlatformVelocityTargetPtr; + + class PlatformVelocityTarget : public JointTargetBase + { + public: + PlatformVelocityTarget(); + + virtual std::string getControlMode() + { + return ControlMode::eVelocityControl; + } + + virtual void reset() + { + xVelocityTarget = ControllerConstants::ValueNotSetNaN; + yVelocityTarget = ControllerConstants::ValueNotSetNaN; + theaVelocityTarget = ControllerConstants::ValueNotSetNaN; + } + + virtual bool isValid() + { + return (std::isfinite(xVelocityTarget) && std::isfinite(yVelocityTarget) && + std::isfinite(theaVelocityTarget)); + } + + void setXVelocityTarget(float target) + { + xVelocityTarget = target; + } + + void setYVelocityTarget(float target) + { + yVelocityTarget = target; + } + + void setTheaVelocityTarget(float target) + { + theaVelocityTarget = target; + } + + private: + float xVelocityTarget; + float yVelocityTarget; + float theaVelocityTarget; + }; +} + +#endif // armarx_Targets_PlatformVelocityTarget