TrajectoryController.h
Go to the documentation of this file.
1 /*
2  * This file is part of ArmarX.
3  *
4  * Copyright (C) 2011-2017, High Performance Humanoid Technologies (H2T), Karlsruhe Institute of Technology (KIT), all rights reserved.
5  *
6  * ArmarX is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License version 2 as
8  * published by the Free Software Foundation.
9  *
10  * ArmarX is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program. If not, see <http://www.gnu.org/licenses/>.
17  *
18  * @package ArmarX
19  * @author Mirko Waechter( mirko.waechter at kit dot edu)
20  * @date 2017
21  * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
22  * GNU General Public License
23  */
24 #pragma once
25 
26 #include "PIDController.h"
27 #include "Trajectory.h"
28 
29 namespace armarx
30 {
31 
33  {
34  public:
35  TrajectoryController(const TrajectoryPtr& traj, float kp, float ki = 0.0f, float kd = 0.0f, bool threadSafe = true, float maxIntegral = std::numeric_limits<float>::max());
36  const Eigen::VectorXf& update(double deltaT, const Eigen::VectorXf& currentPosition);
37  //const MultiDimPIDControllerPtr& getPid() const;
38  //void setPid(const MultiDimPIDControllerPtr& value);
39 
40  double getCurrentTimestamp() const;
41 
42  const TrajectoryPtr& getTraj() const;
43 
46 
47  const Eigen::VectorXf& getCurrentError() const;
48 
49  const Eigen::VectorXf& getPositions() const;
50 
51  protected:
54  //std::vector<PIDControllerPtr> pids;
56  Eigen::VectorXf positions;
57  Eigen::VectorXf veloctities;
58  Eigen::VectorXf currentError;
59 
60  };
61  using TrajectoryControllerPtr = std::shared_ptr<TrajectoryController>;
62 
63 } // namespace armarx
64 
armarx::TrajectoryController
Subcontroller which handles all program interaction with the modle, communicates with other controlle...
Definition: TrajectoryController.h:32
armarx::TrajectoryController::traj
TrajectoryPtr traj
Definition: TrajectoryController.h:52
armarx::TrajectoryController::FoldLimitlessJointPositions
static void FoldLimitlessJointPositions(TrajectoryPtr traj)
Definition: TrajectoryController.cpp:161
armarx::TrajectoryController::getPositions
const Eigen::VectorXf & getPositions() const
Definition: TrajectoryController.cpp:191
armarx::TrajectoryController::TrajectoryController
TrajectoryController()
Creates a new TrajectoryController and assigns a QWidget to handle.
Definition: TrajectoryController.cpp:31
armarx::TrajectoryController::currentTimestamp
double currentTimestamp
Definition: TrajectoryController.h:55
armarx::TrajectoryController::getCurrentError
const Eigen::VectorXf & getCurrentError() const
Definition: TrajectoryController.cpp:186
armarx::TrajectoryController::getCurrentTimestamp
double getCurrentTimestamp() const
Definition: TrajectoryController.cpp:115
IceInternal::Handle< Trajectory >
armarx::TrajectoryController::veloctities
Eigen::VectorXf veloctities
Definition: TrajectoryController.h:57
armarx::MultiDimPIDControllerPtr
std::shared_ptr< MultiDimPIDControllerTemplate<> > MultiDimPIDControllerPtr
Definition: MultiDimPIDController.h:251
armarx::TrajectoryController::positions
Eigen::VectorXf positions
Definition: TrajectoryController.h:56
armarx::TrajectoryController::UnfoldLimitlessJointPositions
static void UnfoldLimitlessJointPositions(TrajectoryPtr traj)
Definition: TrajectoryController.cpp:125
armarx::TrajectoryController::pid
MultiDimPIDControllerPtr pid
Definition: TrajectoryController.h:53
max
T max(T t1, T t2)
Definition: gdiam.h:48
armarx::TrajectoryControllerPtr
std::shared_ptr< TrajectoryController > TrajectoryControllerPtr
Definition: TrajectoryController.h:61
armarx::TrajectoryController::update
const Eigen::VectorXf & update(double deltaT, const Eigen::VectorXf &currentPosition)
Definition: TrajectoryController.cpp:54
PIDController.h
Trajectory.h
armarx::TrajectoryController::currentError
Eigen::VectorXf currentError
Definition: TrajectoryController.h:58
armarx::TrajectoryController::getTraj
const TrajectoryPtr & getTraj() const
Definition: TrajectoryController.cpp:120
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28