52 state_monitors_.clear();
53 model_loaders_.clear();
58 std::map<std::string, robot_model_loader::RobotModelLoaderPtr> model_loaders_;
59 std::map<std::string, planning_scene_monitor::CurrentStateMonitorPtr> state_monitors_;
62 SharedStorage& getSharedStorage()
64 #if 0 // destruction of static storage interferes with static destruction in class_loader 67 static SharedStorage storage;
69 #else // thus avoid destruction at all (until class_loader is fixed) 70 static SharedStorage* storage =
new SharedStorage;
82 SharedStorage&
s = getSharedStorage();
83 boost::mutex::scoped_lock slock(s.lock_);
91 SharedStorage&
s = getSharedStorage();
92 boost::mutex::scoped_lock slock(s.lock_);
93 if (s.model_loaders_.find(robot_description) != s.model_loaders_.end())
94 return s.model_loaders_[robot_description]->getModel();
100 s.model_loaders_[robot_description] = loader;
101 return loader->getModel();
115 SharedStorage&
s = getSharedStorage();
116 boost::mutex::scoped_lock slock(s.lock_);
117 if (s.state_monitors_.find(kmodel->getName()) != s.state_monitors_.end())
118 return s.state_monitors_[kmodel->getName()];
121 planning_scene_monitor::CurrentStateMonitorPtr monitor(
123 s.state_monitors_[kmodel->getName()] = monitor;
boost::shared_ptr< tf::Transformer > getSharedTF()
planning_scene_monitor::CurrentStateMonitorPtr getSharedStateMonitor(const robot_model::RobotModelConstPtr &kmodel, const boost::shared_ptr< tf::Transformer > &tf)
getSharedStateMonitor is a simpler version of getSharedStateMonitor(const robot_model::RobotModelCons...
bool load_kinematics_solvers_
robot_model::RobotModelConstPtr getSharedRobotModel(const std::string &robot_description)