Package symbol

fss_time package from fastswarmsim repo

fss_bringup fss_px4_sim fss_sensing fss_time fss_time_interfaces

ROS Distro
humble

Package Summary

Version 0.1.1
License BSD-3-Clause
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/shupx/FastSwarmSim.git
VCS Type git
VCS Version main
Last Updated 2026-08-25
Dev Status MAINTAINED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

ZeroMQ based conservative lock-step simulation time for FastSwarmSim.

Maintainers

  • Peixuan Shu

Authors

No additional authors.

fss_time

This package provides conservative lock-step simulation time for ROS 2 applications in FastSwarmSim. A ZeroMQ-based time coordinator grants the shared simulation clock only after every participating thread has announced the next time at which it is safe for the clock to advance. This makes simulation results deterministic with respect to simulation time while allowing real-time or accelerated execution.

# Launch a local coordinator, simulation clock, and control UI.
ros2 launch fss_time time_coordinator.launch.py

# Limit the simulation to 2x real time.
ros2 launch fss_time time_coordinator.launch.py max_real_time_factor:=2.0

# Run with a high speed limit (bounded by available CPU and participant work).
ros2 launch fss_time time_coordinator.launch.py max_real_time_factor:=1000.0

# Start without the UI.
ros2 launch fss_time time_coordinator.launch.py start_coordinator_ui:=false

What it contains:

  1. A time coordinator that publishes /clock, receives participant safe-time announcements over ZeroMQ, and grants a shared simulation time. The coordinator also provides fss/clock_control to pause/resume the clock and set max_real_time_factor at runtime.

  2. Thread time participants. Each participating thread announces the earliest future simulation time that it can safely permit; its announcement automatically registers the thread and is removed when the thread exits.

  3. fss_time::Rate, fss_time::sleep_for, and fss_time::sleep_until helpers. They use the node clock and automatically announce the next safe time when use_fss_sim_time is enabled.

  4. fss_time::executors::SingleThreadedExecutor and fss_time::executors::MultiThreadedExecutor, plus the convenience fss_time::spin(node). These executors make ROS callbacks participate in lock-step execution.

  5. Cascaded coordinators for multi-machine simulation. A child coordinator announces its local safe time to a parent coordinator and republishes grants as its local /clock.

Launch and clock parameters

time_coordinator.launch.py starts a root coordinator. By default it uses a local IPC endpoint:

ipc:///tmp/fss_time_coordinator.ipc

Important launch arguments:

Argument Default Description
max_real_time_factor 1.0 Maximum simulation-time to wall-time ratio. 2.0 allows up to 2x; use a large positive value for the highest practical speed.
speed_regulator_step_ns 10000000 Regulator step (10 ms). Set it no greater than the smallest desired simulation step; larger values reduce coordinator overhead.
auto_start true Start advancing the clock immediately; set false to start paused.
follows_real_time true Enable real-time catch-up behavior; see Advanced usage.
publish_clock true Publish /clock; parent coordinators normally set this to false.
fss_time_coordinator_endpoint namespace-derived IPC endpoint ZeroMQ ROUTER endpoint used by local participants.

To use fss_time with application nodes, set both parameters in their launch scope:

from launch_ros.actions import SetParameter

SetParameter(name="use_fss_sim_time", value=True)
SetParameter(name="use_sim_time", value=True)

use_sim_time makes the node clock follow the coordinator’s /clock. use_fss_sim_time enables the fss_time announce-and-request behavior in its helpers and executors. They are intentionally separate: setting only use_sim_time uses /clock but does not make the application a lock-step participant; setting only use_fss_sim_time leaves ROS time inactive and causes the helpers to wait. The package launch files set both together, and use_fss_sim_time is normally enabled by default.

Set the endpoint too when it differs from the default or when running on another machine:

SetParameter(
    name="fss_time_coordinator_endpoint",
    value="tcp://coordinator-host:5545",
)

How lock-step time works

  ROS timer / loop / callback                     ROS timer / loop / callback
  +--------------------------+                    +--------------------------+
  | thread participant A     |                    | thread participant B     |
  | announce next safe time  |                    | announce next safe time  |
  +------------+-------------+                    +-------------+------------+
               | ZeroMQ ANNOUNCE tA                             | ZeroMQ ANNOUNCE tB
               '---------------------------. .------------------'
                                            v v
                              +-----------------------------------+
                              |         Time coordinator          |
                              | target = earliest safe request    |
                              | + speed/real-time constraints     |
                              +----------------+------------------+
                                               |
                                               | grant t, publish /clock
                        . . . . . . . . . . .  v  . . . . . . . . . . .
                                               |
                       +-----------------------+-----------------------+
                       | Nodes use their ROS clock at the same time t  |
                       +------------------------------------------------+

For a normal finite step, the coordinator waits until every participating thread has made a new announcement, then advances to the minimum requested safe time, subject to the configured speed regulator. A thread that is waiting for ROS work does not constrain progress: an fss_time executor announces infinite safe time while it waits. Before executing a ready callback, the executor announces the current simulation time and therefore holds the clock during that callback.

fss_time::Rate and fss_time::sleep_* announce the time at which their calling thread will resume before sleeping on the node’s ROS clock. The coordinator can consequently request the next grant proactively instead of waiting for wall time to elapse.

Converting a ROS 2 node

File truncated at 100 lines see the full file

CHANGELOG
No CHANGELOG found.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged fss_time at Robotics Stack Exchange

No version for distro jazzy showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

fss_time package from fastswarmsim repo

fss_bringup fss_px4_sim fss_sensing fss_time fss_time_interfaces

ROS Distro
humble

Package Summary

Version 0.1.1
License BSD-3-Clause
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/shupx/FastSwarmSim.git
VCS Type git
VCS Version main
Last Updated 2026-08-25
Dev Status MAINTAINED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

ZeroMQ based conservative lock-step simulation time for FastSwarmSim.

Maintainers

  • Peixuan Shu

Authors

No additional authors.

fss_time

This package provides conservative lock-step simulation time for ROS 2 applications in FastSwarmSim. A ZeroMQ-based time coordinator grants the shared simulation clock only after every participating thread has announced the next time at which it is safe for the clock to advance. This makes simulation results deterministic with respect to simulation time while allowing real-time or accelerated execution.

# Launch a local coordinator, simulation clock, and control UI.
ros2 launch fss_time time_coordinator.launch.py

# Limit the simulation to 2x real time.
ros2 launch fss_time time_coordinator.launch.py max_real_time_factor:=2.0

# Run with a high speed limit (bounded by available CPU and participant work).
ros2 launch fss_time time_coordinator.launch.py max_real_time_factor:=1000.0

# Start without the UI.
ros2 launch fss_time time_coordinator.launch.py start_coordinator_ui:=false

What it contains:

  1. A time coordinator that publishes /clock, receives participant safe-time announcements over ZeroMQ, and grants a shared simulation time. The coordinator also provides fss/clock_control to pause/resume the clock and set max_real_time_factor at runtime.

  2. Thread time participants. Each participating thread announces the earliest future simulation time that it can safely permit; its announcement automatically registers the thread and is removed when the thread exits.

  3. fss_time::Rate, fss_time::sleep_for, and fss_time::sleep_until helpers. They use the node clock and automatically announce the next safe time when use_fss_sim_time is enabled.

  4. fss_time::executors::SingleThreadedExecutor and fss_time::executors::MultiThreadedExecutor, plus the convenience fss_time::spin(node). These executors make ROS callbacks participate in lock-step execution.

  5. Cascaded coordinators for multi-machine simulation. A child coordinator announces its local safe time to a parent coordinator and republishes grants as its local /clock.

Launch and clock parameters

time_coordinator.launch.py starts a root coordinator. By default it uses a local IPC endpoint:

ipc:///tmp/fss_time_coordinator.ipc

Important launch arguments:

Argument Default Description
max_real_time_factor 1.0 Maximum simulation-time to wall-time ratio. 2.0 allows up to 2x; use a large positive value for the highest practical speed.
speed_regulator_step_ns 10000000 Regulator step (10 ms). Set it no greater than the smallest desired simulation step; larger values reduce coordinator overhead.
auto_start true Start advancing the clock immediately; set false to start paused.
follows_real_time true Enable real-time catch-up behavior; see Advanced usage.
publish_clock true Publish /clock; parent coordinators normally set this to false.
fss_time_coordinator_endpoint namespace-derived IPC endpoint ZeroMQ ROUTER endpoint used by local participants.

To use fss_time with application nodes, set both parameters in their launch scope:

from launch_ros.actions import SetParameter

SetParameter(name="use_fss_sim_time", value=True)
SetParameter(name="use_sim_time", value=True)

use_sim_time makes the node clock follow the coordinator’s /clock. use_fss_sim_time enables the fss_time announce-and-request behavior in its helpers and executors. They are intentionally separate: setting only use_sim_time uses /clock but does not make the application a lock-step participant; setting only use_fss_sim_time leaves ROS time inactive and causes the helpers to wait. The package launch files set both together, and use_fss_sim_time is normally enabled by default.

Set the endpoint too when it differs from the default or when running on another machine:

SetParameter(
    name="fss_time_coordinator_endpoint",
    value="tcp://coordinator-host:5545",
)

How lock-step time works

  ROS timer / loop / callback                     ROS timer / loop / callback
  +--------------------------+                    +--------------------------+
  | thread participant A     |                    | thread participant B     |
  | announce next safe time  |                    | announce next safe time  |
  +------------+-------------+                    +-------------+------------+
               | ZeroMQ ANNOUNCE tA                             | ZeroMQ ANNOUNCE tB
               '---------------------------. .------------------'
                                            v v
                              +-----------------------------------+
                              |         Time coordinator          |
                              | target = earliest safe request    |
                              | + speed/real-time constraints     |
                              +----------------+------------------+
                                               |
                                               | grant t, publish /clock
                        . . . . . . . . . . .  v  . . . . . . . . . . .
                                               |
                       +-----------------------+-----------------------+
                       | Nodes use their ROS clock at the same time t  |
                       +------------------------------------------------+

For a normal finite step, the coordinator waits until every participating thread has made a new announcement, then advances to the minimum requested safe time, subject to the configured speed regulator. A thread that is waiting for ROS work does not constrain progress: an fss_time executor announces infinite safe time while it waits. Before executing a ready callback, the executor announces the current simulation time and therefore holds the clock during that callback.

fss_time::Rate and fss_time::sleep_* announce the time at which their calling thread will resume before sleeping on the node’s ROS clock. The coordinator can consequently request the next grant proactively instead of waiting for wall time to elapse.

Converting a ROS 2 node

File truncated at 100 lines see the full file

CHANGELOG
No CHANGELOG found.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged fss_time at Robotics Stack Exchange

No version for distro kilted showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

fss_time package from fastswarmsim repo

fss_bringup fss_px4_sim fss_sensing fss_time fss_time_interfaces

ROS Distro
humble

Package Summary

Version 0.1.1
License BSD-3-Clause
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/shupx/FastSwarmSim.git
VCS Type git
VCS Version main
Last Updated 2026-08-25
Dev Status MAINTAINED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

ZeroMQ based conservative lock-step simulation time for FastSwarmSim.

Maintainers

  • Peixuan Shu

Authors

No additional authors.

fss_time

This package provides conservative lock-step simulation time for ROS 2 applications in FastSwarmSim. A ZeroMQ-based time coordinator grants the shared simulation clock only after every participating thread has announced the next time at which it is safe for the clock to advance. This makes simulation results deterministic with respect to simulation time while allowing real-time or accelerated execution.

# Launch a local coordinator, simulation clock, and control UI.
ros2 launch fss_time time_coordinator.launch.py

# Limit the simulation to 2x real time.
ros2 launch fss_time time_coordinator.launch.py max_real_time_factor:=2.0

# Run with a high speed limit (bounded by available CPU and participant work).
ros2 launch fss_time time_coordinator.launch.py max_real_time_factor:=1000.0

# Start without the UI.
ros2 launch fss_time time_coordinator.launch.py start_coordinator_ui:=false

What it contains:

  1. A time coordinator that publishes /clock, receives participant safe-time announcements over ZeroMQ, and grants a shared simulation time. The coordinator also provides fss/clock_control to pause/resume the clock and set max_real_time_factor at runtime.

  2. Thread time participants. Each participating thread announces the earliest future simulation time that it can safely permit; its announcement automatically registers the thread and is removed when the thread exits.

  3. fss_time::Rate, fss_time::sleep_for, and fss_time::sleep_until helpers. They use the node clock and automatically announce the next safe time when use_fss_sim_time is enabled.

  4. fss_time::executors::SingleThreadedExecutor and fss_time::executors::MultiThreadedExecutor, plus the convenience fss_time::spin(node). These executors make ROS callbacks participate in lock-step execution.

  5. Cascaded coordinators for multi-machine simulation. A child coordinator announces its local safe time to a parent coordinator and republishes grants as its local /clock.

Launch and clock parameters

time_coordinator.launch.py starts a root coordinator. By default it uses a local IPC endpoint:

ipc:///tmp/fss_time_coordinator.ipc

Important launch arguments:

Argument Default Description
max_real_time_factor 1.0 Maximum simulation-time to wall-time ratio. 2.0 allows up to 2x; use a large positive value for the highest practical speed.
speed_regulator_step_ns 10000000 Regulator step (10 ms). Set it no greater than the smallest desired simulation step; larger values reduce coordinator overhead.
auto_start true Start advancing the clock immediately; set false to start paused.
follows_real_time true Enable real-time catch-up behavior; see Advanced usage.
publish_clock true Publish /clock; parent coordinators normally set this to false.
fss_time_coordinator_endpoint namespace-derived IPC endpoint ZeroMQ ROUTER endpoint used by local participants.

To use fss_time with application nodes, set both parameters in their launch scope:

from launch_ros.actions import SetParameter

SetParameter(name="use_fss_sim_time", value=True)
SetParameter(name="use_sim_time", value=True)

use_sim_time makes the node clock follow the coordinator’s /clock. use_fss_sim_time enables the fss_time announce-and-request behavior in its helpers and executors. They are intentionally separate: setting only use_sim_time uses /clock but does not make the application a lock-step participant; setting only use_fss_sim_time leaves ROS time inactive and causes the helpers to wait. The package launch files set both together, and use_fss_sim_time is normally enabled by default.

Set the endpoint too when it differs from the default or when running on another machine:

SetParameter(
    name="fss_time_coordinator_endpoint",
    value="tcp://coordinator-host:5545",
)

How lock-step time works

  ROS timer / loop / callback                     ROS timer / loop / callback
  +--------------------------+                    +--------------------------+
  | thread participant A     |                    | thread participant B     |
  | announce next safe time  |                    | announce next safe time  |
  +------------+-------------+                    +-------------+------------+
               | ZeroMQ ANNOUNCE tA                             | ZeroMQ ANNOUNCE tB
               '---------------------------. .------------------'
                                            v v
                              +-----------------------------------+
                              |         Time coordinator          |
                              | target = earliest safe request    |
                              | + speed/real-time constraints     |
                              +----------------+------------------+
                                               |
                                               | grant t, publish /clock
                        . . . . . . . . . . .  v  . . . . . . . . . . .
                                               |
                       +-----------------------+-----------------------+
                       | Nodes use their ROS clock at the same time t  |
                       +------------------------------------------------+

For a normal finite step, the coordinator waits until every participating thread has made a new announcement, then advances to the minimum requested safe time, subject to the configured speed regulator. A thread that is waiting for ROS work does not constrain progress: an fss_time executor announces infinite safe time while it waits. Before executing a ready callback, the executor announces the current simulation time and therefore holds the clock during that callback.

fss_time::Rate and fss_time::sleep_* announce the time at which their calling thread will resume before sleeping on the node’s ROS clock. The coordinator can consequently request the next grant proactively instead of waiting for wall time to elapse.

Converting a ROS 2 node

File truncated at 100 lines see the full file

CHANGELOG
No CHANGELOG found.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged fss_time at Robotics Stack Exchange

No version for distro lyrical showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

fss_time package from fastswarmsim repo

fss_bringup fss_px4_sim fss_sensing fss_time fss_time_interfaces

ROS Distro
humble

Package Summary

Version 0.1.1
License BSD-3-Clause
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/shupx/FastSwarmSim.git
VCS Type git
VCS Version main
Last Updated 2026-08-25
Dev Status MAINTAINED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

ZeroMQ based conservative lock-step simulation time for FastSwarmSim.

Maintainers

  • Peixuan Shu

Authors

No additional authors.

fss_time

This package provides conservative lock-step simulation time for ROS 2 applications in FastSwarmSim. A ZeroMQ-based time coordinator grants the shared simulation clock only after every participating thread has announced the next time at which it is safe for the clock to advance. This makes simulation results deterministic with respect to simulation time while allowing real-time or accelerated execution.

# Launch a local coordinator, simulation clock, and control UI.
ros2 launch fss_time time_coordinator.launch.py

# Limit the simulation to 2x real time.
ros2 launch fss_time time_coordinator.launch.py max_real_time_factor:=2.0

# Run with a high speed limit (bounded by available CPU and participant work).
ros2 launch fss_time time_coordinator.launch.py max_real_time_factor:=1000.0

# Start without the UI.
ros2 launch fss_time time_coordinator.launch.py start_coordinator_ui:=false

What it contains:

  1. A time coordinator that publishes /clock, receives participant safe-time announcements over ZeroMQ, and grants a shared simulation time. The coordinator also provides fss/clock_control to pause/resume the clock and set max_real_time_factor at runtime.

  2. Thread time participants. Each participating thread announces the earliest future simulation time that it can safely permit; its announcement automatically registers the thread and is removed when the thread exits.

  3. fss_time::Rate, fss_time::sleep_for, and fss_time::sleep_until helpers. They use the node clock and automatically announce the next safe time when use_fss_sim_time is enabled.

  4. fss_time::executors::SingleThreadedExecutor and fss_time::executors::MultiThreadedExecutor, plus the convenience fss_time::spin(node). These executors make ROS callbacks participate in lock-step execution.

  5. Cascaded coordinators for multi-machine simulation. A child coordinator announces its local safe time to a parent coordinator and republishes grants as its local /clock.

Launch and clock parameters

time_coordinator.launch.py starts a root coordinator. By default it uses a local IPC endpoint:

ipc:///tmp/fss_time_coordinator.ipc

Important launch arguments:

Argument Default Description
max_real_time_factor 1.0 Maximum simulation-time to wall-time ratio. 2.0 allows up to 2x; use a large positive value for the highest practical speed.
speed_regulator_step_ns 10000000 Regulator step (10 ms). Set it no greater than the smallest desired simulation step; larger values reduce coordinator overhead.
auto_start true Start advancing the clock immediately; set false to start paused.
follows_real_time true Enable real-time catch-up behavior; see Advanced usage.
publish_clock true Publish /clock; parent coordinators normally set this to false.
fss_time_coordinator_endpoint namespace-derived IPC endpoint ZeroMQ ROUTER endpoint used by local participants.

To use fss_time with application nodes, set both parameters in their launch scope:

from launch_ros.actions import SetParameter

SetParameter(name="use_fss_sim_time", value=True)
SetParameter(name="use_sim_time", value=True)

use_sim_time makes the node clock follow the coordinator’s /clock. use_fss_sim_time enables the fss_time announce-and-request behavior in its helpers and executors. They are intentionally separate: setting only use_sim_time uses /clock but does not make the application a lock-step participant; setting only use_fss_sim_time leaves ROS time inactive and causes the helpers to wait. The package launch files set both together, and use_fss_sim_time is normally enabled by default.

Set the endpoint too when it differs from the default or when running on another machine:

SetParameter(
    name="fss_time_coordinator_endpoint",
    value="tcp://coordinator-host:5545",
)

How lock-step time works

  ROS timer / loop / callback                     ROS timer / loop / callback
  +--------------------------+                    +--------------------------+
  | thread participant A     |                    | thread participant B     |
  | announce next safe time  |                    | announce next safe time  |
  +------------+-------------+                    +-------------+------------+
               | ZeroMQ ANNOUNCE tA                             | ZeroMQ ANNOUNCE tB
               '---------------------------. .------------------'
                                            v v
                              +-----------------------------------+
                              |         Time coordinator          |
                              | target = earliest safe request    |
                              | + speed/real-time constraints     |
                              +----------------+------------------+
                                               |
                                               | grant t, publish /clock
                        . . . . . . . . . . .  v  . . . . . . . . . . .
                                               |
                       +-----------------------+-----------------------+
                       | Nodes use their ROS clock at the same time t  |
                       +------------------------------------------------+

For a normal finite step, the coordinator waits until every participating thread has made a new announcement, then advances to the minimum requested safe time, subject to the configured speed regulator. A thread that is waiting for ROS work does not constrain progress: an fss_time executor announces infinite safe time while it waits. Before executing a ready callback, the executor announces the current simulation time and therefore holds the clock during that callback.

fss_time::Rate and fss_time::sleep_* announce the time at which their calling thread will resume before sleeping on the node’s ROS clock. The coordinator can consequently request the next grant proactively instead of waiting for wall time to elapse.

Converting a ROS 2 node

File truncated at 100 lines see the full file

CHANGELOG
No CHANGELOG found.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged fss_time at Robotics Stack Exchange

No version for distro rolling showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

fss_time package from fastswarmsim repo

fss_bringup fss_px4_sim fss_sensing fss_time fss_time_interfaces

ROS Distro
humble

Package Summary

Version 0.1.1
License BSD-3-Clause
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/shupx/FastSwarmSim.git
VCS Type git
VCS Version main
Last Updated 2026-08-25
Dev Status MAINTAINED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

ZeroMQ based conservative lock-step simulation time for FastSwarmSim.

Maintainers

  • Peixuan Shu

Authors

No additional authors.

fss_time

This package provides conservative lock-step simulation time for ROS 2 applications in FastSwarmSim. A ZeroMQ-based time coordinator grants the shared simulation clock only after every participating thread has announced the next time at which it is safe for the clock to advance. This makes simulation results deterministic with respect to simulation time while allowing real-time or accelerated execution.

# Launch a local coordinator, simulation clock, and control UI.
ros2 launch fss_time time_coordinator.launch.py

# Limit the simulation to 2x real time.
ros2 launch fss_time time_coordinator.launch.py max_real_time_factor:=2.0

# Run with a high speed limit (bounded by available CPU and participant work).
ros2 launch fss_time time_coordinator.launch.py max_real_time_factor:=1000.0

# Start without the UI.
ros2 launch fss_time time_coordinator.launch.py start_coordinator_ui:=false

What it contains:

  1. A time coordinator that publishes /clock, receives participant safe-time announcements over ZeroMQ, and grants a shared simulation time. The coordinator also provides fss/clock_control to pause/resume the clock and set max_real_time_factor at runtime.

  2. Thread time participants. Each participating thread announces the earliest future simulation time that it can safely permit; its announcement automatically registers the thread and is removed when the thread exits.

  3. fss_time::Rate, fss_time::sleep_for, and fss_time::sleep_until helpers. They use the node clock and automatically announce the next safe time when use_fss_sim_time is enabled.

  4. fss_time::executors::SingleThreadedExecutor and fss_time::executors::MultiThreadedExecutor, plus the convenience fss_time::spin(node). These executors make ROS callbacks participate in lock-step execution.

  5. Cascaded coordinators for multi-machine simulation. A child coordinator announces its local safe time to a parent coordinator and republishes grants as its local /clock.

Launch and clock parameters

time_coordinator.launch.py starts a root coordinator. By default it uses a local IPC endpoint:

ipc:///tmp/fss_time_coordinator.ipc

Important launch arguments:

Argument Default Description
max_real_time_factor 1.0 Maximum simulation-time to wall-time ratio. 2.0 allows up to 2x; use a large positive value for the highest practical speed.
speed_regulator_step_ns 10000000 Regulator step (10 ms). Set it no greater than the smallest desired simulation step; larger values reduce coordinator overhead.
auto_start true Start advancing the clock immediately; set false to start paused.
follows_real_time true Enable real-time catch-up behavior; see Advanced usage.
publish_clock true Publish /clock; parent coordinators normally set this to false.
fss_time_coordinator_endpoint namespace-derived IPC endpoint ZeroMQ ROUTER endpoint used by local participants.

To use fss_time with application nodes, set both parameters in their launch scope:

from launch_ros.actions import SetParameter

SetParameter(name="use_fss_sim_time", value=True)
SetParameter(name="use_sim_time", value=True)

use_sim_time makes the node clock follow the coordinator’s /clock. use_fss_sim_time enables the fss_time announce-and-request behavior in its helpers and executors. They are intentionally separate: setting only use_sim_time uses /clock but does not make the application a lock-step participant; setting only use_fss_sim_time leaves ROS time inactive and causes the helpers to wait. The package launch files set both together, and use_fss_sim_time is normally enabled by default.

Set the endpoint too when it differs from the default or when running on another machine:

SetParameter(
    name="fss_time_coordinator_endpoint",
    value="tcp://coordinator-host:5545",
)

How lock-step time works

  ROS timer / loop / callback                     ROS timer / loop / callback
  +--------------------------+                    +--------------------------+
  | thread participant A     |                    | thread participant B     |
  | announce next safe time  |                    | announce next safe time  |
  +------------+-------------+                    +-------------+------------+
               | ZeroMQ ANNOUNCE tA                             | ZeroMQ ANNOUNCE tB
               '---------------------------. .------------------'
                                            v v
                              +-----------------------------------+
                              |         Time coordinator          |
                              | target = earliest safe request    |
                              | + speed/real-time constraints     |
                              +----------------+------------------+
                                               |
                                               | grant t, publish /clock
                        . . . . . . . . . . .  v  . . . . . . . . . . .
                                               |
                       +-----------------------+-----------------------+
                       | Nodes use their ROS clock at the same time t  |
                       +------------------------------------------------+

For a normal finite step, the coordinator waits until every participating thread has made a new announcement, then advances to the minimum requested safe time, subject to the configured speed regulator. A thread that is waiting for ROS work does not constrain progress: an fss_time executor announces infinite safe time while it waits. Before executing a ready callback, the executor announces the current simulation time and therefore holds the clock during that callback.

fss_time::Rate and fss_time::sleep_* announce the time at which their calling thread will resume before sleeping on the node’s ROS clock. The coordinator can consequently request the next grant proactively instead of waiting for wall time to elapse.

Converting a ROS 2 node

File truncated at 100 lines see the full file

CHANGELOG
No CHANGELOG found.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged fss_time at Robotics Stack Exchange

No version for distro ardent showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

fss_time package from fastswarmsim repo

fss_bringup fss_px4_sim fss_sensing fss_time fss_time_interfaces

ROS Distro
humble

Package Summary

Version 0.1.1
License BSD-3-Clause
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/shupx/FastSwarmSim.git
VCS Type git
VCS Version main
Last Updated 2026-08-25
Dev Status MAINTAINED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

ZeroMQ based conservative lock-step simulation time for FastSwarmSim.

Maintainers

  • Peixuan Shu

Authors

No additional authors.

fss_time

This package provides conservative lock-step simulation time for ROS 2 applications in FastSwarmSim. A ZeroMQ-based time coordinator grants the shared simulation clock only after every participating thread has announced the next time at which it is safe for the clock to advance. This makes simulation results deterministic with respect to simulation time while allowing real-time or accelerated execution.

# Launch a local coordinator, simulation clock, and control UI.
ros2 launch fss_time time_coordinator.launch.py

# Limit the simulation to 2x real time.
ros2 launch fss_time time_coordinator.launch.py max_real_time_factor:=2.0

# Run with a high speed limit (bounded by available CPU and participant work).
ros2 launch fss_time time_coordinator.launch.py max_real_time_factor:=1000.0

# Start without the UI.
ros2 launch fss_time time_coordinator.launch.py start_coordinator_ui:=false

What it contains:

  1. A time coordinator that publishes /clock, receives participant safe-time announcements over ZeroMQ, and grants a shared simulation time. The coordinator also provides fss/clock_control to pause/resume the clock and set max_real_time_factor at runtime.

  2. Thread time participants. Each participating thread announces the earliest future simulation time that it can safely permit; its announcement automatically registers the thread and is removed when the thread exits.

  3. fss_time::Rate, fss_time::sleep_for, and fss_time::sleep_until helpers. They use the node clock and automatically announce the next safe time when use_fss_sim_time is enabled.

  4. fss_time::executors::SingleThreadedExecutor and fss_time::executors::MultiThreadedExecutor, plus the convenience fss_time::spin(node). These executors make ROS callbacks participate in lock-step execution.

  5. Cascaded coordinators for multi-machine simulation. A child coordinator announces its local safe time to a parent coordinator and republishes grants as its local /clock.

Launch and clock parameters

time_coordinator.launch.py starts a root coordinator. By default it uses a local IPC endpoint:

ipc:///tmp/fss_time_coordinator.ipc

Important launch arguments:

Argument Default Description
max_real_time_factor 1.0 Maximum simulation-time to wall-time ratio. 2.0 allows up to 2x; use a large positive value for the highest practical speed.
speed_regulator_step_ns 10000000 Regulator step (10 ms). Set it no greater than the smallest desired simulation step; larger values reduce coordinator overhead.
auto_start true Start advancing the clock immediately; set false to start paused.
follows_real_time true Enable real-time catch-up behavior; see Advanced usage.
publish_clock true Publish /clock; parent coordinators normally set this to false.
fss_time_coordinator_endpoint namespace-derived IPC endpoint ZeroMQ ROUTER endpoint used by local participants.

To use fss_time with application nodes, set both parameters in their launch scope:

from launch_ros.actions import SetParameter

SetParameter(name="use_fss_sim_time", value=True)
SetParameter(name="use_sim_time", value=True)

use_sim_time makes the node clock follow the coordinator’s /clock. use_fss_sim_time enables the fss_time announce-and-request behavior in its helpers and executors. They are intentionally separate: setting only use_sim_time uses /clock but does not make the application a lock-step participant; setting only use_fss_sim_time leaves ROS time inactive and causes the helpers to wait. The package launch files set both together, and use_fss_sim_time is normally enabled by default.

Set the endpoint too when it differs from the default or when running on another machine:

SetParameter(
    name="fss_time_coordinator_endpoint",
    value="tcp://coordinator-host:5545",
)

How lock-step time works

  ROS timer / loop / callback                     ROS timer / loop / callback
  +--------------------------+                    +--------------------------+
  | thread participant A     |                    | thread participant B     |
  | announce next safe time  |                    | announce next safe time  |
  +------------+-------------+                    +-------------+------------+
               | ZeroMQ ANNOUNCE tA                             | ZeroMQ ANNOUNCE tB
               '---------------------------. .------------------'
                                            v v
                              +-----------------------------------+
                              |         Time coordinator          |
                              | target = earliest safe request    |
                              | + speed/real-time constraints     |
                              +----------------+------------------+
                                               |
                                               | grant t, publish /clock
                        . . . . . . . . . . .  v  . . . . . . . . . . .
                                               |
                       +-----------------------+-----------------------+
                       | Nodes use their ROS clock at the same time t  |
                       +------------------------------------------------+

For a normal finite step, the coordinator waits until every participating thread has made a new announcement, then advances to the minimum requested safe time, subject to the configured speed regulator. A thread that is waiting for ROS work does not constrain progress: an fss_time executor announces infinite safe time while it waits. Before executing a ready callback, the executor announces the current simulation time and therefore holds the clock during that callback.

fss_time::Rate and fss_time::sleep_* announce the time at which their calling thread will resume before sleeping on the node’s ROS clock. The coordinator can consequently request the next grant proactively instead of waiting for wall time to elapse.

Converting a ROS 2 node

File truncated at 100 lines see the full file

CHANGELOG
No CHANGELOG found.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged fss_time at Robotics Stack Exchange

No version for distro bouncy showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

fss_time package from fastswarmsim repo

fss_bringup fss_px4_sim fss_sensing fss_time fss_time_interfaces

ROS Distro
humble

Package Summary

Version 0.1.1
License BSD-3-Clause
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/shupx/FastSwarmSim.git
VCS Type git
VCS Version main
Last Updated 2026-08-25
Dev Status MAINTAINED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

ZeroMQ based conservative lock-step simulation time for FastSwarmSim.

Maintainers

  • Peixuan Shu

Authors

No additional authors.

fss_time

This package provides conservative lock-step simulation time for ROS 2 applications in FastSwarmSim. A ZeroMQ-based time coordinator grants the shared simulation clock only after every participating thread has announced the next time at which it is safe for the clock to advance. This makes simulation results deterministic with respect to simulation time while allowing real-time or accelerated execution.

# Launch a local coordinator, simulation clock, and control UI.
ros2 launch fss_time time_coordinator.launch.py

# Limit the simulation to 2x real time.
ros2 launch fss_time time_coordinator.launch.py max_real_time_factor:=2.0

# Run with a high speed limit (bounded by available CPU and participant work).
ros2 launch fss_time time_coordinator.launch.py max_real_time_factor:=1000.0

# Start without the UI.
ros2 launch fss_time time_coordinator.launch.py start_coordinator_ui:=false

What it contains:

  1. A time coordinator that publishes /clock, receives participant safe-time announcements over ZeroMQ, and grants a shared simulation time. The coordinator also provides fss/clock_control to pause/resume the clock and set max_real_time_factor at runtime.

  2. Thread time participants. Each participating thread announces the earliest future simulation time that it can safely permit; its announcement automatically registers the thread and is removed when the thread exits.

  3. fss_time::Rate, fss_time::sleep_for, and fss_time::sleep_until helpers. They use the node clock and automatically announce the next safe time when use_fss_sim_time is enabled.

  4. fss_time::executors::SingleThreadedExecutor and fss_time::executors::MultiThreadedExecutor, plus the convenience fss_time::spin(node). These executors make ROS callbacks participate in lock-step execution.

  5. Cascaded coordinators for multi-machine simulation. A child coordinator announces its local safe time to a parent coordinator and republishes grants as its local /clock.

Launch and clock parameters

time_coordinator.launch.py starts a root coordinator. By default it uses a local IPC endpoint:

ipc:///tmp/fss_time_coordinator.ipc

Important launch arguments:

Argument Default Description
max_real_time_factor 1.0 Maximum simulation-time to wall-time ratio. 2.0 allows up to 2x; use a large positive value for the highest practical speed.
speed_regulator_step_ns 10000000 Regulator step (10 ms). Set it no greater than the smallest desired simulation step; larger values reduce coordinator overhead.
auto_start true Start advancing the clock immediately; set false to start paused.
follows_real_time true Enable real-time catch-up behavior; see Advanced usage.
publish_clock true Publish /clock; parent coordinators normally set this to false.
fss_time_coordinator_endpoint namespace-derived IPC endpoint ZeroMQ ROUTER endpoint used by local participants.

To use fss_time with application nodes, set both parameters in their launch scope:

from launch_ros.actions import SetParameter

SetParameter(name="use_fss_sim_time", value=True)
SetParameter(name="use_sim_time", value=True)

use_sim_time makes the node clock follow the coordinator’s /clock. use_fss_sim_time enables the fss_time announce-and-request behavior in its helpers and executors. They are intentionally separate: setting only use_sim_time uses /clock but does not make the application a lock-step participant; setting only use_fss_sim_time leaves ROS time inactive and causes the helpers to wait. The package launch files set both together, and use_fss_sim_time is normally enabled by default.

Set the endpoint too when it differs from the default or when running on another machine:

SetParameter(
    name="fss_time_coordinator_endpoint",
    value="tcp://coordinator-host:5545",
)

How lock-step time works

  ROS timer / loop / callback                     ROS timer / loop / callback
  +--------------------------+                    +--------------------------+
  | thread participant A     |                    | thread participant B     |
  | announce next safe time  |                    | announce next safe time  |
  +------------+-------------+                    +-------------+------------+
               | ZeroMQ ANNOUNCE tA                             | ZeroMQ ANNOUNCE tB
               '---------------------------. .------------------'
                                            v v
                              +-----------------------------------+
                              |         Time coordinator          |
                              | target = earliest safe request    |
                              | + speed/real-time constraints     |
                              +----------------+------------------+
                                               |
                                               | grant t, publish /clock
                        . . . . . . . . . . .  v  . . . . . . . . . . .
                                               |
                       +-----------------------+-----------------------+
                       | Nodes use their ROS clock at the same time t  |
                       +------------------------------------------------+

For a normal finite step, the coordinator waits until every participating thread has made a new announcement, then advances to the minimum requested safe time, subject to the configured speed regulator. A thread that is waiting for ROS work does not constrain progress: an fss_time executor announces infinite safe time while it waits. Before executing a ready callback, the executor announces the current simulation time and therefore holds the clock during that callback.

fss_time::Rate and fss_time::sleep_* announce the time at which their calling thread will resume before sleeping on the node’s ROS clock. The coordinator can consequently request the next grant proactively instead of waiting for wall time to elapse.

Converting a ROS 2 node

File truncated at 100 lines see the full file

CHANGELOG
No CHANGELOG found.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged fss_time at Robotics Stack Exchange

No version for distro crystal showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

fss_time package from fastswarmsim repo

fss_bringup fss_px4_sim fss_sensing fss_time fss_time_interfaces

ROS Distro
humble

Package Summary

Version 0.1.1
License BSD-3-Clause
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/shupx/FastSwarmSim.git
VCS Type git
VCS Version main
Last Updated 2026-08-25
Dev Status MAINTAINED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

ZeroMQ based conservative lock-step simulation time for FastSwarmSim.

Maintainers

  • Peixuan Shu

Authors

No additional authors.

fss_time

This package provides conservative lock-step simulation time for ROS 2 applications in FastSwarmSim. A ZeroMQ-based time coordinator grants the shared simulation clock only after every participating thread has announced the next time at which it is safe for the clock to advance. This makes simulation results deterministic with respect to simulation time while allowing real-time or accelerated execution.

# Launch a local coordinator, simulation clock, and control UI.
ros2 launch fss_time time_coordinator.launch.py

# Limit the simulation to 2x real time.
ros2 launch fss_time time_coordinator.launch.py max_real_time_factor:=2.0

# Run with a high speed limit (bounded by available CPU and participant work).
ros2 launch fss_time time_coordinator.launch.py max_real_time_factor:=1000.0

# Start without the UI.
ros2 launch fss_time time_coordinator.launch.py start_coordinator_ui:=false

What it contains:

  1. A time coordinator that publishes /clock, receives participant safe-time announcements over ZeroMQ, and grants a shared simulation time. The coordinator also provides fss/clock_control to pause/resume the clock and set max_real_time_factor at runtime.

  2. Thread time participants. Each participating thread announces the earliest future simulation time that it can safely permit; its announcement automatically registers the thread and is removed when the thread exits.

  3. fss_time::Rate, fss_time::sleep_for, and fss_time::sleep_until helpers. They use the node clock and automatically announce the next safe time when use_fss_sim_time is enabled.

  4. fss_time::executors::SingleThreadedExecutor and fss_time::executors::MultiThreadedExecutor, plus the convenience fss_time::spin(node). These executors make ROS callbacks participate in lock-step execution.

  5. Cascaded coordinators for multi-machine simulation. A child coordinator announces its local safe time to a parent coordinator and republishes grants as its local /clock.

Launch and clock parameters

time_coordinator.launch.py starts a root coordinator. By default it uses a local IPC endpoint:

ipc:///tmp/fss_time_coordinator.ipc

Important launch arguments:

Argument Default Description
max_real_time_factor 1.0 Maximum simulation-time to wall-time ratio. 2.0 allows up to 2x; use a large positive value for the highest practical speed.
speed_regulator_step_ns 10000000 Regulator step (10 ms). Set it no greater than the smallest desired simulation step; larger values reduce coordinator overhead.
auto_start true Start advancing the clock immediately; set false to start paused.
follows_real_time true Enable real-time catch-up behavior; see Advanced usage.
publish_clock true Publish /clock; parent coordinators normally set this to false.
fss_time_coordinator_endpoint namespace-derived IPC endpoint ZeroMQ ROUTER endpoint used by local participants.

To use fss_time with application nodes, set both parameters in their launch scope:

from launch_ros.actions import SetParameter

SetParameter(name="use_fss_sim_time", value=True)
SetParameter(name="use_sim_time", value=True)

use_sim_time makes the node clock follow the coordinator’s /clock. use_fss_sim_time enables the fss_time announce-and-request behavior in its helpers and executors. They are intentionally separate: setting only use_sim_time uses /clock but does not make the application a lock-step participant; setting only use_fss_sim_time leaves ROS time inactive and causes the helpers to wait. The package launch files set both together, and use_fss_sim_time is normally enabled by default.

Set the endpoint too when it differs from the default or when running on another machine:

SetParameter(
    name="fss_time_coordinator_endpoint",
    value="tcp://coordinator-host:5545",
)

How lock-step time works

  ROS timer / loop / callback                     ROS timer / loop / callback
  +--------------------------+                    +--------------------------+
  | thread participant A     |                    | thread participant B     |
  | announce next safe time  |                    | announce next safe time  |
  +------------+-------------+                    +-------------+------------+
               | ZeroMQ ANNOUNCE tA                             | ZeroMQ ANNOUNCE tB
               '---------------------------. .------------------'
                                            v v
                              +-----------------------------------+
                              |         Time coordinator          |
                              | target = earliest safe request    |
                              | + speed/real-time constraints     |
                              +----------------+------------------+
                                               |
                                               | grant t, publish /clock
                        . . . . . . . . . . .  v  . . . . . . . . . . .
                                               |
                       +-----------------------+-----------------------+
                       | Nodes use their ROS clock at the same time t  |
                       +------------------------------------------------+

For a normal finite step, the coordinator waits until every participating thread has made a new announcement, then advances to the minimum requested safe time, subject to the configured speed regulator. A thread that is waiting for ROS work does not constrain progress: an fss_time executor announces infinite safe time while it waits. Before executing a ready callback, the executor announces the current simulation time and therefore holds the clock during that callback.

fss_time::Rate and fss_time::sleep_* announce the time at which their calling thread will resume before sleeping on the node’s ROS clock. The coordinator can consequently request the next grant proactively instead of waiting for wall time to elapse.

Converting a ROS 2 node

File truncated at 100 lines see the full file

CHANGELOG
No CHANGELOG found.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged fss_time at Robotics Stack Exchange

No version for distro eloquent showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

fss_time package from fastswarmsim repo

fss_bringup fss_px4_sim fss_sensing fss_time fss_time_interfaces

ROS Distro
humble

Package Summary

Version 0.1.1
License BSD-3-Clause
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/shupx/FastSwarmSim.git
VCS Type git
VCS Version main
Last Updated 2026-08-25
Dev Status MAINTAINED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

ZeroMQ based conservative lock-step simulation time for FastSwarmSim.

Maintainers

  • Peixuan Shu

Authors

No additional authors.

fss_time

This package provides conservative lock-step simulation time for ROS 2 applications in FastSwarmSim. A ZeroMQ-based time coordinator grants the shared simulation clock only after every participating thread has announced the next time at which it is safe for the clock to advance. This makes simulation results deterministic with respect to simulation time while allowing real-time or accelerated execution.

# Launch a local coordinator, simulation clock, and control UI.
ros2 launch fss_time time_coordinator.launch.py

# Limit the simulation to 2x real time.
ros2 launch fss_time time_coordinator.launch.py max_real_time_factor:=2.0

# Run with a high speed limit (bounded by available CPU and participant work).
ros2 launch fss_time time_coordinator.launch.py max_real_time_factor:=1000.0

# Start without the UI.
ros2 launch fss_time time_coordinator.launch.py start_coordinator_ui:=false

What it contains:

  1. A time coordinator that publishes /clock, receives participant safe-time announcements over ZeroMQ, and grants a shared simulation time. The coordinator also provides fss/clock_control to pause/resume the clock and set max_real_time_factor at runtime.

  2. Thread time participants. Each participating thread announces the earliest future simulation time that it can safely permit; its announcement automatically registers the thread and is removed when the thread exits.

  3. fss_time::Rate, fss_time::sleep_for, and fss_time::sleep_until helpers. They use the node clock and automatically announce the next safe time when use_fss_sim_time is enabled.

  4. fss_time::executors::SingleThreadedExecutor and fss_time::executors::MultiThreadedExecutor, plus the convenience fss_time::spin(node). These executors make ROS callbacks participate in lock-step execution.

  5. Cascaded coordinators for multi-machine simulation. A child coordinator announces its local safe time to a parent coordinator and republishes grants as its local /clock.

Launch and clock parameters

time_coordinator.launch.py starts a root coordinator. By default it uses a local IPC endpoint:

ipc:///tmp/fss_time_coordinator.ipc

Important launch arguments:

Argument Default Description
max_real_time_factor 1.0 Maximum simulation-time to wall-time ratio. 2.0 allows up to 2x; use a large positive value for the highest practical speed.
speed_regulator_step_ns 10000000 Regulator step (10 ms). Set it no greater than the smallest desired simulation step; larger values reduce coordinator overhead.
auto_start true Start advancing the clock immediately; set false to start paused.
follows_real_time true Enable real-time catch-up behavior; see Advanced usage.
publish_clock true Publish /clock; parent coordinators normally set this to false.
fss_time_coordinator_endpoint namespace-derived IPC endpoint ZeroMQ ROUTER endpoint used by local participants.

To use fss_time with application nodes, set both parameters in their launch scope:

from launch_ros.actions import SetParameter

SetParameter(name="use_fss_sim_time", value=True)
SetParameter(name="use_sim_time", value=True)

use_sim_time makes the node clock follow the coordinator’s /clock. use_fss_sim_time enables the fss_time announce-and-request behavior in its helpers and executors. They are intentionally separate: setting only use_sim_time uses /clock but does not make the application a lock-step participant; setting only use_fss_sim_time leaves ROS time inactive and causes the helpers to wait. The package launch files set both together, and use_fss_sim_time is normally enabled by default.

Set the endpoint too when it differs from the default or when running on another machine:

SetParameter(
    name="fss_time_coordinator_endpoint",
    value="tcp://coordinator-host:5545",
)

How lock-step time works

  ROS timer / loop / callback                     ROS timer / loop / callback
  +--------------------------+                    +--------------------------+
  | thread participant A     |                    | thread participant B     |
  | announce next safe time  |                    | announce next safe time  |
  +------------+-------------+                    +-------------+------------+
               | ZeroMQ ANNOUNCE tA                             | ZeroMQ ANNOUNCE tB
               '---------------------------. .------------------'
                                            v v
                              +-----------------------------------+
                              |         Time coordinator          |
                              | target = earliest safe request    |
                              | + speed/real-time constraints     |
                              +----------------+------------------+
                                               |
                                               | grant t, publish /clock
                        . . . . . . . . . . .  v  . . . . . . . . . . .
                                               |
                       +-----------------------+-----------------------+
                       | Nodes use their ROS clock at the same time t  |
                       +------------------------------------------------+

For a normal finite step, the coordinator waits until every participating thread has made a new announcement, then advances to the minimum requested safe time, subject to the configured speed regulator. A thread that is waiting for ROS work does not constrain progress: an fss_time executor announces infinite safe time while it waits. Before executing a ready callback, the executor announces the current simulation time and therefore holds the clock during that callback.

fss_time::Rate and fss_time::sleep_* announce the time at which their calling thread will resume before sleeping on the node’s ROS clock. The coordinator can consequently request the next grant proactively instead of waiting for wall time to elapse.

Converting a ROS 2 node

File truncated at 100 lines see the full file

CHANGELOG
No CHANGELOG found.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged fss_time at Robotics Stack Exchange

No version for distro dashing showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

fss_time package from fastswarmsim repo

fss_bringup fss_px4_sim fss_sensing fss_time fss_time_interfaces

ROS Distro
humble

Package Summary

Version 0.1.1
License BSD-3-Clause
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/shupx/FastSwarmSim.git
VCS Type git
VCS Version main
Last Updated 2026-08-25
Dev Status MAINTAINED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

ZeroMQ based conservative lock-step simulation time for FastSwarmSim.

Maintainers

  • Peixuan Shu

Authors

No additional authors.

fss_time

This package provides conservative lock-step simulation time for ROS 2 applications in FastSwarmSim. A ZeroMQ-based time coordinator grants the shared simulation clock only after every participating thread has announced the next time at which it is safe for the clock to advance. This makes simulation results deterministic with respect to simulation time while allowing real-time or accelerated execution.

# Launch a local coordinator, simulation clock, and control UI.
ros2 launch fss_time time_coordinator.launch.py

# Limit the simulation to 2x real time.
ros2 launch fss_time time_coordinator.launch.py max_real_time_factor:=2.0

# Run with a high speed limit (bounded by available CPU and participant work).
ros2 launch fss_time time_coordinator.launch.py max_real_time_factor:=1000.0

# Start without the UI.
ros2 launch fss_time time_coordinator.launch.py start_coordinator_ui:=false

What it contains:

  1. A time coordinator that publishes /clock, receives participant safe-time announcements over ZeroMQ, and grants a shared simulation time. The coordinator also provides fss/clock_control to pause/resume the clock and set max_real_time_factor at runtime.

  2. Thread time participants. Each participating thread announces the earliest future simulation time that it can safely permit; its announcement automatically registers the thread and is removed when the thread exits.

  3. fss_time::Rate, fss_time::sleep_for, and fss_time::sleep_until helpers. They use the node clock and automatically announce the next safe time when use_fss_sim_time is enabled.

  4. fss_time::executors::SingleThreadedExecutor and fss_time::executors::MultiThreadedExecutor, plus the convenience fss_time::spin(node). These executors make ROS callbacks participate in lock-step execution.

  5. Cascaded coordinators for multi-machine simulation. A child coordinator announces its local safe time to a parent coordinator and republishes grants as its local /clock.

Launch and clock parameters

time_coordinator.launch.py starts a root coordinator. By default it uses a local IPC endpoint:

ipc:///tmp/fss_time_coordinator.ipc

Important launch arguments:

Argument Default Description
max_real_time_factor 1.0 Maximum simulation-time to wall-time ratio. 2.0 allows up to 2x; use a large positive value for the highest practical speed.
speed_regulator_step_ns 10000000 Regulator step (10 ms). Set it no greater than the smallest desired simulation step; larger values reduce coordinator overhead.
auto_start true Start advancing the clock immediately; set false to start paused.
follows_real_time true Enable real-time catch-up behavior; see Advanced usage.
publish_clock true Publish /clock; parent coordinators normally set this to false.
fss_time_coordinator_endpoint namespace-derived IPC endpoint ZeroMQ ROUTER endpoint used by local participants.

To use fss_time with application nodes, set both parameters in their launch scope:

from launch_ros.actions import SetParameter

SetParameter(name="use_fss_sim_time", value=True)
SetParameter(name="use_sim_time", value=True)

use_sim_time makes the node clock follow the coordinator’s /clock. use_fss_sim_time enables the fss_time announce-and-request behavior in its helpers and executors. They are intentionally separate: setting only use_sim_time uses /clock but does not make the application a lock-step participant; setting only use_fss_sim_time leaves ROS time inactive and causes the helpers to wait. The package launch files set both together, and use_fss_sim_time is normally enabled by default.

Set the endpoint too when it differs from the default or when running on another machine:

SetParameter(
    name="fss_time_coordinator_endpoint",
    value="tcp://coordinator-host:5545",
)

How lock-step time works

  ROS timer / loop / callback                     ROS timer / loop / callback
  +--------------------------+                    +--------------------------+
  | thread participant A     |                    | thread participant B     |
  | announce next safe time  |                    | announce next safe time  |
  +------------+-------------+                    +-------------+------------+
               | ZeroMQ ANNOUNCE tA                             | ZeroMQ ANNOUNCE tB
               '---------------------------. .------------------'
                                            v v
                              +-----------------------------------+
                              |         Time coordinator          |
                              | target = earliest safe request    |
                              | + speed/real-time constraints     |
                              +----------------+------------------+
                                               |
                                               | grant t, publish /clock
                        . . . . . . . . . . .  v  . . . . . . . . . . .
                                               |
                       +-----------------------+-----------------------+
                       | Nodes use their ROS clock at the same time t  |
                       +------------------------------------------------+

For a normal finite step, the coordinator waits until every participating thread has made a new announcement, then advances to the minimum requested safe time, subject to the configured speed regulator. A thread that is waiting for ROS work does not constrain progress: an fss_time executor announces infinite safe time while it waits. Before executing a ready callback, the executor announces the current simulation time and therefore holds the clock during that callback.

fss_time::Rate and fss_time::sleep_* announce the time at which their calling thread will resume before sleeping on the node’s ROS clock. The coordinator can consequently request the next grant proactively instead of waiting for wall time to elapse.

Converting a ROS 2 node

File truncated at 100 lines see the full file

CHANGELOG
No CHANGELOG found.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged fss_time at Robotics Stack Exchange

No version for distro galactic showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

fss_time package from fastswarmsim repo

fss_bringup fss_px4_sim fss_sensing fss_time fss_time_interfaces

ROS Distro
humble

Package Summary

Version 0.1.1
License BSD-3-Clause
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/shupx/FastSwarmSim.git
VCS Type git
VCS Version main
Last Updated 2026-08-25
Dev Status MAINTAINED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

ZeroMQ based conservative lock-step simulation time for FastSwarmSim.

Maintainers

  • Peixuan Shu

Authors

No additional authors.

fss_time

This package provides conservative lock-step simulation time for ROS 2 applications in FastSwarmSim. A ZeroMQ-based time coordinator grants the shared simulation clock only after every participating thread has announced the next time at which it is safe for the clock to advance. This makes simulation results deterministic with respect to simulation time while allowing real-time or accelerated execution.

# Launch a local coordinator, simulation clock, and control UI.
ros2 launch fss_time time_coordinator.launch.py

# Limit the simulation to 2x real time.
ros2 launch fss_time time_coordinator.launch.py max_real_time_factor:=2.0

# Run with a high speed limit (bounded by available CPU and participant work).
ros2 launch fss_time time_coordinator.launch.py max_real_time_factor:=1000.0

# Start without the UI.
ros2 launch fss_time time_coordinator.launch.py start_coordinator_ui:=false

What it contains:

  1. A time coordinator that publishes /clock, receives participant safe-time announcements over ZeroMQ, and grants a shared simulation time. The coordinator also provides fss/clock_control to pause/resume the clock and set max_real_time_factor at runtime.

  2. Thread time participants. Each participating thread announces the earliest future simulation time that it can safely permit; its announcement automatically registers the thread and is removed when the thread exits.

  3. fss_time::Rate, fss_time::sleep_for, and fss_time::sleep_until helpers. They use the node clock and automatically announce the next safe time when use_fss_sim_time is enabled.

  4. fss_time::executors::SingleThreadedExecutor and fss_time::executors::MultiThreadedExecutor, plus the convenience fss_time::spin(node). These executors make ROS callbacks participate in lock-step execution.

  5. Cascaded coordinators for multi-machine simulation. A child coordinator announces its local safe time to a parent coordinator and republishes grants as its local /clock.

Launch and clock parameters

time_coordinator.launch.py starts a root coordinator. By default it uses a local IPC endpoint:

ipc:///tmp/fss_time_coordinator.ipc

Important launch arguments:

Argument Default Description
max_real_time_factor 1.0 Maximum simulation-time to wall-time ratio. 2.0 allows up to 2x; use a large positive value for the highest practical speed.
speed_regulator_step_ns 10000000 Regulator step (10 ms). Set it no greater than the smallest desired simulation step; larger values reduce coordinator overhead.
auto_start true Start advancing the clock immediately; set false to start paused.
follows_real_time true Enable real-time catch-up behavior; see Advanced usage.
publish_clock true Publish /clock; parent coordinators normally set this to false.
fss_time_coordinator_endpoint namespace-derived IPC endpoint ZeroMQ ROUTER endpoint used by local participants.

To use fss_time with application nodes, set both parameters in their launch scope:

from launch_ros.actions import SetParameter

SetParameter(name="use_fss_sim_time", value=True)
SetParameter(name="use_sim_time", value=True)

use_sim_time makes the node clock follow the coordinator’s /clock. use_fss_sim_time enables the fss_time announce-and-request behavior in its helpers and executors. They are intentionally separate: setting only use_sim_time uses /clock but does not make the application a lock-step participant; setting only use_fss_sim_time leaves ROS time inactive and causes the helpers to wait. The package launch files set both together, and use_fss_sim_time is normally enabled by default.

Set the endpoint too when it differs from the default or when running on another machine:

SetParameter(
    name="fss_time_coordinator_endpoint",
    value="tcp://coordinator-host:5545",
)

How lock-step time works

  ROS timer / loop / callback                     ROS timer / loop / callback
  +--------------------------+                    +--------------------------+
  | thread participant A     |                    | thread participant B     |
  | announce next safe time  |                    | announce next safe time  |
  +------------+-------------+                    +-------------+------------+
               | ZeroMQ ANNOUNCE tA                             | ZeroMQ ANNOUNCE tB
               '---------------------------. .------------------'
                                            v v
                              +-----------------------------------+
                              |         Time coordinator          |
                              | target = earliest safe request    |
                              | + speed/real-time constraints     |
                              +----------------+------------------+
                                               |
                                               | grant t, publish /clock
                        . . . . . . . . . . .  v  . . . . . . . . . . .
                                               |
                       +-----------------------+-----------------------+
                       | Nodes use their ROS clock at the same time t  |
                       +------------------------------------------------+

For a normal finite step, the coordinator waits until every participating thread has made a new announcement, then advances to the minimum requested safe time, subject to the configured speed regulator. A thread that is waiting for ROS work does not constrain progress: an fss_time executor announces infinite safe time while it waits. Before executing a ready callback, the executor announces the current simulation time and therefore holds the clock during that callback.

fss_time::Rate and fss_time::sleep_* announce the time at which their calling thread will resume before sleeping on the node’s ROS clock. The coordinator can consequently request the next grant proactively instead of waiting for wall time to elapse.

Converting a ROS 2 node

File truncated at 100 lines see the full file

CHANGELOG
No CHANGELOG found.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged fss_time at Robotics Stack Exchange

No version for distro foxy showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

fss_time package from fastswarmsim repo

fss_bringup fss_px4_sim fss_sensing fss_time fss_time_interfaces

ROS Distro
humble

Package Summary

Version 0.1.1
License BSD-3-Clause
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/shupx/FastSwarmSim.git
VCS Type git
VCS Version main
Last Updated 2026-08-25
Dev Status MAINTAINED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

ZeroMQ based conservative lock-step simulation time for FastSwarmSim.

Maintainers

  • Peixuan Shu

Authors

No additional authors.

fss_time

This package provides conservative lock-step simulation time for ROS 2 applications in FastSwarmSim. A ZeroMQ-based time coordinator grants the shared simulation clock only after every participating thread has announced the next time at which it is safe for the clock to advance. This makes simulation results deterministic with respect to simulation time while allowing real-time or accelerated execution.

# Launch a local coordinator, simulation clock, and control UI.
ros2 launch fss_time time_coordinator.launch.py

# Limit the simulation to 2x real time.
ros2 launch fss_time time_coordinator.launch.py max_real_time_factor:=2.0

# Run with a high speed limit (bounded by available CPU and participant work).
ros2 launch fss_time time_coordinator.launch.py max_real_time_factor:=1000.0

# Start without the UI.
ros2 launch fss_time time_coordinator.launch.py start_coordinator_ui:=false

What it contains:

  1. A time coordinator that publishes /clock, receives participant safe-time announcements over ZeroMQ, and grants a shared simulation time. The coordinator also provides fss/clock_control to pause/resume the clock and set max_real_time_factor at runtime.

  2. Thread time participants. Each participating thread announces the earliest future simulation time that it can safely permit; its announcement automatically registers the thread and is removed when the thread exits.

  3. fss_time::Rate, fss_time::sleep_for, and fss_time::sleep_until helpers. They use the node clock and automatically announce the next safe time when use_fss_sim_time is enabled.

  4. fss_time::executors::SingleThreadedExecutor and fss_time::executors::MultiThreadedExecutor, plus the convenience fss_time::spin(node). These executors make ROS callbacks participate in lock-step execution.

  5. Cascaded coordinators for multi-machine simulation. A child coordinator announces its local safe time to a parent coordinator and republishes grants as its local /clock.

Launch and clock parameters

time_coordinator.launch.py starts a root coordinator. By default it uses a local IPC endpoint:

ipc:///tmp/fss_time_coordinator.ipc

Important launch arguments:

Argument Default Description
max_real_time_factor 1.0 Maximum simulation-time to wall-time ratio. 2.0 allows up to 2x; use a large positive value for the highest practical speed.
speed_regulator_step_ns 10000000 Regulator step (10 ms). Set it no greater than the smallest desired simulation step; larger values reduce coordinator overhead.
auto_start true Start advancing the clock immediately; set false to start paused.
follows_real_time true Enable real-time catch-up behavior; see Advanced usage.
publish_clock true Publish /clock; parent coordinators normally set this to false.
fss_time_coordinator_endpoint namespace-derived IPC endpoint ZeroMQ ROUTER endpoint used by local participants.

To use fss_time with application nodes, set both parameters in their launch scope:

from launch_ros.actions import SetParameter

SetParameter(name="use_fss_sim_time", value=True)
SetParameter(name="use_sim_time", value=True)

use_sim_time makes the node clock follow the coordinator’s /clock. use_fss_sim_time enables the fss_time announce-and-request behavior in its helpers and executors. They are intentionally separate: setting only use_sim_time uses /clock but does not make the application a lock-step participant; setting only use_fss_sim_time leaves ROS time inactive and causes the helpers to wait. The package launch files set both together, and use_fss_sim_time is normally enabled by default.

Set the endpoint too when it differs from the default or when running on another machine:

SetParameter(
    name="fss_time_coordinator_endpoint",
    value="tcp://coordinator-host:5545",
)

How lock-step time works

  ROS timer / loop / callback                     ROS timer / loop / callback
  +--------------------------+                    +--------------------------+
  | thread participant A     |                    | thread participant B     |
  | announce next safe time  |                    | announce next safe time  |
  +------------+-------------+                    +-------------+------------+
               | ZeroMQ ANNOUNCE tA                             | ZeroMQ ANNOUNCE tB
               '---------------------------. .------------------'
                                            v v
                              +-----------------------------------+
                              |         Time coordinator          |
                              | target = earliest safe request    |
                              | + speed/real-time constraints     |
                              +----------------+------------------+
                                               |
                                               | grant t, publish /clock
                        . . . . . . . . . . .  v  . . . . . . . . . . .
                                               |
                       +-----------------------+-----------------------+
                       | Nodes use their ROS clock at the same time t  |
                       +------------------------------------------------+

For a normal finite step, the coordinator waits until every participating thread has made a new announcement, then advances to the minimum requested safe time, subject to the configured speed regulator. A thread that is waiting for ROS work does not constrain progress: an fss_time executor announces infinite safe time while it waits. Before executing a ready callback, the executor announces the current simulation time and therefore holds the clock during that callback.

fss_time::Rate and fss_time::sleep_* announce the time at which their calling thread will resume before sleeping on the node’s ROS clock. The coordinator can consequently request the next grant proactively instead of waiting for wall time to elapse.

Converting a ROS 2 node

File truncated at 100 lines see the full file

CHANGELOG
No CHANGELOG found.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged fss_time at Robotics Stack Exchange

No version for distro iron showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

fss_time package from fastswarmsim repo

fss_bringup fss_px4_sim fss_sensing fss_time fss_time_interfaces

ROS Distro
humble

Package Summary

Version 0.1.1
License BSD-3-Clause
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/shupx/FastSwarmSim.git
VCS Type git
VCS Version main
Last Updated 2026-08-25
Dev Status MAINTAINED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

ZeroMQ based conservative lock-step simulation time for FastSwarmSim.

Maintainers

  • Peixuan Shu

Authors

No additional authors.

fss_time

This package provides conservative lock-step simulation time for ROS 2 applications in FastSwarmSim. A ZeroMQ-based time coordinator grants the shared simulation clock only after every participating thread has announced the next time at which it is safe for the clock to advance. This makes simulation results deterministic with respect to simulation time while allowing real-time or accelerated execution.

# Launch a local coordinator, simulation clock, and control UI.
ros2 launch fss_time time_coordinator.launch.py

# Limit the simulation to 2x real time.
ros2 launch fss_time time_coordinator.launch.py max_real_time_factor:=2.0

# Run with a high speed limit (bounded by available CPU and participant work).
ros2 launch fss_time time_coordinator.launch.py max_real_time_factor:=1000.0

# Start without the UI.
ros2 launch fss_time time_coordinator.launch.py start_coordinator_ui:=false

What it contains:

  1. A time coordinator that publishes /clock, receives participant safe-time announcements over ZeroMQ, and grants a shared simulation time. The coordinator also provides fss/clock_control to pause/resume the clock and set max_real_time_factor at runtime.

  2. Thread time participants. Each participating thread announces the earliest future simulation time that it can safely permit; its announcement automatically registers the thread and is removed when the thread exits.

  3. fss_time::Rate, fss_time::sleep_for, and fss_time::sleep_until helpers. They use the node clock and automatically announce the next safe time when use_fss_sim_time is enabled.

  4. fss_time::executors::SingleThreadedExecutor and fss_time::executors::MultiThreadedExecutor, plus the convenience fss_time::spin(node). These executors make ROS callbacks participate in lock-step execution.

  5. Cascaded coordinators for multi-machine simulation. A child coordinator announces its local safe time to a parent coordinator and republishes grants as its local /clock.

Launch and clock parameters

time_coordinator.launch.py starts a root coordinator. By default it uses a local IPC endpoint:

ipc:///tmp/fss_time_coordinator.ipc

Important launch arguments:

Argument Default Description
max_real_time_factor 1.0 Maximum simulation-time to wall-time ratio. 2.0 allows up to 2x; use a large positive value for the highest practical speed.
speed_regulator_step_ns 10000000 Regulator step (10 ms). Set it no greater than the smallest desired simulation step; larger values reduce coordinator overhead.
auto_start true Start advancing the clock immediately; set false to start paused.
follows_real_time true Enable real-time catch-up behavior; see Advanced usage.
publish_clock true Publish /clock; parent coordinators normally set this to false.
fss_time_coordinator_endpoint namespace-derived IPC endpoint ZeroMQ ROUTER endpoint used by local participants.

To use fss_time with application nodes, set both parameters in their launch scope:

from launch_ros.actions import SetParameter

SetParameter(name="use_fss_sim_time", value=True)
SetParameter(name="use_sim_time", value=True)

use_sim_time makes the node clock follow the coordinator’s /clock. use_fss_sim_time enables the fss_time announce-and-request behavior in its helpers and executors. They are intentionally separate: setting only use_sim_time uses /clock but does not make the application a lock-step participant; setting only use_fss_sim_time leaves ROS time inactive and causes the helpers to wait. The package launch files set both together, and use_fss_sim_time is normally enabled by default.

Set the endpoint too when it differs from the default or when running on another machine:

SetParameter(
    name="fss_time_coordinator_endpoint",
    value="tcp://coordinator-host:5545",
)

How lock-step time works

  ROS timer / loop / callback                     ROS timer / loop / callback
  +--------------------------+                    +--------------------------+
  | thread participant A     |                    | thread participant B     |
  | announce next safe time  |                    | announce next safe time  |
  +------------+-------------+                    +-------------+------------+
               | ZeroMQ ANNOUNCE tA                             | ZeroMQ ANNOUNCE tB
               '---------------------------. .------------------'
                                            v v
                              +-----------------------------------+
                              |         Time coordinator          |
                              | target = earliest safe request    |
                              | + speed/real-time constraints     |
                              +----------------+------------------+
                                               |
                                               | grant t, publish /clock
                        . . . . . . . . . . .  v  . . . . . . . . . . .
                                               |
                       +-----------------------+-----------------------+
                       | Nodes use their ROS clock at the same time t  |
                       +------------------------------------------------+

For a normal finite step, the coordinator waits until every participating thread has made a new announcement, then advances to the minimum requested safe time, subject to the configured speed regulator. A thread that is waiting for ROS work does not constrain progress: an fss_time executor announces infinite safe time while it waits. Before executing a ready callback, the executor announces the current simulation time and therefore holds the clock during that callback.

fss_time::Rate and fss_time::sleep_* announce the time at which their calling thread will resume before sleeping on the node’s ROS clock. The coordinator can consequently request the next grant proactively instead of waiting for wall time to elapse.

Converting a ROS 2 node

File truncated at 100 lines see the full file

CHANGELOG
No CHANGELOG found.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged fss_time at Robotics Stack Exchange

No version for distro lunar showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

fss_time package from fastswarmsim repo

fss_bringup fss_px4_sim fss_sensing fss_time fss_time_interfaces

ROS Distro
humble

Package Summary

Version 0.1.1
License BSD-3-Clause
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/shupx/FastSwarmSim.git
VCS Type git
VCS Version main
Last Updated 2026-08-25
Dev Status MAINTAINED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

ZeroMQ based conservative lock-step simulation time for FastSwarmSim.

Maintainers

  • Peixuan Shu

Authors

No additional authors.

fss_time

This package provides conservative lock-step simulation time for ROS 2 applications in FastSwarmSim. A ZeroMQ-based time coordinator grants the shared simulation clock only after every participating thread has announced the next time at which it is safe for the clock to advance. This makes simulation results deterministic with respect to simulation time while allowing real-time or accelerated execution.

# Launch a local coordinator, simulation clock, and control UI.
ros2 launch fss_time time_coordinator.launch.py

# Limit the simulation to 2x real time.
ros2 launch fss_time time_coordinator.launch.py max_real_time_factor:=2.0

# Run with a high speed limit (bounded by available CPU and participant work).
ros2 launch fss_time time_coordinator.launch.py max_real_time_factor:=1000.0

# Start without the UI.
ros2 launch fss_time time_coordinator.launch.py start_coordinator_ui:=false

What it contains:

  1. A time coordinator that publishes /clock, receives participant safe-time announcements over ZeroMQ, and grants a shared simulation time. The coordinator also provides fss/clock_control to pause/resume the clock and set max_real_time_factor at runtime.

  2. Thread time participants. Each participating thread announces the earliest future simulation time that it can safely permit; its announcement automatically registers the thread and is removed when the thread exits.

  3. fss_time::Rate, fss_time::sleep_for, and fss_time::sleep_until helpers. They use the node clock and automatically announce the next safe time when use_fss_sim_time is enabled.

  4. fss_time::executors::SingleThreadedExecutor and fss_time::executors::MultiThreadedExecutor, plus the convenience fss_time::spin(node). These executors make ROS callbacks participate in lock-step execution.

  5. Cascaded coordinators for multi-machine simulation. A child coordinator announces its local safe time to a parent coordinator and republishes grants as its local /clock.

Launch and clock parameters

time_coordinator.launch.py starts a root coordinator. By default it uses a local IPC endpoint:

ipc:///tmp/fss_time_coordinator.ipc

Important launch arguments:

Argument Default Description
max_real_time_factor 1.0 Maximum simulation-time to wall-time ratio. 2.0 allows up to 2x; use a large positive value for the highest practical speed.
speed_regulator_step_ns 10000000 Regulator step (10 ms). Set it no greater than the smallest desired simulation step; larger values reduce coordinator overhead.
auto_start true Start advancing the clock immediately; set false to start paused.
follows_real_time true Enable real-time catch-up behavior; see Advanced usage.
publish_clock true Publish /clock; parent coordinators normally set this to false.
fss_time_coordinator_endpoint namespace-derived IPC endpoint ZeroMQ ROUTER endpoint used by local participants.

To use fss_time with application nodes, set both parameters in their launch scope:

from launch_ros.actions import SetParameter

SetParameter(name="use_fss_sim_time", value=True)
SetParameter(name="use_sim_time", value=True)

use_sim_time makes the node clock follow the coordinator’s /clock. use_fss_sim_time enables the fss_time announce-and-request behavior in its helpers and executors. They are intentionally separate: setting only use_sim_time uses /clock but does not make the application a lock-step participant; setting only use_fss_sim_time leaves ROS time inactive and causes the helpers to wait. The package launch files set both together, and use_fss_sim_time is normally enabled by default.

Set the endpoint too when it differs from the default or when running on another machine:

SetParameter(
    name="fss_time_coordinator_endpoint",
    value="tcp://coordinator-host:5545",
)

How lock-step time works

  ROS timer / loop / callback                     ROS timer / loop / callback
  +--------------------------+                    +--------------------------+
  | thread participant A     |                    | thread participant B     |
  | announce next safe time  |                    | announce next safe time  |
  +------------+-------------+                    +-------------+------------+
               | ZeroMQ ANNOUNCE tA                             | ZeroMQ ANNOUNCE tB
               '---------------------------. .------------------'
                                            v v
                              +-----------------------------------+
                              |         Time coordinator          |
                              | target = earliest safe request    |
                              | + speed/real-time constraints     |
                              +----------------+------------------+
                                               |
                                               | grant t, publish /clock
                        . . . . . . . . . . .  v  . . . . . . . . . . .
                                               |
                       +-----------------------+-----------------------+
                       | Nodes use their ROS clock at the same time t  |
                       +------------------------------------------------+

For a normal finite step, the coordinator waits until every participating thread has made a new announcement, then advances to the minimum requested safe time, subject to the configured speed regulator. A thread that is waiting for ROS work does not constrain progress: an fss_time executor announces infinite safe time while it waits. Before executing a ready callback, the executor announces the current simulation time and therefore holds the clock during that callback.

fss_time::Rate and fss_time::sleep_* announce the time at which their calling thread will resume before sleeping on the node’s ROS clock. The coordinator can consequently request the next grant proactively instead of waiting for wall time to elapse.

Converting a ROS 2 node

File truncated at 100 lines see the full file

CHANGELOG
No CHANGELOG found.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged fss_time at Robotics Stack Exchange

No version for distro jade showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

fss_time package from fastswarmsim repo

fss_bringup fss_px4_sim fss_sensing fss_time fss_time_interfaces

ROS Distro
humble

Package Summary

Version 0.1.1
License BSD-3-Clause
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/shupx/FastSwarmSim.git
VCS Type git
VCS Version main
Last Updated 2026-08-25
Dev Status MAINTAINED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

ZeroMQ based conservative lock-step simulation time for FastSwarmSim.

Maintainers

  • Peixuan Shu

Authors

No additional authors.

fss_time

This package provides conservative lock-step simulation time for ROS 2 applications in FastSwarmSim. A ZeroMQ-based time coordinator grants the shared simulation clock only after every participating thread has announced the next time at which it is safe for the clock to advance. This makes simulation results deterministic with respect to simulation time while allowing real-time or accelerated execution.

# Launch a local coordinator, simulation clock, and control UI.
ros2 launch fss_time time_coordinator.launch.py

# Limit the simulation to 2x real time.
ros2 launch fss_time time_coordinator.launch.py max_real_time_factor:=2.0

# Run with a high speed limit (bounded by available CPU and participant work).
ros2 launch fss_time time_coordinator.launch.py max_real_time_factor:=1000.0

# Start without the UI.
ros2 launch fss_time time_coordinator.launch.py start_coordinator_ui:=false

What it contains:

  1. A time coordinator that publishes /clock, receives participant safe-time announcements over ZeroMQ, and grants a shared simulation time. The coordinator also provides fss/clock_control to pause/resume the clock and set max_real_time_factor at runtime.

  2. Thread time participants. Each participating thread announces the earliest future simulation time that it can safely permit; its announcement automatically registers the thread and is removed when the thread exits.

  3. fss_time::Rate, fss_time::sleep_for, and fss_time::sleep_until helpers. They use the node clock and automatically announce the next safe time when use_fss_sim_time is enabled.

  4. fss_time::executors::SingleThreadedExecutor and fss_time::executors::MultiThreadedExecutor, plus the convenience fss_time::spin(node). These executors make ROS callbacks participate in lock-step execution.

  5. Cascaded coordinators for multi-machine simulation. A child coordinator announces its local safe time to a parent coordinator and republishes grants as its local /clock.

Launch and clock parameters

time_coordinator.launch.py starts a root coordinator. By default it uses a local IPC endpoint:

ipc:///tmp/fss_time_coordinator.ipc

Important launch arguments:

Argument Default Description
max_real_time_factor 1.0 Maximum simulation-time to wall-time ratio. 2.0 allows up to 2x; use a large positive value for the highest practical speed.
speed_regulator_step_ns 10000000 Regulator step (10 ms). Set it no greater than the smallest desired simulation step; larger values reduce coordinator overhead.
auto_start true Start advancing the clock immediately; set false to start paused.
follows_real_time true Enable real-time catch-up behavior; see Advanced usage.
publish_clock true Publish /clock; parent coordinators normally set this to false.
fss_time_coordinator_endpoint namespace-derived IPC endpoint ZeroMQ ROUTER endpoint used by local participants.

To use fss_time with application nodes, set both parameters in their launch scope:

from launch_ros.actions import SetParameter

SetParameter(name="use_fss_sim_time", value=True)
SetParameter(name="use_sim_time", value=True)

use_sim_time makes the node clock follow the coordinator’s /clock. use_fss_sim_time enables the fss_time announce-and-request behavior in its helpers and executors. They are intentionally separate: setting only use_sim_time uses /clock but does not make the application a lock-step participant; setting only use_fss_sim_time leaves ROS time inactive and causes the helpers to wait. The package launch files set both together, and use_fss_sim_time is normally enabled by default.

Set the endpoint too when it differs from the default or when running on another machine:

SetParameter(
    name="fss_time_coordinator_endpoint",
    value="tcp://coordinator-host:5545",
)

How lock-step time works

  ROS timer / loop / callback                     ROS timer / loop / callback
  +--------------------------+                    +--------------------------+
  | thread participant A     |                    | thread participant B     |
  | announce next safe time  |                    | announce next safe time  |
  +------------+-------------+                    +-------------+------------+
               | ZeroMQ ANNOUNCE tA                             | ZeroMQ ANNOUNCE tB
               '---------------------------. .------------------'
                                            v v
                              +-----------------------------------+
                              |         Time coordinator          |
                              | target = earliest safe request    |
                              | + speed/real-time constraints     |
                              +----------------+------------------+
                                               |
                                               | grant t, publish /clock
                        . . . . . . . . . . .  v  . . . . . . . . . . .
                                               |
                       +-----------------------+-----------------------+
                       | Nodes use their ROS clock at the same time t  |
                       +------------------------------------------------+

For a normal finite step, the coordinator waits until every participating thread has made a new announcement, then advances to the minimum requested safe time, subject to the configured speed regulator. A thread that is waiting for ROS work does not constrain progress: an fss_time executor announces infinite safe time while it waits. Before executing a ready callback, the executor announces the current simulation time and therefore holds the clock during that callback.

fss_time::Rate and fss_time::sleep_* announce the time at which their calling thread will resume before sleeping on the node’s ROS clock. The coordinator can consequently request the next grant proactively instead of waiting for wall time to elapse.

Converting a ROS 2 node

File truncated at 100 lines see the full file

CHANGELOG
No CHANGELOG found.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged fss_time at Robotics Stack Exchange

No version for distro indigo showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

fss_time package from fastswarmsim repo

fss_bringup fss_px4_sim fss_sensing fss_time fss_time_interfaces

ROS Distro
humble

Package Summary

Version 0.1.1
License BSD-3-Clause
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/shupx/FastSwarmSim.git
VCS Type git
VCS Version main
Last Updated 2026-08-25
Dev Status MAINTAINED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

ZeroMQ based conservative lock-step simulation time for FastSwarmSim.

Maintainers

  • Peixuan Shu

Authors

No additional authors.

fss_time

This package provides conservative lock-step simulation time for ROS 2 applications in FastSwarmSim. A ZeroMQ-based time coordinator grants the shared simulation clock only after every participating thread has announced the next time at which it is safe for the clock to advance. This makes simulation results deterministic with respect to simulation time while allowing real-time or accelerated execution.

# Launch a local coordinator, simulation clock, and control UI.
ros2 launch fss_time time_coordinator.launch.py

# Limit the simulation to 2x real time.
ros2 launch fss_time time_coordinator.launch.py max_real_time_factor:=2.0

# Run with a high speed limit (bounded by available CPU and participant work).
ros2 launch fss_time time_coordinator.launch.py max_real_time_factor:=1000.0

# Start without the UI.
ros2 launch fss_time time_coordinator.launch.py start_coordinator_ui:=false

What it contains:

  1. A time coordinator that publishes /clock, receives participant safe-time announcements over ZeroMQ, and grants a shared simulation time. The coordinator also provides fss/clock_control to pause/resume the clock and set max_real_time_factor at runtime.

  2. Thread time participants. Each participating thread announces the earliest future simulation time that it can safely permit; its announcement automatically registers the thread and is removed when the thread exits.

  3. fss_time::Rate, fss_time::sleep_for, and fss_time::sleep_until helpers. They use the node clock and automatically announce the next safe time when use_fss_sim_time is enabled.

  4. fss_time::executors::SingleThreadedExecutor and fss_time::executors::MultiThreadedExecutor, plus the convenience fss_time::spin(node). These executors make ROS callbacks participate in lock-step execution.

  5. Cascaded coordinators for multi-machine simulation. A child coordinator announces its local safe time to a parent coordinator and republishes grants as its local /clock.

Launch and clock parameters

time_coordinator.launch.py starts a root coordinator. By default it uses a local IPC endpoint:

ipc:///tmp/fss_time_coordinator.ipc

Important launch arguments:

Argument Default Description
max_real_time_factor 1.0 Maximum simulation-time to wall-time ratio. 2.0 allows up to 2x; use a large positive value for the highest practical speed.
speed_regulator_step_ns 10000000 Regulator step (10 ms). Set it no greater than the smallest desired simulation step; larger values reduce coordinator overhead.
auto_start true Start advancing the clock immediately; set false to start paused.
follows_real_time true Enable real-time catch-up behavior; see Advanced usage.
publish_clock true Publish /clock; parent coordinators normally set this to false.
fss_time_coordinator_endpoint namespace-derived IPC endpoint ZeroMQ ROUTER endpoint used by local participants.

To use fss_time with application nodes, set both parameters in their launch scope:

from launch_ros.actions import SetParameter

SetParameter(name="use_fss_sim_time", value=True)
SetParameter(name="use_sim_time", value=True)

use_sim_time makes the node clock follow the coordinator’s /clock. use_fss_sim_time enables the fss_time announce-and-request behavior in its helpers and executors. They are intentionally separate: setting only use_sim_time uses /clock but does not make the application a lock-step participant; setting only use_fss_sim_time leaves ROS time inactive and causes the helpers to wait. The package launch files set both together, and use_fss_sim_time is normally enabled by default.

Set the endpoint too when it differs from the default or when running on another machine:

SetParameter(
    name="fss_time_coordinator_endpoint",
    value="tcp://coordinator-host:5545",
)

How lock-step time works

  ROS timer / loop / callback                     ROS timer / loop / callback
  +--------------------------+                    +--------------------------+
  | thread participant A     |                    | thread participant B     |
  | announce next safe time  |                    | announce next safe time  |
  +------------+-------------+                    +-------------+------------+
               | ZeroMQ ANNOUNCE tA                             | ZeroMQ ANNOUNCE tB
               '---------------------------. .------------------'
                                            v v
                              +-----------------------------------+
                              |         Time coordinator          |
                              | target = earliest safe request    |
                              | + speed/real-time constraints     |
                              +----------------+------------------+
                                               |
                                               | grant t, publish /clock
                        . . . . . . . . . . .  v  . . . . . . . . . . .
                                               |
                       +-----------------------+-----------------------+
                       | Nodes use their ROS clock at the same time t  |
                       +------------------------------------------------+

For a normal finite step, the coordinator waits until every participating thread has made a new announcement, then advances to the minimum requested safe time, subject to the configured speed regulator. A thread that is waiting for ROS work does not constrain progress: an fss_time executor announces infinite safe time while it waits. Before executing a ready callback, the executor announces the current simulation time and therefore holds the clock during that callback.

fss_time::Rate and fss_time::sleep_* announce the time at which their calling thread will resume before sleeping on the node’s ROS clock. The coordinator can consequently request the next grant proactively instead of waiting for wall time to elapse.

Converting a ROS 2 node

File truncated at 100 lines see the full file

CHANGELOG
No CHANGELOG found.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged fss_time at Robotics Stack Exchange

No version for distro hydro showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

fss_time package from fastswarmsim repo

fss_bringup fss_px4_sim fss_sensing fss_time fss_time_interfaces

ROS Distro
humble

Package Summary

Version 0.1.1
License BSD-3-Clause
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/shupx/FastSwarmSim.git
VCS Type git
VCS Version main
Last Updated 2026-08-25
Dev Status MAINTAINED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

ZeroMQ based conservative lock-step simulation time for FastSwarmSim.

Maintainers

  • Peixuan Shu

Authors

No additional authors.

fss_time

This package provides conservative lock-step simulation time for ROS 2 applications in FastSwarmSim. A ZeroMQ-based time coordinator grants the shared simulation clock only after every participating thread has announced the next time at which it is safe for the clock to advance. This makes simulation results deterministic with respect to simulation time while allowing real-time or accelerated execution.

# Launch a local coordinator, simulation clock, and control UI.
ros2 launch fss_time time_coordinator.launch.py

# Limit the simulation to 2x real time.
ros2 launch fss_time time_coordinator.launch.py max_real_time_factor:=2.0

# Run with a high speed limit (bounded by available CPU and participant work).
ros2 launch fss_time time_coordinator.launch.py max_real_time_factor:=1000.0

# Start without the UI.
ros2 launch fss_time time_coordinator.launch.py start_coordinator_ui:=false

What it contains:

  1. A time coordinator that publishes /clock, receives participant safe-time announcements over ZeroMQ, and grants a shared simulation time. The coordinator also provides fss/clock_control to pause/resume the clock and set max_real_time_factor at runtime.

  2. Thread time participants. Each participating thread announces the earliest future simulation time that it can safely permit; its announcement automatically registers the thread and is removed when the thread exits.

  3. fss_time::Rate, fss_time::sleep_for, and fss_time::sleep_until helpers. They use the node clock and automatically announce the next safe time when use_fss_sim_time is enabled.

  4. fss_time::executors::SingleThreadedExecutor and fss_time::executors::MultiThreadedExecutor, plus the convenience fss_time::spin(node). These executors make ROS callbacks participate in lock-step execution.

  5. Cascaded coordinators for multi-machine simulation. A child coordinator announces its local safe time to a parent coordinator and republishes grants as its local /clock.

Launch and clock parameters

time_coordinator.launch.py starts a root coordinator. By default it uses a local IPC endpoint:

ipc:///tmp/fss_time_coordinator.ipc

Important launch arguments:

Argument Default Description
max_real_time_factor 1.0 Maximum simulation-time to wall-time ratio. 2.0 allows up to 2x; use a large positive value for the highest practical speed.
speed_regulator_step_ns 10000000 Regulator step (10 ms). Set it no greater than the smallest desired simulation step; larger values reduce coordinator overhead.
auto_start true Start advancing the clock immediately; set false to start paused.
follows_real_time true Enable real-time catch-up behavior; see Advanced usage.
publish_clock true Publish /clock; parent coordinators normally set this to false.
fss_time_coordinator_endpoint namespace-derived IPC endpoint ZeroMQ ROUTER endpoint used by local participants.

To use fss_time with application nodes, set both parameters in their launch scope:

from launch_ros.actions import SetParameter

SetParameter(name="use_fss_sim_time", value=True)
SetParameter(name="use_sim_time", value=True)

use_sim_time makes the node clock follow the coordinator’s /clock. use_fss_sim_time enables the fss_time announce-and-request behavior in its helpers and executors. They are intentionally separate: setting only use_sim_time uses /clock but does not make the application a lock-step participant; setting only use_fss_sim_time leaves ROS time inactive and causes the helpers to wait. The package launch files set both together, and use_fss_sim_time is normally enabled by default.

Set the endpoint too when it differs from the default or when running on another machine:

SetParameter(
    name="fss_time_coordinator_endpoint",
    value="tcp://coordinator-host:5545",
)

How lock-step time works

  ROS timer / loop / callback                     ROS timer / loop / callback
  +--------------------------+                    +--------------------------+
  | thread participant A     |                    | thread participant B     |
  | announce next safe time  |                    | announce next safe time  |
  +------------+-------------+                    +-------------+------------+
               | ZeroMQ ANNOUNCE tA                             | ZeroMQ ANNOUNCE tB
               '---------------------------. .------------------'
                                            v v
                              +-----------------------------------+
                              |         Time coordinator          |
                              | target = earliest safe request    |
                              | + speed/real-time constraints     |
                              +----------------+------------------+
                                               |
                                               | grant t, publish /clock
                        . . . . . . . . . . .  v  . . . . . . . . . . .
                                               |
                       +-----------------------+-----------------------+
                       | Nodes use their ROS clock at the same time t  |
                       +------------------------------------------------+

For a normal finite step, the coordinator waits until every participating thread has made a new announcement, then advances to the minimum requested safe time, subject to the configured speed regulator. A thread that is waiting for ROS work does not constrain progress: an fss_time executor announces infinite safe time while it waits. Before executing a ready callback, the executor announces the current simulation time and therefore holds the clock during that callback.

fss_time::Rate and fss_time::sleep_* announce the time at which their calling thread will resume before sleeping on the node’s ROS clock. The coordinator can consequently request the next grant proactively instead of waiting for wall time to elapse.

Converting a ROS 2 node

File truncated at 100 lines see the full file

CHANGELOG
No CHANGELOG found.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged fss_time at Robotics Stack Exchange

No version for distro kinetic showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

fss_time package from fastswarmsim repo

fss_bringup fss_px4_sim fss_sensing fss_time fss_time_interfaces

ROS Distro
humble

Package Summary

Version 0.1.1
License BSD-3-Clause
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/shupx/FastSwarmSim.git
VCS Type git
VCS Version main
Last Updated 2026-08-25
Dev Status MAINTAINED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

ZeroMQ based conservative lock-step simulation time for FastSwarmSim.

Maintainers

  • Peixuan Shu

Authors

No additional authors.

fss_time

This package provides conservative lock-step simulation time for ROS 2 applications in FastSwarmSim. A ZeroMQ-based time coordinator grants the shared simulation clock only after every participating thread has announced the next time at which it is safe for the clock to advance. This makes simulation results deterministic with respect to simulation time while allowing real-time or accelerated execution.

# Launch a local coordinator, simulation clock, and control UI.
ros2 launch fss_time time_coordinator.launch.py

# Limit the simulation to 2x real time.
ros2 launch fss_time time_coordinator.launch.py max_real_time_factor:=2.0

# Run with a high speed limit (bounded by available CPU and participant work).
ros2 launch fss_time time_coordinator.launch.py max_real_time_factor:=1000.0

# Start without the UI.
ros2 launch fss_time time_coordinator.launch.py start_coordinator_ui:=false

What it contains:

  1. A time coordinator that publishes /clock, receives participant safe-time announcements over ZeroMQ, and grants a shared simulation time. The coordinator also provides fss/clock_control to pause/resume the clock and set max_real_time_factor at runtime.

  2. Thread time participants. Each participating thread announces the earliest future simulation time that it can safely permit; its announcement automatically registers the thread and is removed when the thread exits.

  3. fss_time::Rate, fss_time::sleep_for, and fss_time::sleep_until helpers. They use the node clock and automatically announce the next safe time when use_fss_sim_time is enabled.

  4. fss_time::executors::SingleThreadedExecutor and fss_time::executors::MultiThreadedExecutor, plus the convenience fss_time::spin(node). These executors make ROS callbacks participate in lock-step execution.

  5. Cascaded coordinators for multi-machine simulation. A child coordinator announces its local safe time to a parent coordinator and republishes grants as its local /clock.

Launch and clock parameters

time_coordinator.launch.py starts a root coordinator. By default it uses a local IPC endpoint:

ipc:///tmp/fss_time_coordinator.ipc

Important launch arguments:

Argument Default Description
max_real_time_factor 1.0 Maximum simulation-time to wall-time ratio. 2.0 allows up to 2x; use a large positive value for the highest practical speed.
speed_regulator_step_ns 10000000 Regulator step (10 ms). Set it no greater than the smallest desired simulation step; larger values reduce coordinator overhead.
auto_start true Start advancing the clock immediately; set false to start paused.
follows_real_time true Enable real-time catch-up behavior; see Advanced usage.
publish_clock true Publish /clock; parent coordinators normally set this to false.
fss_time_coordinator_endpoint namespace-derived IPC endpoint ZeroMQ ROUTER endpoint used by local participants.

To use fss_time with application nodes, set both parameters in their launch scope:

from launch_ros.actions import SetParameter

SetParameter(name="use_fss_sim_time", value=True)
SetParameter(name="use_sim_time", value=True)

use_sim_time makes the node clock follow the coordinator’s /clock. use_fss_sim_time enables the fss_time announce-and-request behavior in its helpers and executors. They are intentionally separate: setting only use_sim_time uses /clock but does not make the application a lock-step participant; setting only use_fss_sim_time leaves ROS time inactive and causes the helpers to wait. The package launch files set both together, and use_fss_sim_time is normally enabled by default.

Set the endpoint too when it differs from the default or when running on another machine:

SetParameter(
    name="fss_time_coordinator_endpoint",
    value="tcp://coordinator-host:5545",
)

How lock-step time works

  ROS timer / loop / callback                     ROS timer / loop / callback
  +--------------------------+                    +--------------------------+
  | thread participant A     |                    | thread participant B     |
  | announce next safe time  |                    | announce next safe time  |
  +------------+-------------+                    +-------------+------------+
               | ZeroMQ ANNOUNCE tA                             | ZeroMQ ANNOUNCE tB
               '---------------------------. .------------------'
                                            v v
                              +-----------------------------------+
                              |         Time coordinator          |
                              | target = earliest safe request    |
                              | + speed/real-time constraints     |
                              +----------------+------------------+
                                               |
                                               | grant t, publish /clock
                        . . . . . . . . . . .  v  . . . . . . . . . . .
                                               |
                       +-----------------------+-----------------------+
                       | Nodes use their ROS clock at the same time t  |
                       +------------------------------------------------+

For a normal finite step, the coordinator waits until every participating thread has made a new announcement, then advances to the minimum requested safe time, subject to the configured speed regulator. A thread that is waiting for ROS work does not constrain progress: an fss_time executor announces infinite safe time while it waits. Before executing a ready callback, the executor announces the current simulation time and therefore holds the clock during that callback.

fss_time::Rate and fss_time::sleep_* announce the time at which their calling thread will resume before sleeping on the node’s ROS clock. The coordinator can consequently request the next grant proactively instead of waiting for wall time to elapse.

Converting a ROS 2 node

File truncated at 100 lines see the full file

CHANGELOG
No CHANGELOG found.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged fss_time at Robotics Stack Exchange

No version for distro melodic showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

fss_time package from fastswarmsim repo

fss_bringup fss_px4_sim fss_sensing fss_time fss_time_interfaces

ROS Distro
humble

Package Summary

Version 0.1.1
License BSD-3-Clause
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/shupx/FastSwarmSim.git
VCS Type git
VCS Version main
Last Updated 2026-08-25
Dev Status MAINTAINED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

ZeroMQ based conservative lock-step simulation time for FastSwarmSim.

Maintainers

  • Peixuan Shu

Authors

No additional authors.

fss_time

This package provides conservative lock-step simulation time for ROS 2 applications in FastSwarmSim. A ZeroMQ-based time coordinator grants the shared simulation clock only after every participating thread has announced the next time at which it is safe for the clock to advance. This makes simulation results deterministic with respect to simulation time while allowing real-time or accelerated execution.

# Launch a local coordinator, simulation clock, and control UI.
ros2 launch fss_time time_coordinator.launch.py

# Limit the simulation to 2x real time.
ros2 launch fss_time time_coordinator.launch.py max_real_time_factor:=2.0

# Run with a high speed limit (bounded by available CPU and participant work).
ros2 launch fss_time time_coordinator.launch.py max_real_time_factor:=1000.0

# Start without the UI.
ros2 launch fss_time time_coordinator.launch.py start_coordinator_ui:=false

What it contains:

  1. A time coordinator that publishes /clock, receives participant safe-time announcements over ZeroMQ, and grants a shared simulation time. The coordinator also provides fss/clock_control to pause/resume the clock and set max_real_time_factor at runtime.

  2. Thread time participants. Each participating thread announces the earliest future simulation time that it can safely permit; its announcement automatically registers the thread and is removed when the thread exits.

  3. fss_time::Rate, fss_time::sleep_for, and fss_time::sleep_until helpers. They use the node clock and automatically announce the next safe time when use_fss_sim_time is enabled.

  4. fss_time::executors::SingleThreadedExecutor and fss_time::executors::MultiThreadedExecutor, plus the convenience fss_time::spin(node). These executors make ROS callbacks participate in lock-step execution.

  5. Cascaded coordinators for multi-machine simulation. A child coordinator announces its local safe time to a parent coordinator and republishes grants as its local /clock.

Launch and clock parameters

time_coordinator.launch.py starts a root coordinator. By default it uses a local IPC endpoint:

ipc:///tmp/fss_time_coordinator.ipc

Important launch arguments:

Argument Default Description
max_real_time_factor 1.0 Maximum simulation-time to wall-time ratio. 2.0 allows up to 2x; use a large positive value for the highest practical speed.
speed_regulator_step_ns 10000000 Regulator step (10 ms). Set it no greater than the smallest desired simulation step; larger values reduce coordinator overhead.
auto_start true Start advancing the clock immediately; set false to start paused.
follows_real_time true Enable real-time catch-up behavior; see Advanced usage.
publish_clock true Publish /clock; parent coordinators normally set this to false.
fss_time_coordinator_endpoint namespace-derived IPC endpoint ZeroMQ ROUTER endpoint used by local participants.

To use fss_time with application nodes, set both parameters in their launch scope:

from launch_ros.actions import SetParameter

SetParameter(name="use_fss_sim_time", value=True)
SetParameter(name="use_sim_time", value=True)

use_sim_time makes the node clock follow the coordinator’s /clock. use_fss_sim_time enables the fss_time announce-and-request behavior in its helpers and executors. They are intentionally separate: setting only use_sim_time uses /clock but does not make the application a lock-step participant; setting only use_fss_sim_time leaves ROS time inactive and causes the helpers to wait. The package launch files set both together, and use_fss_sim_time is normally enabled by default.

Set the endpoint too when it differs from the default or when running on another machine:

SetParameter(
    name="fss_time_coordinator_endpoint",
    value="tcp://coordinator-host:5545",
)

How lock-step time works

  ROS timer / loop / callback                     ROS timer / loop / callback
  +--------------------------+                    +--------------------------+
  | thread participant A     |                    | thread participant B     |
  | announce next safe time  |                    | announce next safe time  |
  +------------+-------------+                    +-------------+------------+
               | ZeroMQ ANNOUNCE tA                             | ZeroMQ ANNOUNCE tB
               '---------------------------. .------------------'
                                            v v
                              +-----------------------------------+
                              |         Time coordinator          |
                              | target = earliest safe request    |
                              | + speed/real-time constraints     |
                              +----------------+------------------+
                                               |
                                               | grant t, publish /clock
                        . . . . . . . . . . .  v  . . . . . . . . . . .
                                               |
                       +-----------------------+-----------------------+
                       | Nodes use their ROS clock at the same time t  |
                       +------------------------------------------------+

For a normal finite step, the coordinator waits until every participating thread has made a new announcement, then advances to the minimum requested safe time, subject to the configured speed regulator. A thread that is waiting for ROS work does not constrain progress: an fss_time executor announces infinite safe time while it waits. Before executing a ready callback, the executor announces the current simulation time and therefore holds the clock during that callback.

fss_time::Rate and fss_time::sleep_* announce the time at which their calling thread will resume before sleeping on the node’s ROS clock. The coordinator can consequently request the next grant proactively instead of waiting for wall time to elapse.

Converting a ROS 2 node

File truncated at 100 lines see the full file

CHANGELOG
No CHANGELOG found.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged fss_time at Robotics Stack Exchange

No version for distro noetic showing humble. Known supported distros are highlighted in the buttons above.
Package symbol

fss_time package from fastswarmsim repo

fss_bringup fss_px4_sim fss_sensing fss_time fss_time_interfaces

ROS Distro
humble

Package Summary

Version 0.1.1
License BSD-3-Clause
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/shupx/FastSwarmSim.git
VCS Type git
VCS Version main
Last Updated 2026-08-25
Dev Status MAINTAINED
Released UNRELEASED
Contributing Help Wanted (-)
Good First Issues (-)
Pull Requests to Review (-)

Package Description

ZeroMQ based conservative lock-step simulation time for FastSwarmSim.

Maintainers

  • Peixuan Shu

Authors

No additional authors.

fss_time

This package provides conservative lock-step simulation time for ROS 2 applications in FastSwarmSim. A ZeroMQ-based time coordinator grants the shared simulation clock only after every participating thread has announced the next time at which it is safe for the clock to advance. This makes simulation results deterministic with respect to simulation time while allowing real-time or accelerated execution.

# Launch a local coordinator, simulation clock, and control UI.
ros2 launch fss_time time_coordinator.launch.py

# Limit the simulation to 2x real time.
ros2 launch fss_time time_coordinator.launch.py max_real_time_factor:=2.0

# Run with a high speed limit (bounded by available CPU and participant work).
ros2 launch fss_time time_coordinator.launch.py max_real_time_factor:=1000.0

# Start without the UI.
ros2 launch fss_time time_coordinator.launch.py start_coordinator_ui:=false

What it contains:

  1. A time coordinator that publishes /clock, receives participant safe-time announcements over ZeroMQ, and grants a shared simulation time. The coordinator also provides fss/clock_control to pause/resume the clock and set max_real_time_factor at runtime.

  2. Thread time participants. Each participating thread announces the earliest future simulation time that it can safely permit; its announcement automatically registers the thread and is removed when the thread exits.

  3. fss_time::Rate, fss_time::sleep_for, and fss_time::sleep_until helpers. They use the node clock and automatically announce the next safe time when use_fss_sim_time is enabled.

  4. fss_time::executors::SingleThreadedExecutor and fss_time::executors::MultiThreadedExecutor, plus the convenience fss_time::spin(node). These executors make ROS callbacks participate in lock-step execution.

  5. Cascaded coordinators for multi-machine simulation. A child coordinator announces its local safe time to a parent coordinator and republishes grants as its local /clock.

Launch and clock parameters

time_coordinator.launch.py starts a root coordinator. By default it uses a local IPC endpoint:

ipc:///tmp/fss_time_coordinator.ipc

Important launch arguments:

Argument Default Description
max_real_time_factor 1.0 Maximum simulation-time to wall-time ratio. 2.0 allows up to 2x; use a large positive value for the highest practical speed.
speed_regulator_step_ns 10000000 Regulator step (10 ms). Set it no greater than the smallest desired simulation step; larger values reduce coordinator overhead.
auto_start true Start advancing the clock immediately; set false to start paused.
follows_real_time true Enable real-time catch-up behavior; see Advanced usage.
publish_clock true Publish /clock; parent coordinators normally set this to false.
fss_time_coordinator_endpoint namespace-derived IPC endpoint ZeroMQ ROUTER endpoint used by local participants.

To use fss_time with application nodes, set both parameters in their launch scope:

from launch_ros.actions import SetParameter

SetParameter(name="use_fss_sim_time", value=True)
SetParameter(name="use_sim_time", value=True)

use_sim_time makes the node clock follow the coordinator’s /clock. use_fss_sim_time enables the fss_time announce-and-request behavior in its helpers and executors. They are intentionally separate: setting only use_sim_time uses /clock but does not make the application a lock-step participant; setting only use_fss_sim_time leaves ROS time inactive and causes the helpers to wait. The package launch files set both together, and use_fss_sim_time is normally enabled by default.

Set the endpoint too when it differs from the default or when running on another machine:

SetParameter(
    name="fss_time_coordinator_endpoint",
    value="tcp://coordinator-host:5545",
)

How lock-step time works

  ROS timer / loop / callback                     ROS timer / loop / callback
  +--------------------------+                    +--------------------------+
  | thread participant A     |                    | thread participant B     |
  | announce next safe time  |                    | announce next safe time  |
  +------------+-------------+                    +-------------+------------+
               | ZeroMQ ANNOUNCE tA                             | ZeroMQ ANNOUNCE tB
               '---------------------------. .------------------'
                                            v v
                              +-----------------------------------+
                              |         Time coordinator          |
                              | target = earliest safe request    |
                              | + speed/real-time constraints     |
                              +----------------+------------------+
                                               |
                                               | grant t, publish /clock
                        . . . . . . . . . . .  v  . . . . . . . . . . .
                                               |
                       +-----------------------+-----------------------+
                       | Nodes use their ROS clock at the same time t  |
                       +------------------------------------------------+

For a normal finite step, the coordinator waits until every participating thread has made a new announcement, then advances to the minimum requested safe time, subject to the configured speed regulator. A thread that is waiting for ROS work does not constrain progress: an fss_time executor announces infinite safe time while it waits. Before executing a ready callback, the executor announces the current simulation time and therefore holds the clock during that callback.

fss_time::Rate and fss_time::sleep_* announce the time at which their calling thread will resume before sleeping on the node’s ROS clock. The coordinator can consequently request the next grant proactively instead of waiting for wall time to elapse.

Converting a ROS 2 node

File truncated at 100 lines see the full file

CHANGELOG
No CHANGELOG found.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged fss_time at Robotics Stack Exchange