1) testing simple movement with Motors(x,y) shows that I need to have left motor running at about 1.06 of right motor speed to maintain relative straight line.
2) I modified line 751 [in RingoHardware tab] to read " Motors(1.06*Speed,Speed);"
3) when I try the simple example in the guide (page 51), Ringo will move in complete circle in reverse and a large arc in forward.
4) I reduced "wiggle" to 0, with little impact.
any thoughts?
"MoveWithOptions" test
-
- Posts: 180
- Joined: Tue Jul 28, 2015 12:56 am [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
Re: "MoveWithOptions" test
There may be something happening with a data type conversion. Arduino is kind of strange about that. I wonder if your 1.06 is causing something unexpected to happen together with the value you pass for "left motor"?
You shouldn't need to edit anything inside MoveWithOptions - this function reads the gyro during the movement and automatically adjusts motor speed to maintain the desired heading. When you call Motors(x,y) directly there is no gyro involved.
If you go back to the original MoveWithOptions, then in your loop() on the main tab, try this:
MoveWithOptions(0, 200, 200, 3000, 1000, 0,0); // this should produce pretty straight movement
Make sure you're calling NavigationBegin(); at the start, and you can also call CalibrateNavigationSensors() to zero any drift the sensor is seeing. (make sure you're dead still when calling this - any vibration at all will give strange results - even a fan running or music playing on your desk can cause this).
If you're still having problems, zip up the entire folder of the sketch you're using and post it back.
-Kevin
You shouldn't need to edit anything inside MoveWithOptions - this function reads the gyro during the movement and automatically adjusts motor speed to maintain the desired heading. When you call Motors(x,y) directly there is no gyro involved.
If you go back to the original MoveWithOptions, then in your loop() on the main tab, try this:
MoveWithOptions(0, 200, 200, 3000, 1000, 0,0); // this should produce pretty straight movement
Make sure you're calling NavigationBegin(); at the start, and you can also call CalibrateNavigationSensors() to zero any drift the sensor is seeing. (make sure you're dead still when calling this - any vibration at all will give strange results - even a fan running or music playing on your desk can cause this).
If you're still having problems, zip up the entire folder of the sketch you're using and post it back.
-Kevin
-
- Posts: 23
- Joined: Wed Aug 26, 2015 6:21 pm [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
Re: "MoveWithOptions" test
I tried your suggestion and i do not get straight motion, Ringo goes in an arc.
2) in guide, I tried the code on page 51, to go forward, then backup. This does not work either.
3) I then tried to modify it as suggested to use GetHeading() in place of "0" in the function call for the heading, this will not compile giving a not declared error for GetHeading. [I cannot locate the function GetHeading in any of the tabs.]
I've zipped the folder as you suggested.
My goal was to do some simple, controlled motions i.e. forward, reverse left and right turns so that I can let my grandson do some "turtle" lilke commands to move Ringo through a maze....but I'm not there yet!
Appreciate any insight as to what I may be doing wrong.
Bruce
2) in guide, I tried the code on page 51, to go forward, then backup. This does not work either.
3) I then tried to modify it as suggested to use GetHeading() in place of "0" in the function call for the heading, this will not compile giving a not declared error for GetHeading. [I cannot locate the function GetHeading in any of the tabs.]
I've zipped the folder as you suggested.
My goal was to do some simple, controlled motions i.e. forward, reverse left and right turns so that I can let my grandson do some "turtle" lilke commands to move Ringo through a maze....but I'm not there yet!
Appreciate any insight as to what I may be doing wrong.
Bruce
- Attachments
-
- Ringo_Motor_testing_CBW copy.zip
- (35.95 KiB) Downloaded 912 times
-
- Posts: 180
- Joined: Tue Jul 28, 2015 12:56 am [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
Re: "MoveWithOptions" test
Doh!!
It's "PresentHeading()" not "GetHeading()". Very sorry and embarrassed. When I put the guide together it was a marathon run putting that much material together quickly and I didn't actually test what I was writing. Note that PresentHeading() and GetDegrees() does exactly the same thing.
Sorry for the frustration.
-Kevin
It's "PresentHeading()" not "GetHeading()". Very sorry and embarrassed. When I put the guide together it was a marathon run putting that much material together quickly and I didn't actually test what I was writing. Note that PresentHeading() and GetDegrees() does exactly the same thing.
Sorry for the frustration.
-Kevin
-
- Posts: 23
- Joined: Wed Aug 26, 2015 6:21 pm [phpBB Debug] PHP Warning: in file [ROOT]/vendor/twig/twig/lib/Twig/Extension/Core.php on line 1266: count(): Parameter must be an array or an object that implements Countable
Re: "MoveWithOptions" test
No worries! I am sure you will be inundated with questions like this at initial roll out.
Who is online
Users browsing this forum: No registered users and 1 guest