gazebo / tools / Toolbase.hh


#include <map>
#include <vector>
#include <yaml.h>

#include "libgazebo/gz.h"

class Toolbase
  /// \brief Constructor
  public: Toolbase();

  /// \brief Destructor
  public: virtual ~Toolbase();

  /// \brief Init the tool
  public: bool Init(int argc, char **argv);

  /// \brief Run the tool
  public: virtual bool Run();

  /// \brief Pause the simulation
  public: void Pause();

  /// \brief Run the simulation
  public: void Unpause();

  /// \brief Step the simulation
  public: void Step();

  /// \brief Pause the simulation
  public: void Reset();

  public: virtual void Help() = 0;

  /// \brief Parse yaml parameters
  private: void ParseYAML();

  /// \brief Print all the commands to stdout
  protected: void PrintCommands(std::string prefix);

  protected: libgazebo::Client *client;
  protected: libgazebo::SimulationIface *simIface;
  protected: libgazebo::FactoryIface *factoryIface;

  protected: std::map<std::string, std::string> yamlValues;
  protected: std::vector<std::string> params;

  protected: yaml_parser_t parser;
  protected: yaml_event_t event;


Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.