Nav2 Navigation Stack - rolling  main
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 
20 namespace opennav_docking
21 {
22 
28 {
29 public:
35  PoseFilter(double coef, double timeout);
36 
42  geometry_msgs::msg::PoseStamped update(const geometry_msgs::msg::PoseStamped & measurement);
43 
44 protected:
45  void filter(double & filt, double meas);
46 
47  double coef_, timeout_;
48  geometry_msgs::msg::PoseStamped pose_;
49 };
50 
51 } // namespace opennav_docking
52 
53 #endif // OPENNAV_DOCKING__POSE_FILTER_HPP_
Filter for a sequence of pose measurements.
Definition: pose_filter.hpp:28
PoseFilter(double coef, double timeout)
Create a pose filter instance.
Definition: pose_filter.cpp:22
geometry_msgs::msg::PoseStamped update(const geometry_msgs::msg::PoseStamped &measurement)
Update the filter.
Definition: pose_filter.cpp:30