DepthCameraSensor.cpp
Go to the documentation of this file.
1 /*+-------------------------------------------------------------------------+
2  | MultiVehicle simulator (libmvsim) |
3  | |
4  | Copyright (C) 2014-2024 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 #include <mrpt/core/lock_helper.h>
11 #include <mrpt/opengl/CFrustum.h>
12 #include <mrpt/opengl/COpenGLScene.h>
13 #include <mrpt/opengl/stock_objects.h>
14 #include <mrpt/random.h>
15 #include <mrpt/version.h>
17 #include <mvsim/VehicleBase.h>
18 #include <mvsim/World.h>
19 
20 #include "xml_utils.h"
21 
22 using namespace mvsim;
23 using namespace rapidxml;
24 
26  : SensorBase(parent)
27 {
29 }
30 
32 
34 {
35  gui_uptodate_ = false;
36 
39 
40  fbo_renderer_depth_.reset();
41  fbo_renderer_rgb_.reset();
42 
43  using namespace mrpt; // _deg
44  sensor_params_.sensorPose = mrpt::poses::CPose3D(0, 0, 0.5, 90.0_deg, 0, 90.0_deg);
45 
46  // Default values:
47  {
48  auto& c = sensor_params_.cameraParamsIntensity;
49  c.ncols = 640;
50  c.nrows = 480;
51  c.cx(c.ncols / 2);
52  c.cy(c.nrows / 2);
53  c.fx(500);
54  c.fy(500);
55  }
56  sensor_params_.cameraParams = sensor_params_.cameraParamsIntensity;
57 
58  // Other scalar params:
59  TParameterDefinitions params;
60  params["pose_3d"] = TParamEntry("%pose3d", &sensor_params_.sensorPose);
61  params["relativePoseIntensityWRTDepth"] =
62  TParamEntry("%pose3d", &sensor_params_.relativePoseIntensityWRTDepth);
63 
64  params["sense_depth"] = TParamEntry("%bool", &sense_depth_);
65  params["sense_rgb"] = TParamEntry("%bool", &sense_rgb_);
66 
67  auto& depthCam = sensor_params_.cameraParams;
68  params["depth_cx"] = TParamEntry("%lf", &depthCam.intrinsicParams(0, 2));
69  params["depth_cy"] = TParamEntry("%lf", &depthCam.intrinsicParams(1, 2));
70  params["depth_fx"] = TParamEntry("%lf", &depthCam.intrinsicParams(0, 0));
71  params["depth_fy"] = TParamEntry("%lf", &depthCam.intrinsicParams(1, 1));
72 
73  unsigned int depth_ncols = depthCam.ncols, depth_nrows = depthCam.nrows;
74  params["depth_ncols"] = TParamEntry("%u", &depth_ncols);
75  params["depth_nrows"] = TParamEntry("%u", &depth_nrows);
76 
77  auto& rgbCam = sensor_params_.cameraParamsIntensity;
78  params["rgb_cx"] = TParamEntry("%lf", &rgbCam.intrinsicParams(0, 2));
79  params["rgb_cy"] = TParamEntry("%lf", &rgbCam.intrinsicParams(1, 2));
80  params["rgb_fx"] = TParamEntry("%lf", &rgbCam.intrinsicParams(0, 0));
81  params["rgb_fy"] = TParamEntry("%lf", &rgbCam.intrinsicParams(1, 1));
82 
83  unsigned int rgb_ncols = depthCam.ncols, rgb_nrows = depthCam.nrows;
84  params["rgb_ncols"] = TParamEntry("%u", &rgb_ncols);
85  params["rgb_nrows"] = TParamEntry("%u", &rgb_nrows);
86 
87  params["rgb_clip_min"] = TParamEntry("%f", &rgbClipMin_);
88  params["rgb_clip_max"] = TParamEntry("%f", &rgbClipMax_);
89  params["depth_clip_min"] = TParamEntry("%f", &depth_clip_min_);
90  params["depth_clip_max"] = TParamEntry("%f", &depth_clip_max_);
91  params["depth_resolution"] = TParamEntry("%f", &depth_resolution_);
92 
93  params["depth_noise_sigma"] = TParamEntry("%f", &depth_noise_sigma_);
94  params["show_3d_pointcloud"] = TParamEntry("%bool", &show_3d_pointcloud_);
95 
96  // Parse XML params:
98 
99  depthCam.ncols = depth_ncols;
100  depthCam.nrows = depth_nrows;
101 
102  rgbCam.ncols = rgb_ncols;
103  rgbCam.nrows = rgb_nrows;
104 
105  // save sensor label here too:
106  sensor_params_.sensorLabel = name_;
107 
108  sensor_params_.maxRange = depth_clip_max_;
109  sensor_params_.rangeUnits = depth_resolution_;
110 }
111 
113  const mrpt::optional_ref<mrpt::opengl::COpenGLScene>& viz,
114  [[maybe_unused]] const mrpt::optional_ref<mrpt::opengl::COpenGLScene>& physical,
115  [[maybe_unused]] bool childrenOnly)
116 {
117  mrpt::opengl::CSetOfObjects::Ptr glVizSensors;
118  if (viz)
119  {
120  glVizSensors = std::dynamic_pointer_cast<mrpt::opengl::CSetOfObjects>(
121  viz->get().getByName("group_sensors_viz"));
122  if (!glVizSensors) return; // may happen during shutdown
123  }
124 
125  // 1st time?
126  if (!gl_obs_ && glVizSensors)
127  {
128  gl_obs_ = mrpt::opengl::CPointCloudColoured::Create();
129  gl_obs_->setPointSize(2.0f);
130  gl_obs_->setLocalRepresentativePoint(sensor_params_.sensorPose.translation());
131  glVizSensors->insert(gl_obs_);
132  }
133 
134  if (!gl_sensor_origin_ && viz)
135  {
136  gl_sensor_origin_ = mrpt::opengl::CSetOfObjects::Create();
137 #if MRPT_VERSION >= 0x270
138  gl_sensor_origin_->castShadows(false);
139 #endif
140  gl_sensor_origin_corner_ = mrpt::opengl::stock_objects::CornerXYZSimple(0.15f);
141 
143 
144  gl_sensor_origin_->setVisibility(false);
145  viz->get().insert(gl_sensor_origin_);
147  }
148  if (!gl_sensor_fov_ && viz)
149  {
150  gl_sensor_fov_ = mrpt::opengl::CSetOfObjects::Create();
151  gl_sensor_fov_->setVisibility(false);
152  viz->get().insert(gl_sensor_fov_);
154  }
155 
156  if (!gui_uptodate_)
157  {
158  {
159  std::lock_guard<std::mutex> csl(last_obs_cs_);
160  if (last_obs2gui_ && glVizSensors->isVisible())
161  {
163  {
164  mrpt::obs::T3DPointsProjectionParams pp;
165  pp.takeIntoAccountSensorPoseOnRobot = true;
166  last_obs2gui_->unprojectInto(*gl_obs_, pp);
167  // gl_obs_->recolorizeByCoordinate() ...??
168  }
169 
170  gl_sensor_origin_corner_->setPose(last_obs2gui_->sensorPose);
171 
172  if (!gl_sensor_frustum_)
173  {
174  gl_sensor_frustum_ = mrpt::opengl::CSetOfObjects::Create();
175 
176  const float frustumScale = 0.4e-3;
177  auto frustum =
178  mrpt::opengl::CFrustum::Create(last_obs2gui_->cameraParams, frustumScale);
179 
180  gl_sensor_frustum_->insert(frustum);
182  }
183 
184  gl_sensor_frustum_->setPose(last_obs2gui_->sensorPose);
185 
186  last_obs2gui_.reset();
187  }
188  }
189  gui_uptodate_ = true;
190  }
191 
192  // Move with vehicle:
193  const auto& p = vehicle_.getPose();
194 
195  const auto pp = parent()->applyWorldRenderOffset(p);
196 
197  if (gl_obs_) gl_obs_->setPose(pp);
198  if (gl_sensor_fov_) gl_sensor_fov_->setPose(pp);
199  if (gl_sensor_origin_) gl_sensor_origin_->setPose(pp);
200 
201  if (glCustomVisual_) glCustomVisual_->setPose(pp + sensor_params_.sensorPose.asTPose());
202 }
203 
204 void DepthCameraSensor::simul_pre_timestep([[maybe_unused]] const TSimulContext& context) {}
205 
206 void DepthCameraSensor::simulateOn3DScene(mrpt::opengl::COpenGLScene& world3DScene)
207 {
208  using namespace mrpt; // _deg
209 
210  {
211  auto lckHasTo = mrpt::lockHelper(has_to_render_mtx_);
212  if (!has_to_render_.has_value()) return;
213  }
214 
215  auto tleWhole = mrpt::system::CTimeLoggerEntry(world_->getTimeLogger(), "sensor.RGBD");
216 
217  auto tle1 = mrpt::system::CTimeLoggerEntry(world_->getTimeLogger(), "sensor.RGBD.acqGuiMtx");
218 
219  tle1.stop();
220 
221  if (glCustomVisual_) glCustomVisual_->setVisibility(false);
222 
223  // Start making a copy of the pattern observation:
224  auto curObsPtr = mrpt::obs::CObservation3DRangeScan::Create(sensor_params_);
225  auto& curObs = *curObsPtr;
226 
227  // Set timestamp:
228  curObs.timestamp = world_->get_simul_timestamp();
229 
230  // Create FBO on first use, now that we are here at the GUI / OpenGL thread.
232  {
233  auto tle2 =
234  mrpt::system::CTimeLoggerEntry(world_->getTimeLogger(), "sensor.RGBD.createFBO");
235 
236  mrpt::opengl::CFBORender::Parameters p;
237  p.width = sensor_params_.cameraParamsIntensity.ncols;
238  p.height = sensor_params_.cameraParamsIntensity.nrows;
239  p.create_EGL_context = world()->sensor_has_to_create_egl_context();
240 
241  fbo_renderer_rgb_ = std::make_shared<mrpt::opengl::CFBORender>(p);
242  }
243 
245  {
246  auto tle2 =
247  mrpt::system::CTimeLoggerEntry(world_->getTimeLogger(), "sensor.RGBD.createFBO");
248 
249  mrpt::opengl::CFBORender::Parameters p;
250  p.width = sensor_params_.cameraParams.ncols;
251  p.height = sensor_params_.cameraParams.nrows;
252  p.create_EGL_context = world()->sensor_has_to_create_egl_context();
253 
254  fbo_renderer_depth_ = std::make_shared<mrpt::opengl::CFBORender>(p);
255  }
256 
257  auto viewport = world3DScene.getViewport();
258 
259  auto* camDepth = fbo_renderer_depth_ ? &fbo_renderer_depth_->getCamera(world3DScene) : nullptr;
260  auto* camRGB = fbo_renderer_rgb_ ? &fbo_renderer_rgb_->getCamera(world3DScene) : nullptr;
261 
262  const auto fixedAxisConventionRot =
263  mrpt::poses::CPose3D(0, 0, 0, -90.0_deg, 0.0_deg, -90.0_deg);
264 
265  // ----------------------------------------------------------
266  // RGB first with its camera intrinsics & clip distances
267  // ----------------------------------------------------------
268 
269  // RGB camera pose:
270  // vehicle (+) relativePoseOnVehicle (+) relativePoseIntensityWRTDepth
271  //
272  // Note: relativePoseOnVehicle should be (y,p,r)=(-90deg,0,-90deg) to make
273  // the camera to look forward:
274 
275  const auto vehiclePose = mrpt::poses::CPose3D(vehicle_.getPose());
276 
277  const auto depthSensorPose = vehiclePose + curObs.sensorPose + fixedAxisConventionRot;
278 
279  const auto rgbSensorPose =
280  vehiclePose + curObs.sensorPose + curObs.relativePoseIntensityWRTDepth;
281 
282  if (fbo_renderer_rgb_)
283  {
284  auto tle2 =
285  mrpt::system::CTimeLoggerEntry(world_->getTimeLogger(), "sensor.RGBD.renderRGB");
286 
287  camRGB->set6DOFMode(true);
288  camRGB->setProjectiveFromPinhole(curObs.cameraParamsIntensity);
289  camRGB->setPose(world()->applyWorldRenderOffset(rgbSensorPose));
290 
291  // viewport->setCustomBackgroundColor({0.3f, 0.3f, 0.3f, 1.0f});
292  viewport->setViewportClipDistances(rgbClipMin_, rgbClipMax_);
293 
294  fbo_renderer_rgb_->render_RGB(world3DScene, curObs.intensityImage);
295 
296  curObs.hasIntensityImage = true;
297  }
298  else
299  {
300  curObs.hasIntensityImage = false;
301  }
302 
303  // ----------------------------------------------------------
304  // DEPTH camera next
305  // ----------------------------------------------------------
307  {
308  auto tle2 = mrpt::system::CTimeLoggerEntry(world_->getTimeLogger(), "sensor.RGBD.renderD");
309 
310  camDepth->setProjectiveFromPinhole(curObs.cameraParams);
311 
312  // Camera pose: vehicle + relativePoseOnVehicle:
313  // Note: relativePoseOnVehicle should be (y,p,r)=(90deg,0,90deg) to make
314  // the camera to look forward:
315  camDepth->set6DOFMode(true);
316  camDepth->setPose(world()->applyWorldRenderOffset(depthSensorPose));
317 
318  // viewport->setCustomBackgroundColor({0.3f, 0.3f, 0.3f, 1.0f});
319  viewport->setViewportClipDistances(depth_clip_min_, depth_clip_max_);
320 
321  auto tle2c =
322  mrpt::system::CTimeLoggerEntry(world_->getTimeLogger(), "sensor.RGBD.renderD_core");
323 
324  fbo_renderer_depth_->render_depth(world3DScene, depthImage_);
325 
326  tle2c.stop();
327 
328  // Convert depth image:
329  curObs.hasRangeImage = true;
330  curObs.range_is_depth = true;
331 
332  auto tle2cnv =
333  mrpt::system::CTimeLoggerEntry(world_->getTimeLogger(), "sensor.RGBD.renderD_cast");
334 
335  // float -> uint16_t with "curObs.rangeUnits" units:
336  curObs.rangeImage_setSize(depthImage_.rows(), depthImage_.cols());
337  curObs.rangeImage =
338  (depthImage_.asEigen().cwiseMin(curObs.maxRange) / curObs.rangeUnits).cast<uint16_t>();
339 
340  tle2cnv.stop();
341 
342  // Add random noise:
343  if (depth_noise_sigma_ > 0)
344  {
345  // Each thread must create its own rng:
346  thread_local mrpt::random::CRandomGenerator rng;
347  thread_local std::vector<int16_t> noiseSeq;
348  thread_local size_t noiseIdx = 0;
349  constexpr size_t noiseLen = 7823; // prime
350  if (noiseSeq.empty())
351  {
352  noiseSeq.reserve(noiseLen);
353  for (size_t i = 0; i < noiseLen; i++)
354  {
355  noiseSeq.push_back(static_cast<int16_t>(mrpt::round(
356  rng.drawGaussian1D(0.0, depth_noise_sigma_) / curObs.rangeUnits)));
357  }
358  }
359 
360  auto tle2noise = mrpt::system::CTimeLoggerEntry(
361  world_->getTimeLogger(), "sensor.RGBD.renderD_noise");
362 
363  uint16_t* d = curObs.rangeImage.data();
364  const size_t N = curObs.rangeImage.size();
365 
366  const int16_t maxRangeInts = static_cast<int16_t>(curObs.maxRange / curObs.rangeUnits);
367 
368  for (size_t i = 0; i < N; i++)
369  {
370  if (d[i] == 0) continue; // it was an invalid ray return.
371 
372  const int16_t dNoisy = static_cast<int16_t>(d[i]) + noiseSeq[noiseIdx++];
373 
374  if (noiseIdx >= noiseLen) noiseIdx = 0;
375 
376  if (dNoisy > maxRangeInts) continue;
377 
378  d[i] = static_cast<uint16_t>(dNoisy);
379  }
380  }
381  }
382  else
383  {
384  curObs.hasRangeImage = false;
385  }
386 
387  // Store generated obs:
388  {
389  auto tle3 =
390  mrpt::system::CTimeLoggerEntry(world_->getTimeLogger(), "sensor.RGBD.acqObsMtx");
391 
392  std::lock_guard<std::mutex> csl(last_obs_cs_);
393  last_obs_ = std::move(curObsPtr);
395  }
396 
397  {
398  auto lckHasTo = mrpt::lockHelper(has_to_render_mtx_);
399 
400  auto tlePub = mrpt::system::CTimeLoggerEntry(world_->getTimeLogger(), "sensor.RGBD.report");
401 
403 
404  tlePub.stop();
405 
406  if (glCustomVisual_) glCustomVisual_->setVisibility(true);
407 
408  gui_uptodate_ = false;
409  has_to_render_.reset();
410  }
411 }
412 
413 // Simulate sensor AFTER timestep, with the updated vehicle dynamical state:
415 {
418  {
419  auto lckHasTo = mrpt::lockHelper(has_to_render_mtx_);
420  has_to_render_ = context;
422  }
423  // Keep sensor global pose up-to-date:
424  const auto& p = vehicle_.getPose();
425  const auto globalSensorPose = p + sensor_params_.sensorPose.asTPose();
426  Simulable::setPose(globalSensorPose, false /*do not notify*/);
427 }
428 
429 void DepthCameraSensor::notifySimulableSetPose(const mrpt::math::TPose3D& newPose)
430 {
431  // The editor has moved the sensor in global coordinates.
432  // Convert back to local:
433  const auto& p = vehicle_.getPose();
434  sensor_params_.sensorPose = mrpt::poses::CPose3D(newPose - p);
435 }
436 
438 {
439  fbo_renderer_depth_.reset();
440  fbo_renderer_rgb_.reset();
441 }
mvsim::VisualObject::parent
World * parent()
Definition: VisualObject.h:51
mvsim
Definition: Client.h:21
mvsim::DepthCameraSensor::fbo_renderer_rgb_
std::shared_ptr< mrpt::opengl::CFBORender > fbo_renderer_rgb_
Definition: DepthCameraSensor.h:78
mvsim::VisualObject::world_
World * world_
Definition: VisualObject.h:73
mvsim::SensorBase::make_sure_we_have_a_name
void make_sure_we_have_a_name(const std::string &prefix)
Assign a sensible default name/sensor label if none is provided:
Definition: SensorBase.cpp:252
mvsim::SensorBase::varValues_
std::map< std::string, std::string > varValues_
Filled in by SensorBase::loadConfigFrom()
Definition: SensorBase.h:97
mvsim::SensorBase::reportNewObservation
void reportNewObservation(const std::shared_ptr< mrpt::obs::CObservation > &obs, const TSimulContext &context)
Definition: SensorBase.cpp:159
mvsim::DepthCameraSensor::depthImage_
mrpt::math::CMatrixFloat depthImage_
Definition: DepthCameraSensor.h:101
mvsim::TParamEntry
Definition: TParameterDefinitions.h:38
mvsim::parse_xmlnode_children_as_param
void parse_xmlnode_children_as_param(const rapidxml::xml_node< char > &xml_node, const TParameterDefinitions &params, const std::map< std::string, std::string > &variableNamesValues={}, const char *functionNameContext="", mrpt::system::COutputLogger *logger=nullptr)
Definition: xml_utils.cpp:215
mvsim::DepthCameraSensor::depth_clip_max_
float depth_clip_max_
Definition: DepthCameraSensor.h:89
mvsim::World::applyWorldRenderOffset
mrpt::math::TPose3D applyWorldRenderOffset(mrpt::math::TPose3D p) const
Definition: World.h:631
World.h
mvsim::DepthCameraSensor::gui_uptodate_
bool gui_uptodate_
Definition: DepthCameraSensor.h:82
mvsim::SensorBase::vehicle_
Simulable & vehicle_
The vehicle this sensor is attached to.
Definition: SensorBase.h:82
mvsim::SensorBase
Virtual base class for all sensors.
Definition: SensorBase.h:34
mvsim::DepthCameraSensor::show_3d_pointcloud_
bool show_3d_pointcloud_
Definition: DepthCameraSensor.h:96
mvsim::DepthCameraSensor::gl_sensor_fov_
mrpt::opengl::CSetOfObjects::Ptr gl_sensor_fov_
Definition: DepthCameraSensor.h:99
mrpt
Definition: basic_types.h:36
mvsim::World::sensor_has_to_create_egl_context
bool sensor_has_to_create_egl_context()
Definition: World.cpp:191
xml_utils.h
f
f
mvsim::SensorBase::should_simulate_sensor
bool should_simulate_sensor(const TSimulContext &context)
Definition: SensorBase.cpp:262
mvsim::DepthCameraSensor::internalGuiUpdate
virtual void internalGuiUpdate(const mrpt::optional_ref< mrpt::opengl::COpenGLScene > &viz, const mrpt::optional_ref< mrpt::opengl::COpenGLScene > &physical, bool childrenOnly) override
Definition: DepthCameraSensor.cpp:112
mvsim::DepthCameraSensor::fbo_renderer_depth_
std::shared_ptr< mrpt::opengl::CFBORender > fbo_renderer_depth_
Definition: DepthCameraSensor.h:78
VehicleBase.h
mvsim::DepthCameraSensor::DepthCameraSensor
DepthCameraSensor(Simulable &parent, const rapidxml::xml_node< char > *root)
Definition: DepthCameraSensor.cpp:25
mvsim::SensorBase::world
World * world()
Definition: SensorBase.h:84
rapidxml
Definition: rapidxml.hpp:57
mvsim::TSimulContext
Definition: basic_types.h:58
mvsim::DepthCameraSensor::gl_sensor_origin_
mrpt::opengl::CSetOfObjects::Ptr gl_sensor_origin_
Definition: DepthCameraSensor.h:98
mvsim::World::get_simul_timestamp
mrpt::Clock::time_point get_simul_timestamp() const
Definition: World.h:137
mvsim::DepthCameraSensor::last_obs_
mrpt::obs::CObservation3DRangeScan::Ptr last_obs_
Definition: DepthCameraSensor.h:74
mvsim::DepthCameraSensor::simulateOn3DScene
void simulateOn3DScene(mrpt::opengl::COpenGLScene &gl_scene) override
Definition: DepthCameraSensor.cpp:206
mvsim::TParameterDefinitions
std::map< std::string, TParamEntry > TParameterDefinitions
Definition: TParameterDefinitions.h:64
mvsim::DepthCameraSensor::simul_post_timestep
virtual void simul_post_timestep(const TSimulContext &context) override
Definition: DepthCameraSensor.cpp:414
d
d
mvsim::Simulable::simul_post_timestep
virtual void simul_post_timestep(const TSimulContext &context)
Definition: Simulable.cpp:64
mvsim::World::mark_as_pending_running_sensors_on_3D_scene
void mark_as_pending_running_sensors_on_3D_scene()
Definition: World.h:223
mvsim::DepthCameraSensor::gl_obs_
mrpt::opengl::CPointCloudColoured::Ptr gl_obs_
Definition: DepthCameraSensor.h:83
mvsim::Simulable::name_
std::string name_
Definition: Simulable.h:145
mvsim::DepthCameraSensor::has_to_render_mtx_
std::mutex has_to_render_mtx_
Definition: DepthCameraSensor.h:86
mvsim::DepthCameraSensor::sense_depth_
bool sense_depth_
Simulate the DEPTH sensor part.
Definition: DepthCameraSensor.h:92
DepthCameraSensor.h
mvsim::DepthCameraSensor::sense_rgb_
bool sense_rgb_
Simulate the RGB sensor part.
Definition: DepthCameraSensor.h:93
mvsim::DepthCameraSensor::gl_sensor_frustum_
mrpt::opengl::CSetOfObjects::Ptr gl_sensor_frustum_
Definition: DepthCameraSensor.h:99
mvsim::Simulable::setPose
void setPose(const mrpt::math::TPose3D &p, bool notifyChange=true) const
Definition: Simulable.cpp:474
mvsim::DepthCameraSensor::simul_pre_timestep
virtual void simul_pre_timestep(const TSimulContext &context) override
Definition: DepthCameraSensor.cpp:204
rapidxml::xml_node< char >
mvsim::DepthCameraSensor::depth_noise_sigma_
float depth_noise_sigma_
Definition: DepthCameraSensor.h:95
mvsim::Simulable
Definition: Simulable.h:39
mvsim::DepthCameraSensor::rgbClipMin_
float rgbClipMin_
Definition: DepthCameraSensor.h:88
mvsim::DepthCameraSensor::rgbClipMax_
float rgbClipMax_
Definition: DepthCameraSensor.h:88
mvsim::SensorBase::loadConfigFrom
virtual void loadConfigFrom(const rapidxml::xml_node< char > *root)
Definition: SensorBase.cpp:231
mvsim::Simulable::getPose
mrpt::math::TPose3D getPose() const
Definition: Simulable.cpp:490
mvsim::DepthCameraSensor::~DepthCameraSensor
virtual ~DepthCameraSensor()
Definition: DepthCameraSensor.cpp:31
mvsim::World::getTimeLogger
mrpt::system::CTimeLogger & getTimeLogger()
Definition: World.h:321
root
root
mvsim::DepthCameraSensor::gl_sensor_origin_corner_
mrpt::opengl::CSetOfObjects::Ptr gl_sensor_origin_corner_
Definition: DepthCameraSensor.h:98
mvsim::VisualObject::glCustomVisual_
std::shared_ptr< mrpt::opengl::CSetOfObjects > glCustomVisual_
Definition: VisualObject.h:77
mvsim::DepthCameraSensor::notifySimulableSetPose
void notifySimulableSetPose(const mrpt::math::TPose3D &newPose) override
Definition: DepthCameraSensor.cpp:429
mvsim::DepthCameraSensor::has_to_render_
std::optional< TSimulContext > has_to_render_
Definition: DepthCameraSensor.h:85
mvsim::DepthCameraSensor::last_obs_cs_
std::mutex last_obs_cs_
Definition: DepthCameraSensor.h:72
mvsim::DepthCameraSensor::loadConfigFrom
virtual void loadConfigFrom(const rapidxml::xml_node< char > *root) override
Definition: DepthCameraSensor.cpp:33
mvsim::DepthCameraSensor::freeOpenGLResources
void freeOpenGLResources() override
Definition: DepthCameraSensor.cpp:437
mvsim::SensorBase::RegisterSensorFOVViz
static void RegisterSensorFOVViz(const std::shared_ptr< mrpt::opengl::CSetOfObjects > &o)
Definition: SensorBase.cpp:73
mvsim::DepthCameraSensor::sensor_params_
mrpt::obs::CObservation3DRangeScan sensor_params_
Definition: DepthCameraSensor.h:70
mvsim::DepthCameraSensor::last_obs2gui_
mrpt::obs::CObservation3DRangeScan::Ptr last_obs2gui_
Definition: DepthCameraSensor.h:75
mvsim::SensorBase::RegisterSensorOriginViz
static void RegisterSensorOriginViz(const std::shared_ptr< mrpt::opengl::CSetOfObjects > &o)
Definition: SensorBase.cpp:78
mvsim::DepthCameraSensor::depth_clip_min_
float depth_clip_min_
Definition: DepthCameraSensor.h:89
mvsim::DepthCameraSensor::depth_resolution_
float depth_resolution_
Definition: DepthCameraSensor.h:90


mvsim
Author(s):
autogenerated on Wed May 28 2025 02:13:07