Skip to content

Commit

Permalink
Fix adding Octree to entity_container
Browse files Browse the repository at this point in the history
  • Loading branch information
rjoomen committed May 1, 2024
1 parent 92aa625 commit bc4ed46
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions tesseract_rviz/src/conversions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -746,14 +746,15 @@ Ogre::SceneNode* loadLinkGeometry(Ogre::SceneManager& scene,

for (unsigned i = 0; i < octree_depth; ++i)
{
OctreeDataContainer data;
data.size = static_cast<float>(octree->getNodeSize(static_cast<unsigned>(i + 1)));
data.points = std::vector<rviz_rendering::PointCloud::Point>(pointBuf[i]);
data.point_cloud = createPointCloud(std::move(pointBuf[i]), entity_container, data.size, octomap.getSubType());
data.shape_type = octomap.getSubType();

offset_node->attachObject(data.point_cloud.get());
entity_container.addUntrackedUnmanagedObject(tesseract_gui::EntityContainer::VISUAL_NS, data.point_cloud);
auto data = std::make_shared<OctreeDataContainer>();
data->size = static_cast<float>(octree->getNodeSize(static_cast<unsigned>(i + 1)));
data->points = std::vector<rviz_rendering::PointCloud::Point>(pointBuf[i]);
data->point_cloud =
createPointCloud(std::move(pointBuf[i]), entity_container, data->size, octomap.getSubType());
data->shape_type = octomap.getSubType();

offset_node->attachObject(data->point_cloud.get());
entity_container.addUntrackedUnmanagedObject(tesseract_gui::EntityContainer::VISUAL_NS, data);
}

offset_node->setScale(ogre_scale);
Expand Down

0 comments on commit bc4ed46

Please sign in to comment.