simulation.src.gazebo_simulation.src.gazebo_rate_control package¶
Submodules¶
simulation.src.gazebo_simulation.src.gazebo_rate_control.node module¶
Adjusts Gazebos update rate to guarantee sensor updates with desired frequency.
Classes:
Control gazebos update rate to meet desired sensor update rates. |
- class GazeboRateControlNode[source]¶
Bases:
simulation.utils.ros_base.node_base.NodeBase
Control gazebos update rate to meet desired sensor update rates.
- relevant_targets¶
Topics that should be monitored and update rate that the topic should have.
- Type
List[Dict[str, Any]]
- _last_target_update¶
Last time the targets were updated.
- Type
float
- _last_target_frequencies¶
Last known update rate of each target.
- Type
List[float]
Methods:
start
()Called when activating the node.
stop
()Called when deactivating or shutting down the node.
_calculate_update_rate
(update_rate, …)Calculate new update rate.
_update_properties
(update_rate)Attempt to synchronize specified source topic and topic.
update
()Adjust Gazebos update rate to meet desired output frequency of the target topic.
- _calculate_update_rate(update_rate: float, frequency: float, desired_frequency: float) → float[source]¶
Calculate new update rate.
- Parameters
update_rate – Gazebo’s current maximum update_rate
frequency – Current frequency
desired_frequency – Optimal frequency
- Returns
New maximum update rate.