Closed AndyLindsay closed 6 years ago
...Documents\SimpleIDE\My Projects\Tests ActivityBot360\Tests\ drive_goto variations.side
...Documents\SimpleIDE\My Projects\Tests ActivityBot360\Tests\
Detect and Turn from Obstacle.side Navigation comparable, though 360 seemed to miss the turn sometimes
Try This - Roaming with Ping.side Performance seems comparable. Overall, 30 cm would be a better distance than 20 for both robots.
Follow with Ping.side Performing very nicely!!!
...Documents\SimpleIDE\My Projects\Tests ActivityBot360\Tests\
Whiskers Push Bot.side Comparable
Roaming with Whiskers.side ActivityBot makes a nice smart 90 degree turn with 3/4" before chassis contact on the average. Even after setting ABD_RAMP_STEP to 24, it still comes to within 1/4" and only does a 45 degree turn.
I think I'd prefer to adjust both examples to cruising speeds of 64 instead of 100 in the tutorials, and also change the turn-in-place times too.
This seems preferable for both ActivityBot and ActivityBot360. The ActivityBot still makes a larger turn, but both exhibit reasonable and tunable responses to obstacles..
/*
Roaming with Whiskers.c
Go forward until object detected by whisker(s). Then, back up, turn
and go a new direction.
http://learn.parallax.com/activitybot/roaming-whiskers
*/
#include "simpletools.h" // Include simpletools library
#include "abdrive360.h" // Include abdrive360 library
//#include "abdrive.h" // Include abdrive library
int main() // main function
{
freqout(4, 2000, 3000); // Speaker tone: 2 s, 3 kHz
while(1) // Main loop
{
// Go forward for 1/50th of a second.
drive_speed(64, 64); // Go forward
// Check whisker states.
int wL = input(7); // Left whisker -> wL variable
int wR = input(8); // Right whisker -> wR variable
// If whisker(s) pressed, avoid obstacle.
if(wR == 0) // Just right whisker
{
drive_speed(-64, -64); // Back up 0.5 seconds
pause(1000);
drive_speed(-64, 64); // Turn left 0.22 seconds
pause(500);
}
else if(wL == 0) // Just left whisker
{
drive_speed(-64, -64); // Back up 0.5 seconds
pause(1000);
drive_speed(64, -64); // Turn right 0.25 seconds
pause(500);
}
}
}
...Documents\SimpleIDE\My Projects\Tests ActivityBot360\Tests\
Navigate by Light.side Comparable
...Documents\SimpleIDE\My Projects\Tests ActivityBot360\Tests\
IR Roaming.side Comparable
Commit: ActivityBot Tests Round 2 #140
Remove dev clutter from My Projects.
Add 3 pulses of latency distance to servo360_goto's v^2 / 2a calculation that decides when the goal is close enough to decelerate. It'll help account for difference between when signal is sent and when motor actually starts to respond.
Reduce angular control system constants to eliminate oscillation when ActivityBot360 rests after drive_goto passes control from speed to position.
Also, make changes discussed above to Roaming with Whiskers in .../Examples/Robots/ActivityBot360
Commit: ActivityBot Tests Round 2 #140 Re-comment #define _servo360monitor (It's always supposed to be commented!)
Limit pulses to 1260...1740 us.
Remove clutter from library main files.
Commit: ActivityBot Tests Round 2 #140 Angular control system adjustments
Subfolders added to .../Examples/Robots/ActivityBot360 and .../Examples/Devices/Motor/Servo360
...Documents\SimpleIDE\My Projects\Tests ActivityBot360\ActivityBot360\
...Documents\SimpleIDE\My Projects\Tests ActivityBot360\Tests