sample_drc_mini_maxwell.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 
3 import rospy
4 from std_msgs.msg import Bool
5 from std_msgs.msg import Time
6 
7 
8 def main():
9  pub_is_disabled = rospy.Publisher(
10  '/drc_2015_environment/is_disabled', Bool, queue_size=1)
11  pub_is_blackout = rospy.Publisher(
12  '/drc_2015_environment/is_blackout', Bool, queue_size=1)
13  pub_next_whiteout_time = rospy.Publisher(
14  '/drc_2015_environment/next_whiteout_time', Time, queue_size=1)
15  pub_is_disabled.publish(False)
16  pub_is_blackout.publish(False)
17 
18  rate = rospy.Rate(1 / 4.0)
19 
20  while not rospy.is_shutdown():
21  pub_is_blackout.publish(False)
22  rospy.sleep(1.0)
23  pub_is_disabled.publish(True)
24  rospy.sleep(1.0)
25  pub_is_disabled.publish(False)
26  pub_is_blackout.publish(True)
27  pub_next_whiteout_time.publish(rospy.Time.now() + rospy.Duration(2.0))
28  rate.sleep()
29 
30 
31 if __name__ == '__main__':
32  rospy.init_node('sample_drc_mini_maxwell')
33  main()


jsk_rqt_plugins
Author(s):
autogenerated on Fri Feb 5 2021 04:03:20