Skip to content

Commit 16769a3

Browse files
committed
BUGFIX: Gridmap viz wont update
1 parent ec67e8f commit 16769a3

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

apps/GridmapNavSimul/gridmapSimulMain.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,8 @@ CPose2D lastOdo, pose_start;
131131
bool we_are_closing = false;
132132
long decimation = 1;
133133

134-
mrpt::opengl::CSetOfObjects::Ptr gl_grid;
134+
auto gl_grid = mrpt::opengl::CSetOfObjects::Create();
135+
135136
mrpt::opengl::CSetOfObjects::Ptr gl_robot;
136137
mrpt::opengl::CPlanarLaserScan::Ptr gl_scan;
137138
mrpt::opengl::CPointCloud::Ptr gl_path_GT;
@@ -652,7 +653,11 @@ gridmapSimulFrame::~gridmapSimulFrame()
652653
//*)
653654
}
654655

655-
void gridmapSimulFrame::update_grid_map_3d() { gl_grid = the_grid.getVisualization(); }
656+
void gridmapSimulFrame::update_grid_map_3d()
657+
{
658+
gl_grid->clear();
659+
gl_grid->insert(the_grid.getVisualization());
660+
}
656661

657662
void gridmapSimulFrame::OnbtnQuitClick(wxCommandEvent& event)
658663
{

doc/source/doxygen-docs/changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
- Fix appstreamcli warnings in metadata XML files.
66
- BUG FIXES:
77
- mrpt::maps::CPointsMapXYZIRT::getPointRGB() now handles the case of no intensity without throwing, fixing the visualization of such clouds through mrpt::opengl::CPointCloudColoured::loadFromPointsMap().
8+
- GridmapNavSimul: Loading a different gridmap won't update the map visualization.
89

910
# Version 2.14.4: Released Oct 19th, 2024
1011
- BUG FIXES:

0 commit comments

Comments
 (0)