Skip to content

Commit

Permalink
Update dope
Browse files Browse the repository at this point in the history
Adding random colors when the color is not defined.
  • Loading branch information
TontonTremblay authored Sep 3, 2020
1 parent bc413d6 commit 78ab4be
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion nodes/dope
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,11 @@ class DopeNode(object):
self.mesh_scales[model] = rospy.get_param('~mesh_scales')[model]
except KeyError:
self.mesh_scales[model] = 1.0
try:
self.draw_colors[model] = tuple(rospy.get_param("~draw_colors")[model])
except:
self.draw_colors[model] = (np.random.randint(0,255),np.random.randint(0,255),np.random.randint(0,255))

self.draw_colors[model] = tuple(rospy.get_param("~draw_colors")[model])
self.dimensions[model] = tuple(rospy.get_param("~dimensions")[model])
self.class_ids[model] = rospy.get_param("~class_ids")[model]

Expand Down

0 comments on commit 78ab4be

Please sign in to comment.