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
I'm running zephyr native sim on lockstep with a robotics simulator "Gazebo". Currently I'm just disabling the realtime feature and then polling on on ringbuf is_empty using nanosleep to sleep the thread every millisecond.
It would be great if there was an external clock api where the zephyr cpu could be paused until I tell it to run until it reaches a given timestamp. Something like:
@jgoppert
If I understand what you are describing, what you would like to do, should already be possible today without any modification to the native_simulator runner or Zephyr code.
(If you are using Zephyr's native_sim and its system tick timer driver you should indeed run with its real time mode disabled)
In that event timer callback (my_event_callback()), block waiting for your external simulator next time update (ext_Time), when you receive it, advance that event timer time to new external simulator time in the future (my_event_time=ext_Time;) and return from the callback.
The native simulator will then advance time until ext_Time and call your callback (my_event_callback) again.
Feature Request
Current Approach:
I'm running zephyr native sim on lockstep with a robotics simulator "Gazebo". Currently I'm just disabling the realtime feature and then polling on on ringbuf is_empty using nanosleep to sleep the thread every millisecond.
Requested Feature:
It would be great if there was an external clock api where the zephyr cpu could be paused until I tell it to run until it reaches a given timestamp. Something like:
Usecase:
The text was updated successfully, but these errors were encountered: