def __init__(self): self.logger = core_controller.logger() self.antenna = telescope_controller.antenna() self.load = controller_1p85m2019.load() self.obsstatus = rospy.Publisher('/otf/status', String, queue_size=1) self.target = rospy.Publisher('/otf/target', String, queue_size=1) self.otfparam_on = rospy.Publisher('/otf/param/on', Float64MultiArray, queue_size=1) self.otfparam_scan = rospy.Publisher('/otf/param/scan', Float64MultiArray, queue_size=1) self.otfparam_off = rospy.Publisher('/otf/param/off', Float64MultiArray, queue_size=1) self.otfparam_hot = rospy.Publisher('/otf/param/hot', Float64MultiArray, queue_size=1) self.otfparam_direc = rospy.Publisher('/otf/param/direction', String, queue_size=1)
import std_msgs planet = "moon" scan_direction = 1 #1or-1 _lx = 3 #deg _ly = 3 #deg scan_t = 120 num = 3 name = "moon_scan_loop" rospy.init_node(name) logger = core_controller.logger() antenna = telescope_controller.antenna() load = controller_1p85m2019.load() status = rospy.Publisher('/' + name + '/scan_status', std_msgs.msg.String, queue_size=1) direction = rospy.Publisher('/' + name + '/scan_direction', std_msgs.msg.Float64, queue_size=1) date = datetime.datetime.today().strftime('%Y%m%d_%H%M%S') file_name = name + '/' + date + '.necstdb' lx = _lx * scan_direction ly = _ly * scan_direction print(file_name) time.sleep(1)