File tree Expand file tree Collapse file tree 3 files changed +9
-9
lines changed
tesseract_task_composer/examples Expand file tree Collapse file tree 3 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -124,10 +124,10 @@ int main()
124124 task_composer.addEdges (task1_id, { task2_id });
125125 task_composer.addEdges (task2_id, { task3_id });
126126
127- const std::string share_dir (TESSERACT_TASK_COMPOSER_DIR);
128127 tesseract_common::GeneralResourceLocator locator;
129- tesseract_common::fs::path config_path (share_dir + " /config/task_composer_plugins.yaml" );
130- TaskComposerPluginFactory factory (config_path, locator);
128+ auto resource = locator.locateResource (" package://tesseract_task_composer/config/task_composer_plugins.yaml" );
129+ tesseract_common::fs::path config_path (resource->getFilePath ());
130+ TaskComposerPluginFactory factory (config_path, *resource);
131131
132132 auto task_executor = factory.createTaskComposerExecutor (" TaskflowExecutor" );
133133 TaskComposerFuture::UPtr future = task_executor->run (task_composer, std::move (task_data));
Original file line number Diff line number Diff line change @@ -50,9 +50,9 @@ int main()
5050 plotter->plotEnvironment (*env);
5151 }
5252 // Get plugin factory
53- const std::string share_dir (TESSERACT_TASK_COMPOSER_DIR );
54- tesseract_common::fs::path config_path (share_dir + " /config/task_composer_plugins.yaml " );
55- TaskComposerPluginFactory factory (config_path, *locator );
53+ auto resource = locator-> locateResource ( " package://tesseract_task_composer/config/task_composer_plugins.yaml " );
54+ tesseract_common::fs::path config_path (resource-> getFilePath () );
55+ TaskComposerPluginFactory factory (config_path, *resource );
5656
5757 // Create raster task
5858 TaskComposerNode::UPtr task = factory.createTaskComposerNode (" RasterFtPipeline" );
Original file line number Diff line number Diff line change @@ -51,9 +51,9 @@ int main()
5151 plotter->plotEnvironment (*env);
5252 }
5353 // Get plugin factory
54- const std::string share_dir (TESSERACT_TASK_COMPOSER_DIR );
55- tesseract_common::fs::path config_path (share_dir + " /config/task_composer_plugins.yaml " );
56- TaskComposerPluginFactory factory (config_path, *locator );
54+ auto resource = locator-> locateResource ( " package://tesseract_task_composer/config/task_composer_plugins.yaml " );
55+ tesseract_common::fs::path config_path (resource-> getFilePath () );
56+ TaskComposerPluginFactory factory (config_path, *resource );
5757
5858 // Create trajopt pipeline
5959 TaskComposerNode::UPtr task = factory.createTaskComposerNode (" TrajOptPipeline" );
You can’t perform that action at this time.
0 commit comments