You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The FMIAdapterNode uses a standard ROS timer to advance the FMU simulation. If the timer's period is not much greater than the simulation step-size but close to it, the FMIAdapterNode frequently emits a warning "Simulation time [..] is greater than timer's time [..]. Is your step size to large?" as an info-level log message.
Explanation
Internally, the timer callback of FMIAdapterNode calls FMIAdapter::doStepsUntil(..) with the current ROS time obtained from Node::now(). Given this current ROS time, the function FMIAdapter::doStepsUntil(..) performs simulation steps until a time-point between now() - step_size/2 and now() + step_size/2 is reached, i.e., it rounds to the closest step-size.
If in the next invocation of the timer callback the current ROS time now() is still smaller than the time-point until the FMU simulation was advanced in the previous invocation, then the timer callback emits the warning stated above. This happens especially if the timer period is only slightly larger than the step-size and if the processing of the timer callback is preempted by other processes or threads.
Possible fixes
Remove the warning completely.
Reduce the number of warnings (e.g., only a first time and then only once per minute).
Notes
Independent of this warning: If FMIAdapter::doStepsUntil(..) is called with an older time-point that would cause a backward step, a runtime error is thrown.
The text was updated successfully, but these errors were encountered:
The
FMIAdapterNode
uses a standard ROS timer to advance the FMU simulation. If the timer's period is not much greater than the simulation step-size but close to it, theFMIAdapterNode
frequently emits a warning "Simulation time [..] is greater than timer's time [..]. Is your step size to large?" as an info-level log message.Explanation
Internally, the timer callback of
FMIAdapterNode
callsFMIAdapter::doStepsUntil(..)
with the current ROS time obtained fromNode::now()
. Given this current ROS time, the functionFMIAdapter::doStepsUntil(..)
performs simulation steps until a time-point betweennow() - step_size/2
andnow() + step_size/2
is reached, i.e., it rounds to the closest step-size.If in the next invocation of the timer callback the current ROS time
now()
is still smaller than the time-point until the FMU simulation was advanced in the previous invocation, then the timer callback emits the warning stated above. This happens especially if the timer period is only slightly larger than the step-size and if the processing of the timer callback is preempted by other processes or threads.Possible fixes
Notes
Independent of this warning: If
FMIAdapter::doStepsUntil(..)
is called with an older time-point that would cause a backward step, a runtime error is thrown.The text was updated successfully, but these errors were encountered: