本文整理汇总了Python中visualization_msgs.msg.Marker.points[4]方法的典型用法代码示例。如果您正苦于以下问题:Python Marker.points[4]方法的具体用法?Python Marker.points[4]怎么用?Python Marker.points[4]使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类visualization_msgs.msg.Marker
的用法示例。
在下文中一共展示了Marker.points[4]方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: makeVisualization
# 需要导入模块: from visualization_msgs.msg import Marker [as 别名]
# 或者: from visualization_msgs.msg.Marker import points[4] [as 别名]
def makeVisualization(self, data, tipnum):
mk = Marker()
mk.header.frame_id = self.frame[tipnum]
mk.header.stamp = self.datatimestamp
mk.ns = mk.header.frame_id + "/line"
mk.type = Marker.LINE_STRIP
mk.action = Marker.ADD
#mk.lifetime = rospy.Duration(1)
mk.points = []
for i in range(0,5):
mk.points.append(Vector3())
#for i in range(0,1):
for i in range(0,22):
mk.id = i
mk.pose.position = self.center[tipnum][i]
mk.pose.orientation.w = 1.0
mk.scale.x = 0.001
h1 = self.hside1[tipnum][i]
h2 = self.hside2[tipnum][i]
mk.points[0].x = h1.x + h2.x
mk.points[1].x = h1.x - h2.x
mk.points[2].x = -h1.x - h2.x
mk.points[3].x = -h1.x + h2.x
mk.points[0].y = h1.y + h2.y
mk.points[1].y = h1.y - h2.y
mk.points[2].y = -h1.y - h2.y
mk.points[3].y = -h1.y + h2.y
mk.points[0].z = h1.z + h2.z
mk.points[1].z = h1.z - h2.z
mk.points[2].z = -h1.z - h2.z
mk.points[3].z = -h1.z + h2.z
mk.points[4] = mk.points[0]
mk.color.a = 1.0
(mk.color.r, mk.color.g, mk.color.b) = color(data[i] / 6000.)
#print "%f %f %f"%(mk.color.r, mk.color.g, mk.color.b)
self.vis_pub.publish(mk)