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:

GazeboRateControlNode()

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)

receive_sync_source(_)

Attempt to synchronize specified source topic and topic.

update()

Adjust Gazebos update rate to meet desired output frequency of the target topic.

start()[source]

Called when activating the node.

stop()[source]

Called when deactivating or shutting down the node.

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

_update_properties(update_rate)[source]
receive_sync_source(_)[source]

Attempt to synchronize specified source topic and topic.

The basic idea is that some run time dependent components (messages) should be published closely after another. This synchronization (pausing) ensures the same behavior in the simulation.

update()[source]

Adjust Gazebos update rate to meet desired output frequency of the target topic.

Module contents