示例#1
0
def talker():
    pub = rospy.Publisher('burlap_state', burlap_state, queue_size=10)
    rospy.init_node('talker', anonymous=True)
    rate = rospy.Rate(10) # 10hz
    while not rospy.is_shutdown():
	s = burlap_state()
	s.objects = []
	
	pub.publish(s)
        rate.sleep()
示例#2
0
def talker():
    pub = rospy.Publisher('burlap_state', burlap_state, queue_size=10)
    rospy.init_node('talker', anonymous=True)
    rate = rospy.Rate(10)  # 10hz
    while not rospy.is_shutdown():
        s = burlap_state()
        s.objects = []

        pub.publish(s)
        rate.sleep()
示例#3
0
    def publishState(self):
	if not self.verifyStateReady():
		return
	obArray = [self.agent]
	obArray += self.blocks

	s = burlap_state()
	s.objects = obArray

	self.pub.publish(s)
示例#4
0
    def publishState(self):
        if not self.verifyStateReady():
            return
        obArray = [self.agent]
        obArray += self.blocks

        s = burlap_state()
        s.objects = obArray

        self.pub.publish(s)
示例#5
0
def talker():
    pub = rospy.Publisher('burlap_state', burlap_state, queue_size=10)
    rospy.init_node('talker', anonymous=True)
    rate = rospy.Rate(10)  # 10hz
    while not rospy.is_shutdown():
        xv = burlap_value()
        xv.attribute = 'x'
        xv.value = '3'

        yv = burlap_value()
        yv.attribute = 'y'
        yv.value = '5'

        agent = burlap_object()
        agent.name = 'turtlebot'
        agent.object_class = 'agent'
        agent.values = [xv, yv]

        s = burlap_state()
        s.objects = [agent]

        pub.publish(s)
        rate.sleep()
示例#6
0
def talker():
    pub = rospy.Publisher("burlap_state", burlap_state, queue_size=10)
    rospy.init_node("talker", anonymous=True)
    rate = rospy.Rate(10)  # 10hz
    while not rospy.is_shutdown():
        xv = burlap_value()
        xv.attribute = "x"
        xv.value = "3"

        yv = burlap_value()
        yv.attribute = "y"
        yv.value = "5"

        agent = burlap_object()
        agent.name = "turtlebot"
        agent.object_class = "agent"
        agent.values = [xv, yv]

        s = burlap_state()
        s.objects = [agent]

        pub.publish(s)
        rate.sleep()
 def publishState(self):
     if self.agent != None:
         s = burlap_state()
         s.objects = [self.agent]
         self.pub.publish(s)
 def publishState(self):
     if self.agent != None:
         s = burlap_state()
         s.objects = [self.agent]
         self.pub.publish(s)