tesseract-robotics / tesseract_ignition

https://tesseract-ignition.readthedocs.io
7 stars 5 forks source link

Example usage #3

Open mpowelson opened 4 years ago

mpowelson commented 4 years ago

Is there an example of how to use this with the snap package? Specifically, I want to plot an environment using tesseract_ignition.

mpowelson commented 4 years ago

Turns out there were some issues on my side and also an issue in the snap package (that was fixed in version 0.14). Here are some sparse instructions for getting it working

1) Install snap from snap store 2) Install dependencies ignition-common3, ignition-transport8, ignition-msgs5, ignition-math6-eigen3 3) Rebuild tesseract_visualization to so that the ignition plugin is compiled. You should see this message "Ignition Visualization Library will be built!" 4) Launch visualization with tesseract-ignition.tesseract-visualization 5) Use visualization loader to load the plugin and plot away see example here.

  // Dynamically load ignition visualizer if exist
  tesseract_visualization::VisualizationLoader loader;
  auto plotter = loader.get();

  if (plotter != nullptr && tesseract != nullptr)
  {
    plotter->init(tesseract);
    plotter->waitForConnection(3);
    plotter->plotEnvironment();
  }