Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check if ROS services and nodes are available when perform any flying commands #21

Closed
goldarte opened this issue Mar 29, 2019 · 9 comments
Assignees
Labels
bug Something isn't working client Client side enhancement New feature or request

Comments

@goldarte
Copy link
Collaborator

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

@goldarte goldarte added the bug Something isn't working label Mar 29, 2019
@artem30801
Copy link
Collaborator

TODO in flight task manager

@artem30801 artem30801 self-assigned this Mar 29, 2019
@artem30801
Copy link
Collaborator

Should work, probably needs testing

@goldarte goldarte reopened this Sep 19, 2019
@goldarte
Copy link
Collaborator Author

Needs to be fully tested

@goldarte
Copy link
Collaborator Author

goldarte commented Nov 2, 2019

Fixed here b17607e, but I still get exceptions from animation lib, when perform flying functions.

@goldarte
Copy link
Collaborator Author

goldarte commented Dec 5, 2019

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.

@goldarte
Copy link
Collaborator Author

goldarte commented Dec 6, 2019

I think we need to add task "preflight check" to client's task manager before each flight.

@artem30801 artem30801 added client Client side enhancement New feature or request labels Dec 8, 2019
@goldarte goldarte changed the title Check if ROS services are available when perform any flying commands Check if ROS services and nodes are available when perform any flying commands Dec 26, 2019
@goldarte
Copy link
Collaborator Author

Also, we need to check the nodes, which are used at current time for positioning:

  • aruco: aruco_map, aruco_detect
  • optical_flow: optical_flow
    and so on.

@goldarte
Copy link
Collaborator Author

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.

@goldarte
Copy link
Collaborator Author

goldarte commented Jul 5, 2020

This functionality is added to failsafe module

@goldarte goldarte closed this as completed Jul 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working client Client side enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants