odometry_state_tracker.cc
Go to the documentation of this file.
1 /*
2  * Copyright 2016 The Cartographer Authors
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 
18 
20 
21 namespace cartographer {
22 namespace mapping {
23 
25  const transform::Rigid3d& odometer_pose,
26  const transform::Rigid3d& state_pose)
27  : time(time), odometer_pose(odometer_pose), state_pose(state_pose) {}
28 
30  : window_size_(window_size) {
31  CHECK_GT(window_size, 0);
32 }
33 
36  return odometry_states_;
37 }
38 
40  const OdometryState& odometry_state) {
41  odometry_states_.push_back(odometry_state);
42  while (odometry_states_.size() > window_size_) {
43  odometry_states_.pop_front();
44  }
45 }
46 
47 bool OdometryStateTracker::empty() const { return odometry_states_.empty(); }
48 
50  return odometry_states_.back();
51 }
52 
53 } // namespace mapping
54 } // namespace cartographer
void AddOdometryState(const OdometryState &odometry_state)
const OdometryStates & odometry_states() const
UniversalTimeScaleClock::time_point Time
Definition: time.h:44


cartographer
Author(s):
autogenerated on Wed Jun 5 2019 21:57:58