#include <SimulationTimeSource.h>
Inherits ROS2::ITimeSource.
|
virtual void | Activate () override |
|
virtual void | Deactivate () override |
|
virtual AZ::Outcome< void, AZStd::string > | AdjustTime (const builtin_interfaces::msg::Time &time) override |
|
virtual builtin_interfaces::msg::Time | GetROSTimestamp () const override |
|
The SimulationTimeSource provides timestamps calculated using updates from the physics engine. Simulation paces the clock with stable steps, and as a result, this time source eliminates data jitter. The simulated time can be faster or slower than the real-time, according to the configuration of the physics engine. SimulationTimeSource is used as the default time source for the projects. The simulated clock is incremented with delta times that were simulated by physics. The time source registers and observes AZ::PhysicsScene and when the simulation starts, it attaches and starts counting the updates. It is recommended to use it with high-frequency sensors such as odometry and IMUs.
◆ Activate()
virtual void ROS2::SimulationTimeSource::Activate |
( |
| ) |
|
|
overridevirtual |
◆ AdjustTime()
virtual AZ::Outcome< void, AZStd::string > ROS2::SimulationTimeSource::AdjustTime |
( |
const builtin_interfaces::msg::Time & |
time | ) |
|
|
overridevirtual |
Sets the time source to the given time.
- Parameters
-
time | The time to set the time source to. |
- Returns
- An outcome indicating success or failure.
Implements ROS2::ITimeSource.
◆ Deactivate()
virtual void ROS2::SimulationTimeSource::Deactivate |
( |
| ) |
|
|
overridevirtual |
◆ GetROSTimestamp()
virtual builtin_interfaces::msg::Time ROS2::SimulationTimeSource::GetROSTimestamp |
( |
| ) |
const |
|
overridevirtual |
The documentation for this class was generated from the following file:
- Gems/ROS2/Code/Include/ROS2/Clock/SimulationTimeSource.h