예제 #1
0
 def publish_turtles(self, turtles):
     msg = Turtles()
     for t in turtles:
         turtle = Turtle()
         turtle.name = t['name']
         turtle.position = t['pose']
         msg.turtles.append(turtle)
     self.turtle_pub.publish(msg)
예제 #2
0
 def publish_turtles(self, turtles):
     msg = Turtles()
     for t in turtles:
         turtle = Turtle()
         turtle.name = t['name']
         turtle.position = t['pose']
         msg.turtles.append(turtle)
     self.turtle_pub.publish(msg)
예제 #3
0
def publish_me():
    turtle = Turtle()
    turtle.name  = "me"
    turtle.position.header.frame_id = '/base_link'
    turtle.position.header.stamp = rospy.Time.now()
    turtle.position.pose.orientation.w = 1.0

    marker_array = MarkerArray()

    add_markers(marker_array, turtle)

    pub_me.publish(marker_array)