constraint_params.h
Go to the documentation of this file.
00001 /*
00002  * Copyright 2017 Fraunhofer Institute for Manufacturing Engineering and Automation (IPA)
00003  *
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  *
00008  *   http://www.apache.org/licenses/LICENSE-2.0
00009 
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00017 
00018 #ifndef COB_TWIST_CONTROLLER_CONSTRAINTS_CONSTRAINT_PARAMS_H
00019 #define COB_TWIST_CONTROLLER_CONSTRAINTS_CONSTRAINT_PARAMS_H
00020 
00021 #include <vector>
00022 #include <string>
00023 #include <ros/ros.h>
00024 #include <boost/shared_ptr.hpp>
00025 #include <boost/scoped_ptr.hpp>
00026 
00027 #include "cob_twist_controller/cob_twist_controller_data_types.h"
00028 
00029 /* BEGIN ConstraintParamsBase ***********************************************************************************/
00031 class ConstraintParamsBase
00032 {
00033     public:
00034         ConstraintParamsBase(const ConstraintParams& params,
00035                              const std::string& id = std::string()) :
00036                 params_(params),
00037                 id_(id)
00038         {}
00039 
00040         ~ConstraintParamsBase()
00041         {}
00042 
00043         const std::string id_;
00044         const ConstraintParams params_;
00045 };
00046 /* END ConstraintParamsBase *************************************************************************************/
00047 
00048 /* BEGIN ConstraintParamsCA *************************************************************************************/
00050 class ConstraintParamsCA : public ConstraintParamsBase
00051 {
00052     public:
00053         ConstraintParamsCA(const ConstraintParams& params,
00054                            const std::vector<std::string>& frame_names = std::vector<std::string>(),
00055                            const std::string& id = std::string()) :
00056                 ConstraintParamsBase(params, id),
00057                 frame_names_(frame_names)
00058         {}
00059 
00060         ConstraintParamsCA(const ConstraintParamsCA& cpca) :
00061                 ConstraintParamsBase(cpca.params_, cpca.id_),
00062                 frame_names_(cpca.frame_names_),
00063                 current_distances_(cpca.current_distances_)
00064         {}
00065 
00066         virtual ~ConstraintParamsCA()
00067         {}
00068 
00069         std::vector<std::string> frame_names_;
00070         std::vector<ObstacleDistanceData> current_distances_;
00071 };
00072 /* END ConstraintParamsCA ***************************************************************************************/
00073 
00074 /* BEGIN ConstraintParamsJLA ************************************************************************************/
00076 class ConstraintParamsJLA : public ConstraintParamsBase
00077 {
00078     public:
00079         ConstraintParamsJLA(const ConstraintParams& params,
00080                             const LimiterParams& limiter_params = LimiterParams(),
00081                             const std::string& id = std::string()) :
00082                 ConstraintParamsBase(params, id),
00083                 joint_idx_(-1),
00084                 limiter_params_(limiter_params)
00085         {}
00086 
00087         ConstraintParamsJLA(const ConstraintParamsJLA& cpjla) :
00088                 ConstraintParamsBase(cpjla.params_, cpjla.id_),
00089                 joint_(cpjla.joint_),
00090                 joint_idx_(cpjla.joint_idx_),
00091                 limiter_params_(cpjla.limiter_params_)
00092         {}
00093 
00094         virtual ~ConstraintParamsJLA()
00095         {}
00096 
00097         std::string joint_;
00098         int32_t joint_idx_;
00099         const LimiterParams& limiter_params_;
00100 };
00101 /* END ConstraintParamsJLA **************************************************************************************/
00102 
00103 typedef boost::shared_ptr<ConstraintParamsBase> ConstraintParamsBase_t;
00104 
00105 #endif  // COB_TWIST_CONTROLLER_CONSTRAINTS_CONSTRAINT_PARAMS_H


cob_twist_controller
Author(s): Felix Messmer , Marco Bezzon , Christoph Mark , Francisco Moreno
autogenerated on Thu Jun 6 2019 21:19:26