Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[main] Add option to disable Octomap in Rviz Rendering Tools #606

Merged
merged 4 commits into from Aug 17, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -112,6 +112,7 @@ PlanningSceneDisplay::PlanningSceneDisplay(bool listen_to_planning_scene, bool s
octree_render_property_->addOption("Occupied Voxels", OCTOMAP_OCCUPIED_VOXELS);
octree_render_property_->addOption("Free Voxels", OCTOMAP_FREE_VOXELS);
octree_render_property_->addOption("All Voxels", OCTOMAP_FREE_VOXELS | OCTOMAP_OCCUPIED_VOXELS);
octree_render_property_->addOption("Disabled", OCTOMAP_DISABLED);

octree_coloring_property_ = new rviz_common::properties::EnumProperty(
"Voxel Coloring", "Z-Axis", "Select voxel coloring mode", scene_category_, SLOT(changedOctreeColorMode()), this);
Expand Down
Expand Up @@ -54,7 +54,8 @@ namespace moveit_rviz_plugin
enum OctreeVoxelRenderMode
{
OCTOMAP_FREE_VOXELS = 1,
OCTOMAP_OCCUPIED_VOXELS = 2
OCTOMAP_OCCUPIED_VOXELS = 2,
OCTOMAP_DISABLED = 3
};

enum OctreeVoxelColorMode
Expand Down
Expand Up @@ -156,11 +156,14 @@ void RenderShapes::renderShape(Ogre::SceneNode* node, const shapes::Shape* s, co

case shapes::OCTREE:
{
OcTreeRenderPtr octree(new OcTreeRender(static_cast<const shapes::OcTree*>(s)->octree, octree_voxel_rendering,
octree_color_mode, 0u, node));
octree->setPosition(position);
octree->setOrientation(orientation);
octree_voxel_grids_.push_back(octree);
if (octree_voxel_rendering != OCTOMAP_DISABLED)
henningkayser marked this conversation as resolved.
Show resolved Hide resolved
{
OcTreeRenderPtr octree(new OcTreeRender(static_cast<const shapes::OcTree*>(s)->octree, octree_voxel_rendering,
AdamPettinger marked this conversation as resolved.
Show resolved Hide resolved
octree_color_mode, 0u, node));
octree->setPosition(position);
octree->setOrientation(orientation);
octree_voxel_grids_.push_back(octree);
}
}
break;

Expand Down