Skip to content

Commit

Permalink
bug fix for add_to_point_cloud (solves issue log missingo only in fir…
Browse files Browse the repository at this point in the history
…st pc)
  • Loading branch information
fnattino committed Feb 25, 2020
1 parent e37cecc commit aaacce0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions laserchicken/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,8 +166,8 @@ def add_to_point_cloud(point_cloud_1, point_cloud_2, add_log=True):

# if first point cloud is empty, fill it with attributes of second point cloud
if len(point_cloud_1[keys.point]['x']['data']) == 0:
for key, value in point_cloud_2.items():
point_cloud_1[key] = copy_point_cloud(value)
for key, value in copy_point_cloud(point_cloud_2).items():
point_cloud_1[key] = value
return point_cloud_1
else:
# down the tree structure, the point clouds need to have the same attributes
Expand All @@ -180,7 +180,7 @@ def add_to_point_cloud(point_cloud_1, point_cloud_2, add_log=True):
for key, value in point_cloud_2.items():
# if root attributes are missing (e.g. log), add them
if key not in point_cloud_1:
point_cloud_1[key] = copy_point_cloud(value)
point_cloud_1[key] = copy.copy(value)
continue

# check type of data to merge
Expand Down

0 comments on commit aaacce0

Please sign in to comment.