constraint_solver_factory.h
Go to the documentation of this file.
1 /*
2  * Copyright 2017 Fraunhofer Institute for Manufacturing Engineering and Automation (IPA)
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9 
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 
18 #ifndef COB_TWIST_CONTROLLER_CONSTRAINT_SOLVERS_CONSTRAINT_SOLVER_FACTORY_H
19 #define COB_TWIST_CONTROLLER_CONSTRAINT_SOLVERS_CONSTRAINT_SOLVER_FACTORY_H
20 
21 #include <set>
22 #include <Eigen/Core>
23 #include <Eigen/SVD>
24 #include <kdl/jntarray.hpp>
25 #include <kdl/chainjnttojacsolver.hpp>
26 #include <kdl/chainfksolvervel_recursive.hpp>
27 #include <boost/shared_ptr.hpp>
28 
32 
35 {
36  public:
43  KDL::ChainJntToJacSolver& jnt_to_jac,
44  KDL::ChainFkSolverVel_recursive& fk_solver_vel,
45  TaskStackController_t& task_stack_controller) :
46  data_mediator_(data_mediator),
47  jnt_to_jac_(jnt_to_jac),
48  task_stack_controller_(task_stack_controller),
49  fk_solver_vel_(fk_solver_vel)
50  {
51  this->solver_factory_.reset();
52  this->damping_method_.reset();
53  }
54 
56  {
57  this->solver_factory_.reset();
58  this->damping_method_.reset();
59  }
60 
70  int8_t calculateJointVelocities(Matrix6Xd_t& jacobian_data,
71  const Vector6d_t& in_cart_velocities,
72  const JointStates& joint_states,
73  Eigen::MatrixXd& out_jnt_velocities);
74 
81  static bool getSolverFactory(const TwistControllerParams& params,
82  const LimiterParams& limiter_params,
83  boost::shared_ptr<ISolverFactory>& solver_factory,
84  TaskStackController_t& task_stack_controller);
85 
86  int8_t resetAll(const TwistControllerParams& params, const LimiterParams& limiter_params);
87 
88  private:
92 
95  std::set<ConstraintBase_t> constraints_;
97 };
98 
99 #endif // COB_TWIST_CONTROLLER_CONSTRAINT_SOLVERS_CONSTRAINT_SOLVER_FACTORY_H
Eigen::Matrix< double, 6, 1 > Vector6d_t
static bool getSolverFactory(const TwistControllerParams &params, const LimiterParams &limiter_params, boost::shared_ptr< ISolverFactory > &solver_factory, TaskStackController_t &task_stack_controller)
KDL::ChainFkSolverVel_recursive & fk_solver_vel_
int8_t resetAll(const TwistControllerParams &params, const LimiterParams &limiter_params)
ConstraintSolverFactory(CallbackDataMediator &data_mediator, KDL::ChainJntToJacSolver &jnt_to_jac, KDL::ChainFkSolverVel_recursive &fk_solver_vel, TaskStackController_t &task_stack_controller)
boost::shared_ptr< ISolverFactory > solver_factory_
int8_t calculateJointVelocities(Matrix6Xd_t &jacobian_data, const Vector6d_t &in_cart_velocities, const JointStates &joint_states, Eigen::MatrixXd &out_jnt_velocities)
CallbackDataMediator & data_mediator_
boost::shared_ptr< DampingBase > damping_method_
Static class providing a single method for creation of damping method, solver and starting the solvin...
std::set< ConstraintBase_t > constraints_
KDL::ChainJntToJacSolver & jnt_to_jac_
Eigen::Matrix< double, 6, Eigen::Dynamic > Matrix6Xd_t
TaskStackController_t & task_stack_controller_
Represents a data pool for distribution of collected data from ROS callback.


cob_twist_controller
Author(s): Felix Messmer , Marco Bezzon , Christoph Mark , Francisco Moreno
autogenerated on Thu Apr 8 2021 02:40:00