Skip to content

Commit b83cd07

Browse files
authored
Check not null world_
1 parent 84065c0 commit b83cd07

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

voxblox_ros/src/simulation_server.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ SimulationServer::SimulationServer(const ros::NodeHandle& nh,
162162
bool SimulationServer::generatePlausibleViewpoint(FloatingPoint min_distance,
163163
Point* ray_origin,
164164
Point* ray_direction) const {
165+
CHECK_NOTNULL(world_);
165166
// Generate a viewpoint at least min_distance from any objects (if you want
166167
// just outside an object, just call this with min_distance = 0).
167168

@@ -217,6 +218,7 @@ void SimulationServer::generateSDF() {
217218
ptcloud.clear();
218219
colors.clear();
219220

221+
CHECK_NOTNULL(world_);
220222
world_->getPointcloudFromViewpoint(view_origin, view_direction,
221223
depth_camera_resolution_, fov_h_rad_,
222224
max_dist_, &ptcloud, &colors);

0 commit comments

Comments
 (0)