def clear_waypoints(req): driver.clear_waypoints() return []
driver.trigger_auto() return [] def clear_waypoints(req): driver.clear_waypoints() return [] def num_of_waypoints(req): driver.num_of_waypoints() return [] ##****************************************************************************** # Services for APM Commands #******************************************************************************* # Allow for commands such as Arm, Disarm, Launch, Land, etc. rospy.Service("mission", roscopter.srv.APMCommand, start_mission) rospy.Service("land", Empty, land_it) rospy.Service("adjust_throttle", Empty, adjust_throttle) rospy.Service("trigger_auto", Empty, trigger_auto) rospy.Service("clear_waypoints", Empty, clear_waypoints) rospy.Service("num_of_waypoints", Empty, num_of_waypoints) if __name__ == '__main__': try: # initially clear waypoints and start mainloop driver.clear_waypoints() # if (opts.enable_ros_failsafe): # rospy.Timer(rospy.Duration(1), ros_failsafe_check) driver.mainloop() except rospy.ROSInterruptException: pass