callback_data_mediator.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_CALLBACK_DATA_MEDIATOR_H
19 #define COB_TWIST_CONTROLLER_CALLBACK_DATA_MEDIATOR_H
20 
21 #include <vector>
22 #include <stdint.h>
23 #include <boost/thread/mutex.hpp>
24 
27 #include "cob_control_msgs/ObstacleDistances.h"
28 
31 {
32  private:
33  typedef ObstacleDistancesInfo_t::const_iterator ObstacleDistancesIter_t;
36 
37  public:
39 
43  uint32_t obstacleDistancesCnt();
44 
50  bool fill(ConstraintParamsCA& params_ca);
51 
57  bool fill(ConstraintParamsJLA& params_jla);
58 
63  void distancesToObstaclesCallback(const cob_control_msgs::ObstacleDistances::ConstPtr& msg);
64 };
65 
66 #endif // COB_TWIST_CONTROLLER_CALLBACK_DATA_MEDIATOR_H
uint32_t obstacleDistancesCnt()
Counts all currently available distances to obstacles.
msg
void distancesToObstaclesCallback(const cob_control_msgs::ObstacleDistances::ConstPtr &msg)
Producer: Fills obstacle distances but only when they are empty.
Class that represents the parameters for the Collision Avoidance constraint.
Class that represents the parameters for the Collision Avoidance constraint.
std::map< std::string, std::vector< ObstacleDistanceData > > ObstacleDistancesInfo_t
ObstacleDistancesInfo_t obstacle_distances_
boost::mutex distances_to_obstacles_lock_
bool fill(ConstraintParamsCA &params_ca)
Consumer: Consumes elements from distances container.
ObstacleDistancesInfo_t::const_iterator ObstacleDistancesIter_t
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