本文整理汇总了Python中visualization_msgs.msg.Marker.g方法的典型用法代码示例。如果您正苦于以下问题:Python Marker.g方法的具体用法?Python Marker.g怎么用?Python Marker.g使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类visualization_msgs.msg.Marker
的用法示例。
在下文中一共展示了Marker.g方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Marker
# 需要导入模块: from visualization_msgs.msg import Marker [as 别名]
# 或者: from visualization_msgs.msg.Marker import g [as 别名]
marker_pub.publish(marker)
if __name__ == '__main__':
global marker_color
global marker_pub
global matches
input_topic = sys.argv[1]
output_topic = sys.argv[2]
marker_color = Marker().color
marker_color.a = 1
marker_color.r = float(sys.argv[3])
marker_color.g = float(sys.argv[4])
marker_color.b = float(sys.argv[5])
matches = []
for arg in sys.argv[6:]:
if arg[:6] == "MATCH=":
matches.append(arg[6:])
# print "matches = %s" % matches
rospy.init_node('mark_intersections')
marker_pub = rospy.Publisher(output_topic, Marker)
rospy.Subscriber(input_topic, Convex_Space, input_handler)
示例2: Marker
# 需要导入模块: from visualization_msgs.msg import Marker [as 别名]
# 或者: from visualization_msgs.msg.Marker import g [as 别名]
cam_info.yHei = yHei
cam_info.upperLeft_world_x = upperLeft_world_x
cam_info.upperLeft_world_y = upperLeft_world_y
cam_info.upperLeft_world_z = upperLeft_world_z
C2BB.setCamera(cam_info)
C2BB.setPublisher(output_topic)
marker_pub = rospy.Publisher(input_topic + "__marker", Marker)
global marker_color
marker_color = Marker().color
marker_color.a = 1
if input_topic[-5:] == "3/red":
marker_color.r = 1
marker_color.g = 0
marker_color.b = 0
elif input_topic[-5:] == "green":
marker_color.r = 0
marker_color.g = 1
marker_color.b = 0
elif input_topic[-5:] == "white":
marker_color.r = .5
marker_color.g = .5
marker_color.b = .5
elif input_topic[-5:] == "/blue":
marker_color.r = 0
marker_color.g = 0
marker_color.b = 1
else:
marker_color.r = 0