def publish_loop():
    msg_status = mes_mobile_status()
    msg_status.version_id = 1
    msg_status.robot_id = 1
    msg_status.state = msg_status.STATE_FREE
    msg_status.done_pct = 0
    msg_status.battery = 0
    msg_status.position = 'Station1'
    msg_status.status = 'Hi'

    pub = rospy.Publisher('/mes/mes_status_topic', mes_mobile_status)
    rospy.init_node('mobiledummy', anonymous=True)
    while not rospy.is_shutdown():
        pub.publish(msg_status)
        response = raw_input('Input something')
        print response
Ejemplo n.º 2
0
def publish_loop():
    rospy.init_node('mobiledummy', anonymous=True)
    msg_status = mes_mobile_status()
    msg_status.header.stamp = rospy.Time.now()
    msg_status.version_id = 1
    msg_status.state = msg_status.STATE_FREE
    msg_status.done_pct = 0
    msg_status.battery = 0
    msg_status.position = 'Station1'
    msg_status.status = 'Hi'

    pub = rospy.Publisher('/mes/status', mes_mobile_status)
    while not rospy.is_shutdown():
        pub.publish(msg_status)
        response = raw_input('Input something')
        print response
 def initMsg(self):
     self.ros_msg_command = mes_mobile_command()
     self.ros_msg_status = mes_mobile_status()
 def initMsg(self):
     self.msg_command = mes_mobile_command()
     self.msg_status = mes_mobile_status()