sample_drc_mini_maxwell.py
Go to the documentation of this file.
00001 #!/usr/bin/env python
00002 
00003 import rospy
00004 from std_msgs.msg import Bool
00005 from std_msgs.msg import Time
00006 
00007 
00008 def main():
00009     pub_is_disabled = rospy.Publisher(
00010         '/drc_2015_environment/is_disabled', Bool, queue_size=1)
00011     pub_is_blackout = rospy.Publisher(
00012         '/drc_2015_environment/is_blackout', Bool, queue_size=1)
00013     pub_next_whiteout_time = rospy.Publisher(
00014         '/drc_2015_environment/next_whiteout_time', Time, queue_size=1)
00015     pub_is_disabled.publish(False)
00016     pub_is_blackout.publish(False)
00017 
00018     rate = rospy.Rate(1 / 4.0)
00019 
00020     while not rospy.is_shutdown():
00021         pub_is_blackout.publish(False)
00022         rospy.sleep(1.0)
00023         pub_is_disabled.publish(True)
00024         rospy.sleep(1.0)
00025         pub_is_disabled.publish(False)
00026         pub_is_blackout.publish(True)
00027         pub_next_whiteout_time.publish(rospy.Time.now() + rospy.Duration(2.0))
00028         rate.sleep()
00029 
00030 
00031 if __name__ == '__main__':
00032     rospy.init_node('sample_drc_mini_maxwell')
00033     main()


jsk_rqt_plugins
Author(s):
autogenerated on Wed May 1 2019 02:40:16