Open fselius opened 9 years ago
Our big problem is, that with rc/override the APM does not know who is actually streaming data on the channels, the companion computer or the transmitter. so in order to "take-over" the quad, we'll have to implement one of 2 suggestions (or maybe both ?? i dunno)
what do you think?
It needs to be 'stronger' than that, in the Pixhawk level. For all we know the drone might be far enough so that we don't have a network connection (Thus no SSH or any access to the computer). I suggest trying to find people who worked on similar projects and see how they tackled this issue. By the way, flying using rc_override is sometimes called 'flying with joystick'. You can plug a joystick to your ground control station computer, it reads the joystick position and sends rc_override messages accordingly.
A very (very) crude way would be to attach a switch between the computer TX to the Pixhawk RX pins, only if channel 8 (Or any channel we aren't using) on the transmitter is HIGH data can flow.
We'll go with @noamyogev84 first suggestion, the module that publish RC Override messages will check if an unused channel is switched off and only then publish messages. This needs to go in the fact sheet risk management item @roeemz .
Human Override is now implemented into the navigator class. @fselius @efiShtain
https://github.com/fselius/qtcopter/blob/0fe8d4b5c1ba65911804490475c468e5eb935be1/src/qtcopter/src/qtcopter/navigation/Navigator.py#L65L77
The method PublishRCMessage
is defined twice.
https://github.com/fselius/qtcopter/blob/0fe8d4b5c1ba65911804490475c468e5eb935be1/src/qtcopter/src/qtcopter/navigation/Navigator.py#L91
When checking if a read for the channel is recent enough, the 2
should be a JSON parameter as well.
The method is overloaded, we still not sure how it will get its parameters hence the 2 versions.
That is a very nasty way to overload methods, you can comment out the method you aren't using.
@efiShtain @fselius @serbuh @shadows89
We'll test the human override module with the real drone after Tuesday's meeting. @noamyogev84 @serbuh @efiShtain @shadows89
@noamyogev84 How did it go?
Human override test went ok, the result is that navigation module stops publishing immediately when channel 8 is modified with the transmitter. here are some conclusions:
thanks to @shadows89 @serbuh for all the help + one free Russian language tutorial.
Excellent! Does rc/in topic outputs the values from the RC transmitter regardless of the RC override messages? Can we close this issue and move on to plan a computer controlled flight?
Yes it does. when nothing is published to rc/override. I think this is done.
And if we are publishing to rc/override?
No. When we publish to rc/override it literally override any other values from the transmitter. The solution is to keep channel 8 with "no value" for each publish msg. (And maybe more channels besides 0-4)
mode change after human-override triggered guys can you please verify on our pixhawk what are the modes (regarding position hold) that are exposed? cos the simulator give me just 'ALT_HOLD' ans 'POSITION' and i'm not sure the last is what we want cos it doesn't maintains throttle. check it out:
also i understand that from version AC3.2 there is a 'POS_HOLD' mode, that maintains all channels inculding throttle : http://copter.ardupilot.com/wiki/flying-arducopter/flight-modes/poshold-mode/
so what do we have on our drone ? and what do you say about the GPS Lock stuff?
@serbuh @shadows89
Update After our last experiment, we came to a conclusion that the human override needs to be split-ed to 2 scenarios:
so now it's implemented. our switch in the RC has 3 states (low, mid, high) :
@serbuh
Thanks.
In case the companion computer goes crazy we need to be able to assume manual control using the remote controller. Find out how this can be achieved. Started a topic http://ardupilot.com/forum/viewtopic.php?f=25&t=12019 , no replies yet. This is a high priority item.
@efiShtain @serbuh @noamyogev84 @shadows89