cob_twist_controller.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_COB_TWIST_CONTROLLER_H
19 #define COB_TWIST_CONTROLLER_COB_TWIST_CONTROLLER_H
20 
21 #include <ros/ros.h>
22 
23 #include <std_msgs/ColorRGBA.h>
24 #include <sensor_msgs/JointState.h>
25 #include <geometry_msgs/Twist.h>
26 #include <nav_msgs/Odometry.h>
27 
28 #include <urdf/model.h>
29 
31 #include <kdl/chainfksolvervel_recursive.hpp>
32 #include <kdl/jntarray.hpp>
33 #include <kdl/jntarrayvel.hpp>
34 #include <kdl/frames.hpp>
35 
36 #include <tf/transform_listener.h>
37 #include <tf/tf.h>
38 
39 #include <boost/thread/mutex.hpp>
40 #include <boost/shared_ptr.hpp>
41 
42 #include <dynamic_reconfigure/server.h>
43 #include <pluginlib/class_loader.h>
44 
45 #include <cob_twist_controller/TwistControllerConfig.h>
50 
52 {
53 private:
55 
57 
60 
62 
64 
67 
71 
73 
78 
80 
82 
83 public:
85  {
86  }
87 
89  {
90  this->jntToCartSolver_vel_.reset();
91  this->p_inv_diff_kin_solver_.reset();
92  this->controller_interface_.reset();
93  this->reconfigure_server_.reset();
94  }
95 
96  bool initialize();
97 
99 
100  void reconfigureCallback(cob_twist_controller::TwistControllerConfig& config, uint32_t level);
101  void checkSolverAndConstraints(cob_twist_controller::TwistControllerConfig& config);
102  void jointstateCallback(const sensor_msgs::JointState::ConstPtr& msg);
103  void odometryCallback(const nav_msgs::Odometry::ConstPtr& msg);
104 
105  void twistCallback(const geometry_msgs::Twist::ConstPtr& msg);
106  void twistStampedCallback(const geometry_msgs::TwistStamped::ConstPtr& msg);
107 
108  void solveTwist(KDL::Twist twist);
109  void visualizeTwist(KDL::Twist twist);
110 
111  boost::recursive_mutex reconfig_mutex_;
113 };
114 
115 #endif // COB_TWIST_CONTROLLER_COB_TWIST_CONTROLLER_H
msg
void reconfigureCallback(cob_twist_controller::TwistControllerConfig &config, uint32_t level)
ros::Subscriber jointstate_sub_
CallbackDataMediator callback_data_mediator_
void jointstateCallback(const sensor_msgs::JointState::ConstPtr &msg)
config
void twistStampedCallback(const geometry_msgs::TwistStamped::ConstPtr &msg)
Orientation of twist_stamped_msg is with respect to coordinate system given in header.frame_id.
boost::shared_ptr< pluginlib::ClassLoader< cob_twist_controller::ControllerInterfaceBase > > interface_loader_
void odometryCallback(const nav_msgs::Odometry::ConstPtr &msg)
ros::Subscriber twist_stamped_sub_
tf::TransformListener tf_listener_
ros::ServiceClient register_link_client_
void solveTwist(KDL::Twist twist)
Orientation of twist is with respect to chain_base coordinate system.
boost::shared_ptr< KDL::ChainFkSolverVel_recursive > jntToCartSolver_vel_
ros::Subscriber odometry_sub_
ros::Publisher twist_direction_pub_
void twistCallback(const geometry_msgs::Twist::ConstPtr &msg)
Orientation of twist_msg is with respect to chain_base coordinate system.
boost::shared_ptr< InverseDifferentialKinematicsSolver > p_inv_diff_kin_solver_
TwistControllerParams twist_controller_params_
ros::Subscriber twist_sub_
boost::shared_ptr< dynamic_reconfigure::Server< cob_twist_controller::TwistControllerConfig > > reconfigure_server_
ros::Subscriber obstacle_distance_sub_
boost::recursive_mutex reconfig_mutex_
void checkSolverAndConstraints(cob_twist_controller::TwistControllerConfig &config)
Represents a data pool for distribution of collected data from ROS callback.
void visualizeTwist(KDL::Twist twist)
boost::shared_ptr< cob_twist_controller::ControllerInterfaceBase > controller_interface_


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