Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python problem: PART II
01-13-2014, 01:39 PM,
#1
Python problem: PART II
Hello all there! I'm still trying but I fail to fly my helicopter directly with Helicopter_Control.py
This is what I get:

INFO: [Brainstorms:Helicopter_Control] Using PySide module
<---- [Helicopter Remote] Main thread running
data_payload: 0000005e05ff0a4b0e17135414aa
data_payload: 0000005e05ff0a4b0e17135414aa
data_payload: 0000005e05ff0a4b0e17135414aa
data_payload: 0000005e05ff0a4b0e17135414aa
data_payload: 0000005e05ff0a4b0e17135414aa

Then i understood that these are the codes that perform this:

data_payload: 0000005e05ff0a4b0e17135414aa (neutral)

data_payload: 0000035405ff0a4b0e17135414aa (hover)

data_payload: 0000035405ff0b540e17135414aa (fly_forward)

data_payload: 0000005e05ff08aa0e17135414aa (fly_back)

Someone can help me please?

I add 2 new pictures of the oscilloscope signal at the antenna: the pc_signal and the remote_control_signal at neutral time.
Which part of the code I need to change to make the helicopter fly?

Thank you.

Alejandro


Attached Files Thumbnail(s)
           
Reply
01-15-2014, 06:55 PM,
#2
RE: Python problem: PART II
(01-13-2014, 01:39 PM)alejandrocontenti Wrote: INFO: [Brainstorms:Helicopter_Control] Using PySide module
<---- [Helicopter Remote] Main thread running
data_payload: 0000005e05ff0a4b0e17135414aa
data_payload: 0000005e05ff0a4b0e17135414aa
data_payload: 0000005e05ff0a4b0e17135414aa

Then i understood that these are the codes that perform this:

data_payload: 0000005e05ff0a4b0e17135414aa (neutral)

data_payload: 0000035405ff0a4b0e17135414aa (hover)

data_payload: 0000035405ff0b540e17135414aa (fly_forward)

data_payload: 0000005e05ff08aa0e17135414aa (fly_back)


You can see from the console messages that Helicopter_Control is outputting the "neutral" command by default.

Try calling the script with a different flight command:

python Helicopter_Control.py --command=fifty_percent_thrust --device=COM3
Reply
01-16-2014, 01:35 AM,
#3
RE: Python problem: PART II
Thank you very much for your reply!
This is what I'm trying all the time, to change the '--command=', the blue LED turns on at the helicopter, the antenna achievement synchronize with the helicopter, but I get ERROR.
An example of this you can see in the following pictures that i add.
What should I do or Which part of the code I need to change to make the helicopter fly?

Thank you very much for your help.

Alejandro


Attached Files Thumbnail(s)
       
Reply
03-13-2014, 11:02 AM,
#4
RE: Python problem: PART II
(01-16-2014, 01:35 AM)alejandrocontenti Wrote: Thank you very much for your reply!
This is what I'm trying all the time, to change the '--command=', the blue LED turns on at the helicopter, the antenna achievement synchronize with the helicopter, but I get ERROR.
An example of this you can see in the following pictures that i add.
What should I do or Which part of the code I need to change to make the helicopter fly?

Okay, so there are a couple important sections which are relevant here.

First, the list of flight control commands, which are literally the bytecodes which are transmitted to the helicopter:

http://brainstorms.puzzlebox.info/tracker/browser/trunk/Puzzlebox/Brainstorms/Helicopter_Control.py#L141


And then "processCommand" which is where we match parameters from the command line:

http://brainstorms.puzzlebox.info/tracker/browser/trunk/Puzzlebox/Brainstorms/Helicopter_Control.py#L329


Looking at your first screenshot, you're calling "hover" as the command twice. The first time it fails because your system is looking for COM6 and it doesn't appear to exist.

The second time you call it everything looks to be working correctly, however the command you are sending starts with "0000005e05"... which when I compare to the flight control commands in the source code above in SVN, doesn't appear to match up to anything. Did you enter that code yourself? If the code is not valid the helicopter might not fly.

The next thing which looks out of place is that if you are sending the "hover" command but ended up on the "default_neutral" command packet, something must have been changed elsewhere in the code. The "hover" command" shouldn't try to trigger neutral. And of course neutral usually means the helicopter isn't supposed to be flying anyway!

Finally, in the second screenshot, it looks like you're using the "hover" command to try to call the "fifty_percent_thrust" command string. But the software isn't finding that key because I can see in the screenshot you've commented it out. Compare that to the link above.


I can't tell what else has been changed in this source code because I can only see the sections in your screenshot, but I would recommend going back to the current version in SVN and trying again from there.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)