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)
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)