Skip to content

Commit

Permalink
parameters are list of dict
Browse files Browse the repository at this point in the history
  • Loading branch information
oKermorgant committed Aug 17, 2022
1 parent 64bc1c4 commit f6f868e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/simple_launch/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -498,8 +498,11 @@ def node(self, package, executable = None, plugin = None, **node_args):

if self.sim_time is not None:
if 'parameters' in node_args:
if 'use_sim_time' not in node_args['parameters'][0]:
if type(node_args['parameters'][0]) == dict and 'use_sim_time' not in node_args['parameters'][0]:
node_args['parameters'][0]['use_sim_time'] = self.sim_time
else:
print('Cannot update node params, unknown type',node_args['parameters'])
#node_args['parameters'] += [{'use_sim_time': self.sim_time}]
else:
node_args['parameters'] = [{'use_sim_time': self.sim_time}]

Expand Down

0 comments on commit f6f868e

Please sign in to comment.