ElevationMap.h
Go to the documentation of this file.
1 /*+-------------------------------------------------------------------------+
2  | MultiVehicle simulator (libmvsim) |
3  | |
4  | Copyright (C) 2014-2023 Jose Luis Blanco Claraco |
5  | Copyright (C) 2017 Borys Tymchenko (Odessa Polytechnic University) |
6  | Distributed under 3-clause BSD License |
7  | See COPYING |
8  +-------------------------------------------------------------------------+ */
9 
10 #pragma once
11 
12 #include <mrpt/img/CImage.h>
13 #include <mrpt/opengl/CMesh.h>
14 #include <mrpt/poses/CPose3D.h>
15 #include <mrpt/tfest/TMatchingPair.h>
17 
18 namespace mvsim
19 {
21 {
23  public:
25  virtual ~ElevationMap();
26 
27  virtual void loadConfigFrom(const rapidxml::xml_node<char>* root) override;
28 
29  virtual void simul_pre_timestep(const TSimulContext& context) override;
30  virtual void simul_post_timestep(const TSimulContext& context) override;
31 
32  bool getElevationAt(
33  double x, double y, float& z) const;
34 
35  protected:
36  virtual void internalGuiUpdate(
37  const mrpt::optional_ref<mrpt::opengl::COpenGLScene>& viz,
38  const mrpt::optional_ref<mrpt::opengl::COpenGLScene>& physical,
39  bool childrenOnly) override;
40 
43  mrpt::opengl::CMesh::Ptr gl_mesh_;
44  std::shared_ptr<mrpt::opengl::CPointCloud> gl_debugWheelsContactPoints_;
45  bool firstSceneRendering_ = true;
46  float resolution_ = 1.0f;
47 
48  float textureExtensionX_ = 0;
49  float textureExtensionY_ = 0;
50 
52  mrpt::math::CMatrixFloat meshCacheZ_;
53 
55 
56  private:
57  // temp vars (declared here to avoid reallocs):
58  mrpt::tfest::TMatchingPairList corrs_;
59  mrpt::poses::CPose3D optimalTf_;
60 };
61 } // namespace mvsim
float textureExtensionX_
0=auto
Definition: ElevationMap.h:48
mrpt::opengl::CMesh::Ptr gl_mesh_
Definition: ElevationMap.h:43
virtual void loadConfigFrom(const rapidxml::xml_node< char > *root) override
virtual void simul_pre_timestep(const TSimulContext &context) override
virtual void internalGuiUpdate(const mrpt::optional_ref< mrpt::opengl::COpenGLScene > &viz, const mrpt::optional_ref< mrpt::opengl::COpenGLScene > &physical, bool childrenOnly) override
std::shared_ptr< mrpt::opengl::CPointCloud > gl_debugWheelsContactPoints_
Definition: ElevationMap.h:44
mrpt::math::CMatrixFloat meshCacheZ_
Definition: ElevationMap.h:52
ElevationMap(World *parent, const rapidxml::xml_node< char > *root)
#define DECLARES_REGISTER_WORLD_ELEMENT(CLASS_NAME)
float textureExtensionY_
0=auto
Definition: ElevationMap.h:49
mrpt::poses::CPose3D optimalTf_
Definition: ElevationMap.h:59
bool getElevationAt(double x, double y, float &z) const
return false if out of bounds
mrpt::tfest::TMatchingPairList corrs_
Definition: ElevationMap.h:58
virtual void simul_post_timestep(const TSimulContext &context) override


mvsim
Author(s):
autogenerated on Tue Jul 4 2023 03:08:20