![]() |
ros2_control - kilted
|
Plugin wrapper of the included 3D Lidar MuJoCo extension. More...
#include <mujoco_3d_lidar_plugin.hpp>


Public Member Functions | |
| bool | init (rclcpp::Node::SharedPtr node, const mjModel *model, mjData *data) override |
| Initializes a new MujocoLidar wrapper object for 3d lidar sensors. | |
| void | update_write (const mjModel *model, mjData *data) override |
| Callback to update the plugin's data. | |
| void | cleanup () override |
| Destructs the plugin and all relevant data. | |
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 of the included 3D Lidar MuJoCo extension.
Will convert 3d_lidar sensor data from the physics simulation into the appropriate message and publish to the configured topic. Supports both 2-D and 3-D lidar sensor configs, and will publish either LaserScan or PointCloud messages according to the sensor type.
|
overridevirtual |
Destructs the plugin and all relevant data.
Implements mujoco_ros2_control_plugins::MuJoCoROS2ControlPluginBase.
|
overridevirtual |
Initializes a new MujocoLidar wrapper object for 3d lidar sensors.
| node | Will be used to construct laserscan publishers |
| model | MuJoCo model for the simulation |
| data | MuJoCo data for the simulation |
Implements mujoco_ros2_control_plugins::MuJoCoROS2ControlPluginBase.
|
overridevirtual |
Callback to update the plugin's data.
Iterates over each lidar sensor and checks if new data is available. If not, this does nothing. If so, this will copy the sensor data into a relevant message type and publish it.
Reimplemented from mujoco_ros2_control_plugins::MuJoCoROS2ControlPluginBase.