Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
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
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
00047
00048
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
00073
00074
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
00102
00103 typedef boost::shared_ptr<ConstraintParamsBase> ConstraintParamsBase_t;
00104
00105 #endif // COB_TWIST_CONTROLLER_CONSTRAINTS_CONSTRAINT_PARAMS_H