本文整理汇总了Python中visualization_msgs.msg.Marker.points[0]方法的典型用法代码示例。如果您正苦于以下问题:Python Marker.points[0]方法的具体用法?Python Marker.points[0]怎么用?Python Marker.points[0]使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类visualization_msgs.msg.Marker
的用法示例。
在下文中一共展示了Marker.points[0]方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: create_delta_simulation
# 需要导入模块: from visualization_msgs.msg import Marker [as 别名]
# 或者: from visualization_msgs.msg.Marker import points[0] [as 别名]
def create_delta_simulation():
print "Creating simulation"
markerArray = MarkerArray()
width = 0.005
# Point of first dynamixel
base1 = Marker()
base1.header.frame_id = "/map"
base1.type = base1.SPHERE
base1.action = base1.ADD
base1.scale.x = width
base1.scale.y = width
base1.scale.z = width
base1.color.a = 1.0
base1.color.r = 1.0
base1.color.g = 0.0
base1.color.b = 0.0
base1.pose.orientation.w = 1.0
base1.pose.position.x = 0
base1.pose.position.y = - 0.06 * sqrt(2)
base1.pose.position.z = 0
base1.id = 1
# Point of second dynamixel
base2 = Marker()
base2.header.frame_id = "/map"
base2.type = base2.SPHERE
base2.action = base2.ADD
base2.scale.x = width
base2.scale.y = width
base2.scale.z = width
base2.color.a = 1.0
base2.color.r = 0.0
base2.color.g = 1.0
base2.color.b = 0.0
base2.pose.orientation.w = 1.0
base2.pose.position.x = 0.06
base2.pose.position.y = 0.06
base2.pose.position.z = 0
base2.id = 2
# Point of third dynamixel
base3 = Marker()
base3.header.frame_id = "/map"
base3.type = base3.SPHERE
base3.action = base3.ADD
base3.scale.x = width
base3.scale.y = width
base3.scale.z = width
base3.color.a = 1.0
base3.color.r = 0.0
base3.color.g = 0.0
base3.color.b = 1.0
base3.pose.orientation.w = 1.0
base3.pose.position.x = - 0.06
base3.pose.position.y = 0.06
base3.pose.position.z = 0
base3.id = 3
# Arrow from first dynamixel to elbow
arrow1 = Marker()
arrow1.header.frame_id = "/map"
arrow1.type = arrow1.ARROW
arrow1.action = arrow1.ADD
arrow1.scale.x = width
arrow1.scale.y = width
arrow1.color.a = 1.0
arrow1.color.r = 1.0
arrow1.color.g = 0.0
arrow1.color.b = 0.0
arrow1.points = [None]*2
arrow1.points[0] = Point(base1.pose.position.x, base1.pose.position.y, 0.0)
arrow1.points[1] = Point(base1.pose.position.x, base1.pose.position.y, 0.08)
arrow1.pose.orientation.w = 1.0
arrow1.id = 4
# Arrow from second dynamixel to elbow
arrow2 = Marker()
arrow2.header.frame_id = "/map"
arrow2.type = arrow2.ARROW
arrow2.action = arrow2.ADD
arrow2.scale.x = width
arrow2.scale.y = width
arrow2.color.a = 1.0
arrow2.color.r = 0.0
arrow2.color.g = 1.0
arrow2.color.b = 0.0
arrow2.points = [None]*2
arrow2.points[0] = Point(base2.pose.position.x, base2.pose.position.y, 0.0)
arrow2.points[1] = Point(base2.pose.position.x, base2.pose.position.y, 0.08)
arrow2.pose.orientation.w = 1.0
arrow2.id = 5
# Arrow from third dynamixel to elbow
arrow3 = Marker()
#.........这里部分代码省略.........
示例2: create_sim
# 需要导入模块: from visualization_msgs.msg import Marker [as 别名]
# 或者: from visualization_msgs.msg.Marker import points[0] [as 别名]
def create_sim():
markerArray = MarkerArray()
width = 0.005
# Point of first dynamixel
base1 = Marker()
base1.header.frame_id = "/map"
base1.type = base1.SPHERE
base1.action = base1.ADD
base1.scale.x = width
base1.scale.y = width
base1.scale.z = width
base1.color.a = 1.0
base1.color.r = 1.0
base1.color.g = 0.0
base1.color.b = 0.0
base1.pose.orientation.w = 1.0
base1.pose.position.x = 0.051961524227
base1.pose.position.y = 0
base1.pose.position.z = 0
base1.id = 1
# Point of second dynamixel
base2 = Marker()
base2.header.frame_id = "/map"
base2.type = base2.SPHERE
base2.action = base2.ADD
base2.scale.x = width
base2.scale.y = width
base2.scale.z = width
base2.color.a = 1.0
base2.color.r = 0.0
base2.color.g = 1.0
base2.color.b = 0.0
base2.pose.orientation.w = 1.0
base2.pose.position.x = -0.051961524227
base2.pose.position.y = -0.06
base2.pose.position.z = 0
base2.id = 2
# Point of third dynamixel
base3 = Marker()
base3.header.frame_id = "/map"
base3.type = base3.SPHERE
base3.action = base3.ADD
base3.scale.x = width
base3.scale.y = width
base3.scale.z = width
base3.color.a = 1.0
base3.color.r = 0.0
base3.color.g = 0.0
base3.color.b = 1.0
base3.pose.orientation.w = 1.0
base3.pose.position.x = -0.051961524227
base3.pose.position.y = 0.06
base3.pose.position.z = 0
base3.id = 3
# Arrow from first dynamixel to elbow
arrow1 = Marker()
arrow1.header.frame_id = "/map"
arrow1.type = arrow1.ARROW
arrow1.action = arrow1.ADD
arrow1.scale.x = width
arrow1.scale.y = width
arrow1.color.a = 1.0
arrow1.color.r = 1.0
arrow1.color.g = 0.0
arrow1.color.b = 0.0
arrow1.points = [None]*2
arrow1.points[0] = Point(0.051961524227, 0.0, 0.0)
arrow1.points[1] = Point(0.051961524227, 0.0, 0.08)
arrow1.pose.orientation.w = 1.0
arrow1.id = 4
# Arrow from second dynamixel to elbow
arrow2 = Marker()
arrow2.header.frame_id = "/map"
arrow2.type = arrow2.ARROW
arrow2.action = arrow2.ADD
arrow2.scale.x = width
arrow2.scale.y = width
arrow2.color.a = 1.0
arrow2.color.r = 0.0
arrow2.color.g = 1.0
arrow2.color.b = 0.0
arrow2.points = [None]*2
arrow2.points[0] = Point(-0.051961524227, -0.06, 0.0)
arrow2.points[1] = Point(-0.051961524227, -0.06, 0.08)
arrow2.pose.orientation.w = 1.0
arrow2.id = 5
# Arrow from third dynamixel to elbow
arrow3 = Marker()
arrow3.header.frame_id = "/map"
#.........这里部分代码省略.........