PBP projects for R/C models


Closed Thread
Results 1 to 40 of 772

Hybrid View

  1. #1
    Join Date
    Nov 2009
    Location
    Fitchburg, Mass
    Posts
    483


    Did you find this post helpful? Yes | No

    Default The break through was in fact a break -er it was broke!

    I put the car up on blocks and found that when going forward it only turned left in my patented incremental way. It also flashed the SONARs at about 1/2 the usual rate.

    The Vcc wire for the right side SONAR had become disconnected.

    Soooo with the front SONAR working and the right SONAR always saying zero distance to the wall, the car turns left in little bits except when it approaches a wall head on. Then it brakes and swerves left.

    That's exactly what my video shows.

    Given that information, what if anything should I fix?

    Ken

  2. #2
    Join Date
    Nov 2003
    Location
    Wellton, U.S.A.
    Posts
    5,924


    Did you find this post helpful? Yes | No

    Default

    Well now you know exactly where the problem is. Connect the side scan and start tweaking that part of the code.
    Dave
    Always wear safety glasses while programming.

  3. #3
    Join Date
    Nov 2009
    Location
    Fitchburg, Mass
    Posts
    483


    Did you find this post helpful? Yes | No

    Smile It is beginning to dawn.....

    The issue is controlling the steering. It is bang-bang but I can modify the length of time and the frequency of each 'bang'. The plastic wheels slide easily. This is true of turning as well as forward or reverse drive.

    I hope not to introduce an adjustment POT. It appears that the plastic mechanical parts are not consistent. Kicking the steering wheels back from full reach seems not to be symmetric. Hmmmm.

    Ken

  4. #4
    Join Date
    Nov 2009
    Location
    Fitchburg, Mass
    Posts
    483


    Did you find this post helpful? Yes | No

    Red face I've been too simplistic

    The car turns left when the right SONAR says it is further away from the wall than "desiredtrack". The car then moves a bit more as it rotates (turning right) its distance to the wall increases as a function of its rotation.

    So it decides to keep turning right. Wrong!!

    I need to think more about this.

    Ken

  5. #5
    Join Date
    Nov 2009
    Location
    Fitchburg, Mass
    Posts
    483


    Did you find this post helpful? Yes | No

    Red face Wrong

    I typo'd. The car turns left when the right hand SONAR says it is too close to the wall - ie less than "desiredtrack". It then crosses the imaginary "desiredtrack" line which is parallel to the wall.

    Now it starts to turn right - as it should. As the right turn aims the front of the car more at the wall, the right SONAR finds that same wall farther away. It exceeds the "desiredtrack" distance and therefore keeps turning right.

    CRASH

  6. #6
    Join Date
    Feb 2006
    Location
    Gilroy, CA
    Posts
    1,530


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Kenjones1935 View Post

    Now it starts to turn right - as it should. As the right turn aims the front of the car more at the wall, the right SONAR finds that same wall farther away. It exceeds the "desiredtrack" distance and therefore keeps turning right.

    CRASH
    Sounds like you need to limit your angle as you turn into the wall.

    When adjusting right to get to your imaginary line (closer to the wall), if front distance < 3 * side distance, then turn left (until front distance > 3 * side distance). Something like this should help keep from making too big of a right turn, but still get you closer to the wall.

    Changing the 3 would change the angle you would allow.
    http://www.scalerobotics.com

  7. #7
    Join Date
    Nov 2003
    Location
    Greece
    Posts
    4,132


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by scalerobotics View Post
    Sounds like you need to limit your angle as you turn into the wall.

    When adjusting right to get to your imaginary line (closer to the wall), if front distance < 3 * side distance, then turn left (until front distance > 3 * side distance). Something like this should help keep from making too big of a right turn, but still get you closer to the wall.

    Changing the 3 would change the angle you would allow.
    I am pretty sure this method will lead to oscillations. In fact in the Ken's video this really happens. The car "oscillates" around its desired path.

    With simple if-then commands this cannot be compensated. As discussed in previous post, a PID loop control can help.

    Ioannis

Similar Threads

  1. PBP Book
    By Bruce in forum Off Topic
    Replies: 83
    Last Post: - 4th October 2021, 12:55
  2. PBP Extensions, What are they?
    By PJALM in forum PBP Extensions
    Replies: 9
    Last Post: - 28th September 2021, 11:26
  3. Compiler differences between PBP 2.33 & 2.46
    By nikopolis in forum mel PIC BASIC Pro
    Replies: 3
    Last Post: - 2nd May 2006, 19:01
  4. Newby- PBP wont compile for 18F (MPLAB)
    By jd76duke in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 17th December 2005, 23:30
  5. Making PBP code more modular
    By forgie in forum General
    Replies: 30
    Last Post: - 25th October 2005, 16:24

Members who have read this thread : 0

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts