From 7229891e8f2cc91fe9f1fb0298efa08425c21119 Mon Sep 17 00:00:00 2001 From: Arjo Chakravarty Date: Sat, 12 Oct 2024 02:16:23 +0800 Subject: [PATCH] Adds the ability to set the update rate of the simulation (#264) * Adds the ability to set the update rate of the simulation This commit adds the ability to set the update rate of simulation to be faster than real time via the `update_rate` option. For instance if you want a 5x real time factor simulation running via CLI simply add the flags: ``` ros2 launch rmf_demos_gz office.launch.xml update_rate:=5000 ``` Note by default this sets gazebo's internal step size. Usually we have 1000 steps per second of simulation, hence if we want 5x RTF we need to set update_rate:=5000. Signed-off-by: Arjo Chakravarty * Rename parameter and fix update rate Signed-off-by: Arjo Chakravarty --------- Signed-off-by: Arjo Chakravarty --- rmf_demos_gz/launch/airport_terminal.launch.xml | 2 ++ rmf_demos_gz/launch/battle_royale.launch.xml | 2 ++ rmf_demos_gz/launch/campus.launch.xml | 2 ++ rmf_demos_gz/launch/clinic.launch.xml | 2 ++ rmf_demos_gz/launch/hotel.launch.xml | 2 ++ rmf_demos_gz/launch/office.launch.xml | 2 ++ rmf_demos_gz/launch/office_mock_traffic_light.launch.xml | 1 + rmf_demos_gz/launch/simulation.launch.xml | 3 ++- rmf_demos_gz/launch/triple_H.launch.xml | 2 ++ 9 files changed, 17 insertions(+), 1 deletion(-) diff --git a/rmf_demos_gz/launch/airport_terminal.launch.xml b/rmf_demos_gz/launch/airport_terminal.launch.xml index 319882e8..48a9eaaa 100644 --- a/rmf_demos_gz/launch/airport_terminal.launch.xml +++ b/rmf_demos_gz/launch/airport_terminal.launch.xml @@ -4,6 +4,7 @@ + @@ -15,6 +16,7 @@ + diff --git a/rmf_demos_gz/launch/battle_royale.launch.xml b/rmf_demos_gz/launch/battle_royale.launch.xml index f96c8d55..62d3d165 100644 --- a/rmf_demos_gz/launch/battle_royale.launch.xml +++ b/rmf_demos_gz/launch/battle_royale.launch.xml @@ -4,6 +4,7 @@ + @@ -15,6 +16,7 @@ + diff --git a/rmf_demos_gz/launch/campus.launch.xml b/rmf_demos_gz/launch/campus.launch.xml index ba140a6c..a759621c 100644 --- a/rmf_demos_gz/launch/campus.launch.xml +++ b/rmf_demos_gz/launch/campus.launch.xml @@ -4,6 +4,7 @@ + @@ -15,6 +16,7 @@ + diff --git a/rmf_demos_gz/launch/clinic.launch.xml b/rmf_demos_gz/launch/clinic.launch.xml index 59dc73e0..ae7cbe5a 100644 --- a/rmf_demos_gz/launch/clinic.launch.xml +++ b/rmf_demos_gz/launch/clinic.launch.xml @@ -4,6 +4,7 @@ + @@ -15,6 +16,7 @@ + diff --git a/rmf_demos_gz/launch/hotel.launch.xml b/rmf_demos_gz/launch/hotel.launch.xml index 193fa0d2..507e8956 100644 --- a/rmf_demos_gz/launch/hotel.launch.xml +++ b/rmf_demos_gz/launch/hotel.launch.xml @@ -4,6 +4,7 @@ + @@ -15,5 +16,6 @@ + diff --git a/rmf_demos_gz/launch/office.launch.xml b/rmf_demos_gz/launch/office.launch.xml index 73e38a7a..fab9c832 100644 --- a/rmf_demos_gz/launch/office.launch.xml +++ b/rmf_demos_gz/launch/office.launch.xml @@ -4,6 +4,7 @@ + @@ -15,6 +16,7 @@ + diff --git a/rmf_demos_gz/launch/office_mock_traffic_light.launch.xml b/rmf_demos_gz/launch/office_mock_traffic_light.launch.xml index 18200d87..07663f16 100644 --- a/rmf_demos_gz/launch/office_mock_traffic_light.launch.xml +++ b/rmf_demos_gz/launch/office_mock_traffic_light.launch.xml @@ -3,6 +3,7 @@ + diff --git a/rmf_demos_gz/launch/simulation.launch.xml b/rmf_demos_gz/launch/simulation.launch.xml index 8a017450..45c59056 100644 --- a/rmf_demos_gz/launch/simulation.launch.xml +++ b/rmf_demos_gz/launch/simulation.launch.xml @@ -5,6 +5,7 @@ + @@ -17,7 +18,7 @@ - + diff --git a/rmf_demos_gz/launch/triple_H.launch.xml b/rmf_demos_gz/launch/triple_H.launch.xml index 9e462458..f0d99d6f 100644 --- a/rmf_demos_gz/launch/triple_H.launch.xml +++ b/rmf_demos_gz/launch/triple_H.launch.xml @@ -3,6 +3,7 @@ + @@ -13,6 +14,7 @@ +