![]() |
ros2_control - kilted
|
Plugin wrapper for MuJoCo rangefinder-based lidar sensors. More...
#include <rangefinder_lidar_plugin.hpp>


Public Member Functions | |
| bool | init (rclcpp::Node::SharedPtr node, const mjModel *model, mjData *data) override |
| Initialize the plugin. | |
| void | update_write (const mjModel *model, mjData *data) override |
Called once per write() cycle, on the control thread, after the hardware interface has staged the controller commands and right before they are sent to the simulation. | |
| void | cleanup () override |
| Cleanup the plugin. | |
Public Member Functions inherited from mujoco_ros2_control_plugins::MuJoCoROS2ControlPluginBase | |
| virtual void | update_read (const mjModel *, mjData *) |
Called once per read() cycle, on the control thread, before the state is handed to ros2_control. Default does nothing. | |
| virtual void | update (const mjModel *, mjData *) |
Same as update_write(). Default does nothing. | |
| virtual void | pre_step (mjData *) |
| Called immediately before every simulation step on the physics thread. Default does nothing. | |
| virtual void | on_reset (mjData *) |
| Called after a world reset (ResetWorld service or UI reset). Default does nothing. | |
Plugin wrapper for MuJoCo rangefinder-based lidar sensors.
This handles the legacy pattern where individual mjSENS_RANGEFINDER sensors are grouped by name convention (e.g. lidar_name-0, lidar_name-1, ...) and published as LaserScan messages.
|
overridevirtual |
Cleanup the plugin.
Implements mujoco_ros2_control_plugins::MuJoCoROS2ControlPluginBase.
|
overridevirtual |
Initialize the plugin.
| node | Shared pointer to the ROS 2 node for accessing parameters |
| model | Pointer to the MuJoCo model |
| data | Pointer to the MuJoCo data |
Implements mujoco_ros2_control_plugins::MuJoCoROS2ControlPluginBase.
|
overridevirtual |
Called once per write() cycle, on the control thread, after the hardware interface has staged the controller commands and right before they are sent to the simulation.
Plugins run in order and can read and rewrite ctrl/qfrc_applied. The default forwards to the deprecated update() so plugins that still override it keep working.
| model | Pointer to the MuJoCo model |
| data | Pointer to a recent snapshot (not the live mj_data_) |
Reimplemented from mujoco_ros2_control_plugins::MuJoCoROS2ControlPluginBase.