goodrobots / maverick-api

API backend for maverick-web
MIT License
8 stars 5 forks source link

ctrl-c / kill does not kill maverick_api #43

Open fnoop opened 5 years ago

fnoop commented 5 years ago

maverick_api.py does not respond to ctrl-c or external kill (SIGHUP) requests.

fnoop commented 5 years ago
[dev] [mav@goodrobots ~/code/fnoop.maverick-api/maverick_api]$ ./maverick_api.py
[I 181221 22:08:50 logging:34] Loaded config options
Unable to register with master node [http://localhost:11311]: master may not be running yet. Will keep trying.
^C^C^C^C^C^C

It sometimes (often?) stops on ctrl-c after startup, but if any problem during startup it doesn't.

SamuelDudley commented 5 years ago

There are a couple of things going on here. Firstly mavros blocks forever if it cant reach the master on the URI. This needs to be fixed with some sort of timeout. Secondly once running we are sending the signal to an asyncio loop and such the signal names are different from a normal synchronous program. There are signal callbacks in place but they are looking for the wrong signal type.

SamuelDudley commented 5 years ago

kill is working as expected for the program once running, still need to address the issue with rospy/mavros.

SamuelDudley commented 5 years ago

Related #64