Class Ros2Compass

Inheritance Relationships

Base Type

Class Documentation

class Ros2Compass : public webots_ros2_driver::Ros2SensorPlugin

Public Functions

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.

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).