stationary_model.hpp
Go to the documentation of this file.
1 // Copyright 2022-2023 Ekumen, Inc.
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 BELUGA_MOTION_STATIONARY_MODEL_HPP
16 #define BELUGA_MOTION_STATIONARY_MODEL_HPP
17 
18 #include <random>
19 #include <tuple>
20 
22 
23 #include <sophus/se2.hpp>
24 #include <sophus/so2.hpp>
25 
31 namespace beluga {
32 
34 
40  public:
42  using control_type = std::tuple<Sophus::SE2d, Sophus::SE2d>;
45 
47 
54  template <class Control, typename = common_tuple_type_t<Control, control_type>>
55  [[nodiscard]] auto operator()([[maybe_unused]] Control&&) const {
56  return [](const state_type& state, auto& gen) {
57  static thread_local auto distribution = std::normal_distribution<>{0, 0.02};
58  return state *
59  Sophus::SE2d{Sophus::SO2d{distribution(gen)}, Eigen::Vector2d{distribution(gen), distribution(gen)}};
60  };
61  }
62 };
63 
64 } // namespace beluga
65 
66 #endif
Sophus::SO2
beluga::state
constexpr state_detail::state_fn state
Customization point object for accessing the state of a particle.
Definition: primitives.hpp:163
se2.hpp
Sophus::SE2
so2.hpp
tuple_traits.hpp
Implementation of traits for tuple-like types.
beluga::StationaryModel::control_type
std::tuple< Sophus::SE2d, Sophus::SE2d > control_type
Current and previous odometry estimates as motion model control action.
Definition: stationary_model.hpp:42
beluga::StationaryModel::operator()
auto operator()([[maybe_unused]] Control &&) const
Computes a state sampling function conditioned on a given control action.
Definition: stationary_model.hpp:55
Sophus::SE2d
SE2< double > SE2d
beluga::StationaryModel
A stationary motion model.
Definition: stationary_model.hpp:39
beluga
The main Beluga namespace.
Definition: 3d_embedding.hpp:21


beluga
Author(s):
autogenerated on Tue Jul 16 2024 02:59:53