ros2_control - kilted
Loading...
Searching...
No Matches
mujoco_ros2_control::SensorUpdateRate Struct Reference

#include <data.hpp>

Public Member Functions

bool is_update_due (double time)
 Returns whether the sensor should be refreshed at simulation time time, and if so schedules the next refresh. Must be called once per read().

Public Attributes

double period = 0.0
double next_update_time = -std::numeric_limits<double>::infinity()

Detailed Description

Gates how often a sensor's state interfaces are refreshed, set per ros2_control sensor via the update_rate parameter (Hz). Between refreshes the last value (noise included) is held, so e.g. a 20 Hz IMU read by a 200 Hz controller manager changes once every 10 cycles.

Parameters
periodSeconds between refreshes; 0 (the default, update_rate unset) refreshes on every read().
next_update_timeSimulation time at or after which the next refresh is due.

The documentation for this struct was generated from the following file: