OccupancyGridMap.h
Go to the documentation of this file.
1 /*+-------------------------------------------------------------------------+
2  | MultiVehicle simulator (libmvsim) |
3  | |
4  | Copyright (C) 2014-2020 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/maps/COccupancyGridMap2D.h>
13 #include <mrpt/obs/CObservation2DRangeScan.h>
14 #include <mrpt/obs/CSinCosLookUpTableFor2DScans.h>
17 #include <mrpt/poses/CPose2D.h>
19 
20 #include <mutex>
21 
22 namespace mvsim
23 {
25 {
27  public:
29  virtual ~OccupancyGridMap();
30 
31  virtual void loadConfigFrom(const rapidxml::xml_node<char>* root) override;
32 
33  virtual void simul_pre_timestep(const TSimulContext& context) override;
34 
37 
38  void poses_mutex_lock() override {}
39  void poses_mutex_unlock() override {}
40 
41  protected:
42  virtual void internalGuiUpdate(
43  mrpt::opengl::COpenGLScene& scene, bool childrenOnly) override;
44 
46 
48  mrpt::opengl::CSetOfObjects::Ptr m_gl_grid;
50 
51  struct TFixturePtr
52  {
54  TFixturePtr() : fixture(nullptr) {}
55  };
56 
58  {
61  mrpt::obs::CObservation2DRangeScan::Ptr scan;
63  std::vector<TFixturePtr> collide_fixtures;
64 
65  TInfoPerCollidableobj() : max_obstacles_ranges(0), collide_body(nullptr)
66  {
67  }
68  };
69 
70  std::vector<TInfoPerCollidableobj> m_obstacles_for_each_obj;
71  std::vector<mrpt::opengl::CSetOfObjects::Ptr> m_gl_obs_clouds;
72 
74  std::vector<mrpt::opengl::CPointCloud::Ptr> m_gl_obs_clouds_buffer;
75 
77 
79  double m_restitution;
81 };
82 } // namespace mvsim
std::vector< mrpt::opengl::CSetOfObjects::Ptr > m_gl_obs_clouds
const mrpt::maps::COccupancyGridMap2D & getOccGrid() const
mrpt::maps::COccupancyGridMap2D & getOccGrid()
mrpt::opengl::CSetOfObjects::Ptr m_gl_grid
call of internalGuiUpdate()
mrpt::obs::CObservation2DRangeScan::Ptr scan
mrpt::obs::CSinCosLookUpTableFor2DScans m_sincos_lut
scene
A rigid body. These are created via b2World::CreateBody.
Definition: b2Body.h:126
double m_restitution
Elastic restitution coef (default: 0.01)
OccupancyGridMap(World *parent, const rapidxml::xml_node< char > *root)
#define DECLARES_REGISTER_WORLD_ELEMENT(CLASS_NAME)
void poses_mutex_lock() override
T root(const T v0, const T v1)
virtual void loadConfigFrom(const rapidxml::xml_node< char > *root) override
void poses_mutex_unlock() override
mrpt::maps::COccupancyGridMap2D m_grid
std::vector< mrpt::opengl::CPointCloud::Ptr > m_gl_obs_clouds_buffer
virtual void internalGuiUpdate(mrpt::opengl::COpenGLScene &scene, bool childrenOnly) override
double m_lateral_friction
(Default: 0.5)
std::vector< TInfoPerCollidableobj > m_obstacles_for_each_obj
virtual void simul_pre_timestep(const TSimulContext &context) override
std::mutex m_gl_obs_clouds_buffer_cs


mvsim
Author(s):
autogenerated on Fri May 7 2021 03:05:51