File tree Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Expand file tree Collapse file tree 1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -63,9 +63,6 @@ bool Tesseract::init(tesseract_scene_graph::SceneGraph::Ptr scene_graph)
63
63
return false ;
64
64
}
65
65
66
- auto srdf = std::make_shared<tesseract_scene_graph::SRDFModel>();
67
- srdf->getName () = scene_graph->getName ();
68
-
69
66
registerDefaultContactManagers ();
70
67
71
68
initialized_ = true ;
@@ -249,10 +246,16 @@ bool Tesseract::init(const boost::filesystem::path& urdf_path,
249
246
bool Tesseract::init (const tesseract_environment::Environment& env)
250
247
{
251
248
clear ();
252
- init_info_ = std::make_shared<TesseractInitInfo>();
253
- init_info_->type = TesseractInitType::ENVIRONMENT;
254
- init_info_->environment = env.clone ();
255
- initialized_ = true ;
249
+
250
+ environment_ = env.clone ();
251
+ initialized_ = (environment_ != nullptr );
252
+ if (initialized_)
253
+ {
254
+ init_info_ = std::make_shared<TesseractInitInfo>();
255
+ init_info_->type = TesseractInitType::ENVIRONMENT;
256
+ init_info_->environment = env.clone ();
257
+ }
258
+
256
259
return initialized_;
257
260
}
258
261
You can’t perform that action at this time.
0 commit comments