WipingVelController.h
Go to the documentation of this file.
1/*
2 * This file is part of ArmarX.
3 *
4 * ArmarX is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 *
8 * ArmarX is distributed in the hope that it will be useful, but
9 * WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 *
16 * @package ...
17 * @author Jianfeng Gao ( jianfeng dot gao at kit dot edu )
18 * @date 2024
19 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
20 * GNU General Public License
21 */
22
23#pragma once
24
29#include <armarx/control/njoint_mp_controller/task_space/ControllerInterface.h>
30#include <armarx/control/njoint_mp_controller/task_space/aron/WipingAdaptionConfig.aron.generated.h>
31
33{
34 using namespace armarx::control::njoint_controller::task_space;
35 using namespace armarx::control::common;
36
37 /**
38 * @defgroup Library-NJointWipingVelMPController NJointWipingVelMPController
39 * @ingroup Library-RobotUnit-NJointControllers
40 * A description of the library NJointWipingVelMPController.
41 *
42 * @class NJointWipingVelMPController
43 * @ingroup Library-NJointWipingVelMPController
44 * @brief Brief description of class NJointWipingVelMPController.
45 *
46 * Detailed description of class NJointWipingVelMPController.
47 */
50 virtual public mp::MPPool,
52 {
53 public:
55 {
56 float changeTimer = 0.0f;
57 Eigen::Vector2f lastPosition = Eigen::Vector2f::Zero();
58 };
59
60 public:
61 using MPListConfig = common::mp::arondto::MPListConfig;
62
64 const NJointControllerConfigPtr& config,
66
67 std::string getClassName(const Ice::Current& = Ice::emptyCurrent) const override;
68
69 void updateMPConfig(const ::armarx::aron::data::dto::DictPtr& dto,
70 const Ice::Current& iceCurrent = Ice::emptyCurrent) override;
71 // ::armarx::aron::data::dto::DictPtr
72 // getMPConfig(const Ice::Current& iceCurrent = Ice::emptyCurrent) override;
73
74 void updateAdaptiveConfig(const ::armarx::aron::data::dto::DictPtr& dto,
75 const Ice::Current& iceCurrent = Ice::emptyCurrent) override;
76
77 void additionalTask() override;
78
79 // protected:
80 // /// this variable is only needed when constructing the MP instances, therefore you don't
81 // /// need to use triple buffers
82 // MPListConfig mpConfig;
83
84 protected:
85 void rtPreActivateController() override;
86
87 private:
88 mutable std::recursive_mutex adaptionMtx;
89 std::atomic_bool adaptionReady{false};
90 arondto::WipingAdaptionConfigs adaptionCfg;
91 std::map<std::string, AdaptionStatus> adaptionStatus;
92 };
93} // namespace armarx::control::njoint_mp_controller::task_space
NJointTaskspaceVelocityController(const RobotUnitPtr &robotUnit, const NJointControllerConfigPtr &config, const VirtualRobot::RobotPtr &)
std::string getClassName(const Ice::Current &=Ice::emptyCurrent) const override
void updateAdaptiveConfig(const ::armarx::aron::data::dto::DictPtr &dto, const Ice::Current &iceCurrent=Ice::emptyCurrent) override
void updateMPConfig(const ::armarx::aron::data::dto::DictPtr &dto, const Ice::Current &iceCurrent=Ice::emptyCurrent) override
NJointWipingVelMPController(const RobotUnitPtr &robotUnit, const NJointControllerConfigPtr &config, const VirtualRobot::RobotPtr &)
void rtPreActivateController() override
This function is called before the controller is activated.
std::shared_ptr< class Robot > RobotPtr
Definition Bus.h:19
IceUtil::Handle< class RobotUnit > RobotUnitPtr
Definition FTSensor.h:34