Skip to content

Commit

Permalink
use_sim_time support
Browse files Browse the repository at this point in the history
  • Loading branch information
roni-kreinin committed Jul 20, 2023
1 parent 95fd44a commit 2898fc4
Showing 1 changed file with 6 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def __init__(self,
namespace=self.namespace,
path=self.param_path)

def generate_parameters(self) -> None:
def generate_parameters(self, use_sim_time: bool = False) -> None:
# Default parameter file
self.default_param_file = ParamFile(
name=self.default_parameter,
Expand All @@ -86,6 +86,9 @@ def generate_parameters(self) -> None:

# TODO: Get user params
self.param_file.parameters = self.default_param_file.parameters
if use_sim_time:
for node in self.param_file.parameters:
self.param_file.update({node: {'use_sim_time': True}})

def generate_parameter_file(self):
param_writer = ParamWriter(self.param_file)
Expand All @@ -108,17 +111,8 @@ class LocalizationParam(BaseParam):
False, False, True,
True, False, False]

def generate_parameters(self) -> None:
# Default parameter file
self.default_param_file = ParamFile(
name=self.default_parameter,
package=self.default_parameter_file_package,
path=self.default_parameter_file_path,
parameters={}
)
self.default_param_file.read()

self.param_file.parameters = self.default_param_file.parameters
def generate_parameters(self, use_sim_time: bool = False) -> None:
super().generate_parameters(use_sim_time)

# TODO: Get user params
if False:
Expand Down

0 comments on commit 2898fc4

Please sign in to comment.