Class PythonPlugin

Inheritance Relationships

Base Type

Class Documentation

class PythonPlugin : public webots_ros2_driver::PluginInterface

Public Functions

virtual void init(webots_ros2_driver::WebotsNode *node, std::unordered_map<std::string, std::string> &parameters) override

Prepare your plugin in this method. Fired before the node is spinned. Parameters are passed from the WebotsNode and/or from URDF.

Parameters:
  • node[in] WebotsNode inherited from rclcpp::Node with a few extra methods related

  • parameters[in] Parameters (key-value pairs) located under a <plugin> (dynamically loaded plugins) or <ros> (statically loaded plugins).

virtual void step() override

This method is called on each timestep. You should not call robot.step() in this method as it is automatically called.

void stop()

Public Static Functions

static std::shared_ptr<PythonPlugin> createFromType(const std::string &type)