17 from dbw_fca_msgs.msg
import Misc2Report, MiscCmd
18 from std_msgs.msg
import Bool, Empty
23 rospy.init_node(
'vent')
37 rospy.loginfo(
'Sending vent command every ' + str(self.duration.to_sec()) +
' seconds from ' + str(self.
start) +
' to ' + str(self.
end) )
40 global enable_pub, vent_pub, misc_pub
41 enable_pub = rospy.Publisher(
'/vehicle/enable', Empty, queue_size=1)
42 misc_pub = rospy.Publisher(
'/vehicle/misc_cmd', MiscCmd, queue_size=1)
50 rospy.Timer(rospy.Duration(0.5), self.
initialize, oneshot=
True)
54 rospy.loginfo(
'Initialize: Start to enable DBW.')
68 rospy.loginfo(
'Initialize: DBW is enabled. Start timer_process')
78 rospy.signal_shutdown(
'')
82 rospy.logerr(
"No new messages on topic '/vehicle/enable'. Enable DBW first.")
86 msg.ft_drv_temp.value = 70
87 msg.ft_psg_temp.value = 67
88 msg.ft_fan_speed.value = 5
89 msg.vent_mode.value = msg.vent_mode.FLOOR
90 msg.sync.cmd = msg.sync.cmd.OFF
91 msg.hsw.cmd = msg.hsw.cmd.ON
92 msg.fl_heated_seat.cmd = msg.fl_heated_seat.cmd.HI
94 rospy.loginfo(
'hvac commands were sent.')
101 rospy.loginfo(
'DBW is enabled')
105 rospy.loginfo(
'shutdown_handler')
107 if __name__ ==
'__main__':
110 rospy.on_shutdown(node.shutdown_handler)
112 except rospy.ROSInterruptException:
def recv_dbw_enabled(self, msg)
def timer_process(self, event)
def shutdown_handler(self)
def initialize(self, event)
def recv_misc2_report(self, msg)