seekPlayer
R2026bDescription
seekPlayer(
repositions the player to the specified target time in the ROS 2 bag. The player moves to
the requested time point or the nearest valid time point in the bag and continues replay
from there. If the specified time is before the start of the bag, the player repositions to
the beginning. If the specified time is after the end of the bag, the player repositions to
the end.bagplayer,toTime)
The player state ("Playing" or "Paused") remains
unchanged after seeking. If playing, playback continues from the new position. If paused,
the player is repositioned but remains paused until you call
resumePlaying.
Examples
Input Arguments
Version History
Introduced in R2026b
See Also
ros2bagplayer | startPlaying | stopPlaying | pausePlaying | resumePlaying | setRate