Skip to content

Commit

Permalink
Merge pull request #1040 from tue-robotics/MatthijsBurgh-patch-1
Browse files Browse the repository at this point in the history
(robot_skills) don't use empty lists as default value
  • Loading branch information
MatthijsBurgh committed Jun 16, 2020
2 parents 62a6491 + ba4f63f commit cd19216
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion robot_skills/src/robot_skills/world_model_ed.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ def reset(self, keep_all_shapes=True):

# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

def update_entity(self, id, type=None, frame_stamped=None, flags=None, add_flags=[], remove_flags=[], action=None):
def update_entity(self, id, type=None, frame_stamped=None, flags=None, add_flags=None, remove_flags=None, action=None):
"""
Updates entity
Expand All @@ -229,6 +229,10 @@ def update_entity(self, id, type=None, frame_stamped=None, flags=None, add_flags
:param remove_flags: list of flags which will removed from the specified entity
:param action: update_action, e.g. remove
"""
if add_flags is None:
add_flags = []
if remove_flags is None:
remove_flags = []
json_entity = '"id" : "%s"' % id
if type:
json_entity += ', "type": "%s"' % type
Expand Down

0 comments on commit cd19216

Please sign in to comment.