Nav2 Navigation Stack - jazzy  jazzy
ROS 2 Navigation Stack
pose_filter.hpp
1 // Copyright (c) 2024 Open Navigation LLC
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 #ifndef OPENNAV_DOCKING__POSE_FILTER_HPP_
16 #define OPENNAV_DOCKING__POSE_FILTER_HPP_
17 
18 #include "geometry_msgs/msg/pose_stamped.hpp"
19 #include "tf2_geometry_msgs/tf2_geometry_msgs.hpp"
20 
21 namespace opennav_docking
22 {
23 
29 {
30 public:
36  PoseFilter(double coef, double timeout);
37 
43  geometry_msgs::msg::PoseStamped update(const geometry_msgs::msg::PoseStamped & measurement);
44 
45 protected:
46  void filter(double & filt, double meas);
47 
48  double coef_, timeout_;
49  geometry_msgs::msg::PoseStamped pose_;
50 };
51 
52 } // namespace opennav_docking
53 
54 #endif // OPENNAV_DOCKING__POSE_FILTER_HPP_
Filter for a sequence of pose measurements.
Definition: pose_filter.hpp:29
PoseFilter(double coef, double timeout)
Create a pose filter instance.
Definition: pose_filter.cpp:21
geometry_msgs::msg::PoseStamped update(const geometry_msgs::msg::PoseStamped &measurement)
Update the filter.
Definition: pose_filter.cpp:29