Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   FIRST Tech Challenge (http://www.chiefdelphi.com/forums/forumdisplay.php?f=146)
-   -   [FTC]: Drive Platform- Design Exercise (http://www.chiefdelphi.com/forums/showthread.php?t=137636)

Gdeaver 22-11-2015 10:34

Re: [FTC]: Drive Platform- Design Exercise
 
We used the NavXMXP For many things on our 2015 FRC robot. This was done before the software and firm ware upgrade. Have been very satisfied with it. It may be a little simpler with the Adafruit Bosch IMU board which also has proven to be good. I think for 2016 we will stay with the naxmxp.

DavisDad 22-11-2015 10:57

Re: [FTC]: Drive Platform- Design Exercise
 
Quote:

Originally Posted by Gdeaver (Post 1507132)
We used the NavXMXP For many things on our 2015 FRC robot. This was done before the software and firm ware upgrade. Have been very satisfied with it. It may be a little simpler with the Adafruit Bosch IMU board which also has proven to be good. I think for 2016 we will stay with the naxmxp.

Thanks Gdeaver- do you have any advice for me, a complete novice in Android Studio, where to start with:
  • Installation and use of FTC SDK with navX "Software libraries"
  • Any special considerations for programming in Android Studio vs. use of the navX
  • Good tutorials or discussions re IMU use for FTC or FRC

I got Android Studio working with FTC SDK early in the season. I got the ZTEs driving a single motor with the game controller; so I think I have the programming environment set up correctly. I was just blindly following Tom Eng's tutorial. I'm not sure my son (the programmer in the family) will have a lot of time for this. I need to "beg, borrow or steal" enough programming to test navigation and anti-slip functionality.

Any help much appreciated!

DavisDad 22-11-2015 16:19

Re: [FTC]: Drive Platform- Design Exercise
 
We translated the App Inventor teleOp program into an Android Studio (AS) version. My son helped me a bit, although I had to hear what an idiot I am with programming. :)

I followed the tutorials by Swerve Robotics for updating the AS SDK files and programming an Op mode. The prototype is now running as before with AS code.

Thanks Swerve Robotics!!

Now to work on a "dead reckoning" autonomous version, with run-to-position encoder control, and see how repeatable "dumb" navigation is.

OllieK 22-11-2015 18:38

Re: [FTC]: Drive Platform- Design Exercise
 
Craig,

I am in process of creating a tutorial/blog to compare a built-in fusion, such as in Adafruit bno055, with a lower cost simple gyro where the integration/fusion is done in OpMode library.

You can find an example how to create your own I2C device drivers in this blog. This example is for the bno055 IMU..

The source code can be found in Github.

Cheers, Ollie

PS. I have been a long term fan of your mechanical designs and CAD files.

DavisDad 23-11-2015 05:58

Re: [FTC]: Drive Platform- Design Exercise
 
Hi Ollie,

Thank you for the links, and kind words. I'll look forward to reading your comparison. It'll be interesting to know how much the fancy "sensor fusion" devices help with FTC navigation.

Best,

Craig

slibert 24-11-2015 11:54

Re: [FTC]: Drive Platform- Design Exercise
 
Quote:

Originally Posted by DavisDad (Post 1507138)
do you have any advice for me, a complete novice in Android Studio, where to start with:
  • Installation and use of FTC SDK with navX "Software libraries"
  • Any special considerations for programming in Android Studio vs. use of the navX
  • Good tutorials or discussions re IMU use for FTC or FRC

Start with these instructions for installing the NavX-Micro FTC libraries into Android Studio. Then review the sample code like rotate to angle. After you install the latest build, all the samples are installed to subdirectories underneath <home_directory>\navx-micro\java\examples (e.g., C:\Users\Robot\navx-micro\java\examples).

There are many helpful items to help your team use and learn more about on the website, start with the links above, and you can ask questions at the support forum.

DavisDad 24-11-2015 20:00

Re: [FTC]: Drive Platform- Design Exercise
 
Hi Scott,

Thank you for the instructions. Using the "Getting Started" guide, I have successfully installed the libraries and configured the "rotate to angle" opMode to compile without error. I'm really looking forward to getting the robot navigating with the navX over Thanksgiving weekend.

Thanks again,

Craig

slibert 24-11-2015 20:03

Re: [FTC]: Drive Platform- Design Exercise
 
Quote:

Originally Posted by DavisDad (Post 1507138)
I need to "beg, borrow or steal" enough programming to test navigation and anti-slip functionality.

Any help much appreciated!

Regarding anti-slip, I'd recommend you look into using encoders on each motor shaft and having the motor controller maintain whatever speed (in revolutions per minute) it is commanded to based on input from the encoders. Not only will that provide predictable behavior even as the battery charge level changes, but it's also the general principle behind traction control in cars. We use this technique very effectively on FRC robots, it should work ok for FTC robots too.

DavisDad 26-11-2015 12:09

Re: [FTC]: Drive Platform- Design Exercise
 
Quote:

Originally Posted by slibert (Post 1507711)
Regarding anti-slip, I'd recommend you look into using encoders on each motor shaft and having the motor controller maintain whatever speed (in revolutions per minute) it is commanded to based on input from the encoders. Not only will that provide predictable behavior even as the battery charge level changes, but it's also the general principle behind traction control in cars. We use this technique very effectively on FRC robots, it should work ok for FTC robots too.

Yes- that's how we're controlling and it's so much better than power control! But... the wheels will still slip at the set speed (RPM). I'm thinking we'll need to determine slip by sensing motion with IMU and stop the wheels from rotating (and/or slow way down) if the bot stops moving when wheels are commanded to rotate.

DavisDad 26-11-2015 12:16

Re: [FTC]: Drive Platform- Design Exercise
 
Quote:

Originally Posted by slibert (Post 1507610)
Start with these instructions for installing the NavX-Micro FTC libraries into Android Studio. Then review the sample code like rotate to angle....

We got the "rotate to angel" example working this morning. The first time we started the opMode, it work great; would very repeatably rotate to the same angle and return when pushed by hand. I mounted the IMU more solidly and now it's erratic. I need to understand better how the unit works vs. the code, calibration and magnetic interference from the motors.

slibert 26-11-2015 16:46

Re: [FTC]: Drive Platform- Design Exercise
 
Quote:

Originally Posted by DavisDad (Post 1507957)
We got the "rotate to angel" example working this morning. The first time we started the opMode, it work great; would very repeatably rotate to the same angle and return when pushed by hand. I mounted the IMU more solidly and now it's erratic. I need to understand better how the unit works vs. the code, calibration and magnetic interference from the motors.

My intuition is that the mounting may not be the issue, most likely the "P" coefficient needs to be tuned a bit. A lower battery voltage than last time, or a change in robot weight could account for the change in performance. Do make sure the sensor has completed calibration before using it. For rotate to angle which uses the yaw angle, the magnetometer is not involved, so magnetic interference shouldn't be an issue.

ArtemusMaximus 26-11-2015 18:52

Re: [FTC]: Drive Platform- Design Exercise
 
I wish we'd have opportunity to play with that 9-DOF sensor. Sound like a way to go for Autonomous mode. May be next year.
It would be nice to have color and gyro sensor in KOP.

DavisDad 26-11-2015 22:17

Re: [FTC]: Drive Platform- Design Exercise
 
Quote:

Originally Posted by slibert (Post 1508022)
My intuition is that the mounting may not be the issue, most likely the "P" coefficient needs to be tuned a bit. A lower battery voltage than last time, or a change in robot weight could account for the change in performance. Do make sure the sensor has completed calibration before using it. For rotate to angle which uses the yaw angle, the magnetometer is not involved, so magnetic interference shouldn't be an issue.

Thanks slibert- I think I wasn't waiting for the calibration to complete. I've been trying various PI gains and max speed combinations. I looks like "I" gain, set at 0.0001, winds up and overshoots quite a bit.

I ended up increasing "P" = 0.01, setting the min/max speed at +/- 0.5 and the "Tolerance Deg" = 1. This performed nicely.

Next is run_to_position coding for straight travel segments.

DavisDad 02-01-2016 12:40

Re: [FTC]: Drive Platform- Design Exercise
 
No progress on this as we had to cannibalize the motors from the Big Wheel bot for our team bot. MRI has been out of the Matrix motors for a while...


All times are GMT -5. The time now is 17:58.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi