Closed goldarte closed 4 years ago
TODO in flight task manager
Should work, probably needs testing
Needs to be fully tested
Fixed here https://github.com/CopterExpress/clever-show/commit/b17607e4c31402d75bd9e29ece767da0427d2858, but I still get exceptions from animation lib, when perform flying functions.
Add lock to get_telemetry function, now there are no service exceptions. But for now, we don't check the copter state from the client's side, only lock some actions in the server GUI. We need to think about checking the copter state on each client independently before flying.
I think we need to add task "preflight check" to client's task manager before each flight.
Also, we need to check the nodes, which are used at current time for positioning:
So we need the way to get the type(s) of positioning and check corresponding nodes. These nodes can crash, but /get_telemetry will output working-like result, so we need to know if our positioning nodes were crashed.
This functionality is added to failsafe module
When ROS services are not available (when restart clever.service for example), the client emits this exception:
Starting takeoff! Traceback (most recent call last): File "client.py", line 297, in
play_animation.takeoff(safe_takeoff=SAFE_TAKEOFF)
File "/home/pi/CleverSwarm/Drone/play_animation.py", line 18, in takeoff
FlightLib.takeoff(z=z, wait=True, emergency_land=False)
File "/home/pi/CleverSwarm/Drone/FlightLib/FlightLib.py", line 243, in takeoff
set_rates(thrust=0.1, auto_arm=True)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rospy/impl/tcpros_service.py", line 435, in call
return self.call(*args, **kwds)
File "/opt/ros/kinetic/lib/python2.7/dist-packages/rospy/impl/tcpros_service.py", line 505, in call
raise ServiceException("unable to connect to service: %s"%e)
rospy.service.ServiceException: unable to connect to service: [Errno 111] Connection refused
Segmentation fault