Skip to content

Commit

Permalink
Use unique material names for robot links. (#1102)
Browse files Browse the repository at this point in the history
  • Loading branch information
de-vri-es authored and wjwwood committed Jun 5, 2017
1 parent 81e8771 commit 18b109a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/rviz/robot/robot_link.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ RobotLink::RobotLink( Robot* robot,
// create material for coloring links
std::stringstream ss;
static int count = 1;
ss << "robot link color material " << count;
ss << "robot link color material " << count++;
color_material_ = Ogre::MaterialManager::getSingleton().create( ss.str(), ROS_PACKAGE_NAME );
color_material_->setReceiveShadows(false);
color_material_->getTechnique(0)->setLightingEnabled(true);
Expand Down Expand Up @@ -451,7 +451,7 @@ Ogre::MaterialPtr RobotLink::getMaterialForLink( const urdf::LinkConstSharedPtr&

static int count = 0;
std::stringstream ss;
ss << "Robot Link Material" << count;
ss << "Robot Link Material" << count++;

Ogre::MaterialPtr mat = Ogre::MaterialManager::getSingleton().create(ss.str(), ROS_PACKAGE_NAME);
mat->getTechnique(0)->setLightingEnabled(true);
Expand Down

0 comments on commit 18b109a

Please sign in to comment.