No control over ver...
 
Notifications
Clear all

No control over vertical headmovement?

5 Posts
3 Users
0 Reactions
938 Views
chrisbuy
(@chrisbuy)
Member
Joined: 6 years ago
Posts: 71
Topic starter  

This is the strangest problem I have even seen. I wrote a simple headmove.py script to move the head left/right, up/down. See attachment...

  1. Connect to Q.bo using VNC
  2. Copy the attached file headmove.py to the /home/pi/ directory
  3. Press Ctrl+Alt+T to open a terminal
  4. Enter
    sudo pkill python
    sudo pkill chromium
  5. Enter
    sudo cp headmove /opt/qbo
    sudo -u qbo python /opt/qbo/headmove.py

Qbo will initially move it's head towards the starting position and then start turning it's head. Horizontal movement but NO vertical movement of the head?!?!?! I know too little of the Arduino board and controller but this is just strange... also the head's vertical servo sometimes is fixed in position when powered on but sometimes it isn't and you can move it up and down. The horizontal servo seems always blocked when powered on.

This topic was modified 6 years ago 2 times by chrisbuy

--
Christian Buysschaert
Leuven - Belgium
Email christian.buysschaert@gmail.com


   
Quote
Qbo Robot
(@nonogrub)
Member Admin
Joined: 8 years ago
Posts: 185
 
Posted by: chrisbuy

This is the strangest problem I have even seen. I wrote a simple headmove.py script to move the head left/right, up/down. See attachment...

  1. Connect to Q.bo using VNC
  2. Copy the attached file headmove.py to the /home/pi/ directory
  3. Press Ctrl+Alt+T to open a terminal
  4. Enter
    sudo pkill python
    sudo pkill chromium
  5. Enter
    sudo cp headmove /opt/qbo
    sudo -u qbo python /opt/qbo/headmove.py

Qbo will initially move it's head towards the starting position and then start turning it's head. Horizontal movement but NO vertical movement of the head?!?!?! I know too little of the Arduino board and controller but this is just strange... also the head's vertical servo sometimes is fixed in position when powered on but sometimes it isn't and you can move it up and down. The horizontal servo seems always blocked when powered on.

Hi Chris,

what max & min params are you using to move the two servos ( horizontal/vertical )?. If you overpassed this values the servos will not work.


   
ReplyQuote
(@greybeard81)
Eminent Member
Joined: 6 years ago
Posts: 20
 

I was able to move the head in all directions with the scratch program.


   
ReplyQuote
chrisbuy
(@chrisbuy)
Member
Joined: 6 years ago
Posts: 71
Topic starter  

Okay, let me rephrase my problem... running the headmove.py test program seems to work immediately after a power off/on cycle. I have sneaking suspicion the SetAngleRelative messes up things.

--
Christian Buysschaert
Leuven - Belgium
Email christian.buysschaert@gmail.com


   
ReplyQuote
chrisbuy
(@chrisbuy)
Member
Joined: 6 years ago
Posts: 71
Topic starter  

I can confirm the "SetAngleRelative" (SET_SERVO_ANGLE_REL)  messes up headmovement.

I've replaced upon boot the standard PiFaceFast.py with my version that doesn't use "controller.SetAngleRelative" (SET_SERVO_ANGLE_REL) and only uses "controller.SetServo" (SET_SERVO) - my version is NOT finished yet (!) but I know what commands I sent to the Arduino for headcontrol.

The result:I keep control over head movement both horizontally and vertically. Once "controller.SetAngleRelative" (SET_SERVO_ANGLE_REL) is used, I loose control for the final used servo (1 or 2) with  "controller.SetServo" (SET_SERVO).

--
Christian Buysschaert
Leuven - Belgium
Email christian.buysschaert@gmail.com


   
ReplyQuote
Share: