RobotStateObserver.h
Go to the documentation of this file.
1 /* Copyright (c) 2017, TU Wien
2  All rights reserved.
3 
4  Redistribution and use in source and binary forms, with or without
5  modification, are permitted provided that the following conditions are met:
6  * Redistributions of source code must retain the above copyright
7  notice, this list of conditions and the following disclaimer.
8  * Redistributions in binary form must reproduce the above copyright
9  notice, this list of conditions and the following disclaimer in the
10  documentation and/or other materials provided with the distribution.
11  * Neither the name of the <organization> nor the
12  names of its contributors may be used to endorse or promote products
13  derived from this software without specific prior written permission.
14 
15  THIS SOFTWARE IS PROVIDED BY TU Wien ''AS IS'' AND ANY
16  EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
17  WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18  DISCLAIMED. IN NO EVENT SHALL TU Wien BE LIABLE FOR ANY
19  DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
20  (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
21  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
22  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24  SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 */
26 
27 #ifndef TUW_ROBOT_STATE_OBSERVER_H
28 #define TUW_ROBOT_STATE_OBSERVER_H
29 
30 
31 #include <memory>
32 #include <vector>
33 #include <eigen3/Eigen/Dense>
34 
36 {
37  struct PathSegment
38  {
39  Eigen::Vector2d start;
40  Eigen::Vector2d goal;
41  float width;
42  };
43 
45  {
46  //special class-member functions.
47  public: RobotStateObserver();
48  public: int init(const std::vector<PathSegment> &_path);
49  public: int getStep(const Eigen::Vector2d &_odom, bool &_changed);
50 
51  private: float distanceToSegment(PathSegment _s, Eigen::Vector2d _p);
52 
53  private: std::vector<PathSegment> path_;
54  private: int currentStep;
55  };
56 
57 }
58 
59 #endif
60 
tuw_multi_robot_route_to_path::RobotStateObserver::init
int init(const std::vector< PathSegment > &_path)
Definition: RobotStateObserver.cpp:38
tuw_multi_robot_route_to_path::PathSegment
Definition: RobotStateObserver.h:37
tuw_multi_robot_route_to_path::PathSegment::start
Eigen::Vector2d start
Definition: RobotStateObserver.h:39
tuw_multi_robot_route_to_path::PathSegment::width
float width
Definition: RobotStateObserver.h:41
tuw_multi_robot_route_to_path::RobotStateObserver::currentStep
int currentStep
Definition: RobotStateObserver.h:54
tuw_multi_robot_route_to_path::PathSegment::goal
Eigen::Vector2d goal
Definition: RobotStateObserver.h:40
tuw_multi_robot_route_to_path::RobotStateObserver::getStep
int getStep(const Eigen::Vector2d &_odom, bool &_changed)
Definition: RobotStateObserver.cpp:45
tuw_multi_robot_route_to_path::RobotStateObserver
Definition: RobotStateObserver.h:44
tuw_multi_robot_route_to_path::RobotStateObserver::RobotStateObserver
RobotStateObserver()
Definition: RobotStateObserver.cpp:34
tuw_multi_robot_route_to_path::RobotStateObserver::distanceToSegment
float distanceToSegment(PathSegment _s, Eigen::Vector2d _p)
Definition: RobotStateObserver.cpp:67
tuw_multi_robot_route_to_path
Definition: LocalBehaviorControllerNode.h:46
tuw_multi_robot_route_to_path::RobotStateObserver::path_
std::vector< PathSegment > path_
Definition: RobotStateObserver.h:53


tuw_multi_robot_local_behavior_controller
Author(s): Benjamin Binder
autogenerated on Wed Mar 2 2022 01:10:04