42 #include <OgreSceneNode.h> 43 #include <OgreSceneManager.h> 48 const RobotStateVisualizationPtr& robot)
49 : planning_scene_geometry_node_(node->createChildSceneNode()), context_(context), scene_robot_(robot)
77 robot_state::RobotState* rs =
new robot_state::RobotState(scene->getCurrentState());
80 std_msgs::ColorRGBA color;
81 color.r = default_attached_color.
r_;
82 color.g = default_attached_color.
g_;
83 color.b = default_attached_color.
b_;
86 scene->getKnownObjectColors(color_map);
87 scene_robot_->update(robot_state::RobotStateConstPtr(rs), color, color_map);
90 const std::vector<std::string>& ids = scene->getWorld()->getObjectIds();
91 for (std::size_t i = 0; i < ids.size(); ++i)
95 float alpha = default_scene_alpha;
96 if (scene->hasObjectColor(ids[i]))
98 const std_msgs::ColorRGBA& c = scene->getObjectColor(ids[i]);
104 for (std::size_t j = 0; j < o->shapes_.size(); ++j)
106 octree_voxel_rendering, octree_color_mode, color, alpha);
rviz::DisplayContext * context_
PlanningSceneRender(Ogre::SceneNode *root_node, rviz::DisplayContext *context, const RobotStateVisualizationPtr &robot)
World::ObjectConstPtr ObjectConstPtr
std::map< std::string, std_msgs::ColorRGBA > ObjectColorMap
virtual Ogre::SceneManager * getSceneManager() const =0
RenderShapesPtr render_shapes_
RobotStateVisualizationPtr scene_robot_
void renderPlanningScene(const planning_scene::PlanningSceneConstPtr &scene, const rviz::Color &default_scene_color, const rviz::Color &default_attached_color, OctreeVoxelRenderMode voxel_render_mode, OctreeVoxelColorMode voxel_color_mode, float default_scene_alpha)
Ogre::SceneNode * planning_scene_geometry_node_