Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

servo360 - ActivityBots with similarly asymmetric zero speed deadband servos not meeting navigation goals #144

Open
3 of 5 tasks
AndyLindsay opened this issue Oct 8, 2017 · 3 comments

Comments

@AndyLindsay
Copy link
Contributor

AndyLindsay commented Oct 8, 2017

Put two servos with the same asymmetric -10 + 30 us deadband on a robot, and:

  • It still swerves at the start
  • The control system will not succeed in straightening forward motion at certain speed settings

Control system settings aggressive enough to correct this seem to cause unstable behavior, so some other approaches to correct this should be investigated:

@AndyLindsay
Copy link
Contributor Author

AndyLindsay commented Oct 8, 2017

/* 
  drive_goto variations.c

  This code demonstrates the problem in ActivityBots with servos that both have 
  the similar zero speed deadband offsets near the allowable limits. Example 
  instead of 1480 to 1520, both servos hare 1490 to 1530 us zero speed deadbands.

  The monitor (with SimpleIDE Terminal) functions have no effect unless you build 
  the libservo360 project with this un-commented:

    #define _servo360_monitor_

  For best results, use the Parallax WX ESP8266 WiFi Module - DIP for programming
  and terminal display.  
  https://www.parallax.com/product/32420d

  Make sure to re-comment it when done because it takes a signfiicant program memory.
  
*/

#include "simpletools.h"
#include "abdrive360.h"

int main()                    
{
  drive_speed(0, 0);
  pause(1000);
  servo360_monitorRun();
  pause(1000);

  drive_goto(192, 192);
  pause(1000);
  drive_goto(-28, 28);
  pause(1000);
  drive_goto(28 * 2, -28 * 2);
  pause(1000);
  drive_goto(-28, 28);
  pause(1000);
  drive_goto(-192, -192);
  pause(1000);

  drive_goto(128, 192);
  pause(1000);
  drive_goto(-128, -192);
  pause(1000);
  drive_goto(192, 128);
  pause(1000);
  drive_goto(-192, -128);
  pause(1000);
  
  servo360_monitorEnd();
}

@AndyLindsay
Copy link
Contributor Author

AndyLindsay commented Oct 8, 2017

The same sign, larger pv values on both servos between maneuvers (csop: 2) translates into one wheel being too far forward and the other being too far behind.
ActivityBot with asymetric zero speed offset servos .txt

Note that with servos that don't have the offset, the problem isn't so obvious.
ActivityBot with non-zero speed offset servos .txt

@AndyLindsay
Copy link
Contributor Author

Setting transfer function deadband limits at 2/3 motion start/stop edges results in some correction. This might change a less muted m is used in the transfer function. It currently uses 180, but the actual 250 in combo with something like 1/2 motion start/stop edges might turn out to work well. more testing is needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant