Go to Post Great people like you both [Scott and Libby Ritchie] make the FIRST community even better! - tiffany34990 [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 18-01-2016, 11:18
Tparbotmail Tparbotmail is offline
Registered User
FRC #3944
 
Join Date: Jan 2015
Location: Az
Posts: 69
Tparbotmail is an unknown quantity at this point
NavX mxp - can it be used without mecanum wheels

The question we have is can the Navx mxp be used with other drive classes like drive, arcade, and tank. We are not using mecanum wheels this year.

The code samples on the Navx mxp site are using
MecanumDrive_Cartesian(stick.GetX(), stick.GetY(), currentRotationRate ,ahrs->GetAngle());

It's not clear to me if it can be adapted to other classes.
Reply With Quote
  #2   Spotlight this post!  
Unread 18-01-2016, 11:24
nandeeka's Avatar
nandeeka nandeeka is offline
Registered User
FRC #1868
Team Role: Programmer
 
Join Date: May 2014
Rookie Year: 2013
Location: United States
Posts: 53
nandeeka is on a distinguished road
Re: NavX mxp - can it be used without mecanum wheels

The NavX MXP can definitely be useful in autonomous, no matter what drive train you are using. Even drives like tank and west coast drive will not go perfectly straight, and you can use it to adjust your angle as you drive.

The NavX MXP is probably less useful in teleop, where a person can correct for any inaccuracies in the robot's travel. If you wanted to implement a button that makes the robot just go straight forward/back or turn a certain amount it could be useful.
Reply With Quote
  #3   Spotlight this post!  
Unread 18-01-2016, 11:47
Tparbotmail Tparbotmail is offline
Registered User
FRC #3944
 
Join Date: Jan 2015
Location: Az
Posts: 69
Tparbotmail is an unknown quantity at this point
Re: NavX mxp - can it be used without mecanum wheels

Thank you for your reply. What classes are you using with your Navx mxp?
Reply With Quote
  #4   Spotlight this post!  
Unread 18-01-2016, 15:56
slibert slibert is offline
Software Mentor
AKA: Scott Libert
FRC #2465 (Kauaibots)
Team Role: Mentor
 
Join Date: Oct 2011
Rookie Year: 2005
Location: Kauai, Hawaii
Posts: 349
slibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud of
Re: NavX mxp - can it be used without mecanum wheels

Quote:
Originally Posted by nandeeka View Post
The NavX MXP is probably less useful in teleop, where a person can correct for any inaccuracies in the robot's travel. If you wanted to implement a button that makes the robot just go straight forward/back or turn a certain amount it could be useful.
Team 2465 has added four buttons to our driver station:

- Rotate to 0 degrees
- Rotate to -90 degrees
- Rotate to 180 degrees
- Rotate to 90 degrees

While we use a holonomic drive system (Mecanum), as long as your robot can spin, you can use during this during teleop when your robot is standing still. And you can get that to work while driving (to, say, ensure you are driving in a straight line) by working out the commands to your drive class that would cause it to turn a bit while driving in the current direction.

I'm not aware of any drop-in code for these features on a tank-drive style robot.

However, if you think it'd be helpful, I can point you to some FTC code that uses navX-Micro to control a two-wheeled tank-drive robot to "drive straight" using a PID controller - just let me know if you think that might be helpful. With some work, you might be able to port that to a FRC robot using the WPI Library.
Reply With Quote
  #5   Spotlight this post!  
Unread 18-01-2016, 17:18
Tparbotmail Tparbotmail is offline
Registered User
FRC #3944
 
Join Date: Jan 2015
Location: Az
Posts: 69
Tparbotmail is an unknown quantity at this point
Re: NavX mxp - can it be used without mecanum wheels

The question I have is can this work well with the other classes, like arcade.
Reply With Quote
  #6   Spotlight this post!  
Unread 18-01-2016, 18:49
slibert slibert is offline
Software Mentor
AKA: Scott Libert
FRC #2465 (Kauaibots)
Team Role: Mentor
 
Join Date: Oct 2011
Rookie Year: 2005
Location: Kauai, Hawaii
Posts: 349
slibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud ofslibert has much to be proud of
Re: NavX mxp - can it be used without mecanum wheels

Quote:
Originally Posted by Tparbotmail View Post
The question I have is can this work well with the other classes, like arcade.
The RobotDrive arcadeDrive(double moveValue, double rotateValue) method can be used. The rotateValue would be derived from the yaw value from the navX-MXP. Since rotateValue is in units of -1 to 1, this value should be acquired from a PID controller. The navX-MXP AHRS class implements the PIDSource interface. So you can pass the AHRS class instance into the constructor of your PIDController object. Then, whenever you want to call arcadeDrive(), you'd ask your PID controller for it's latest output value, and pass that as the rotateValue to arcadeDrive().

To rotate in place, the moveValue would be 0, the rotateValue would be the output from the PID controller.

To drive straight (or rotate while moving), the moveValue would be the speed to move ahead, and the rotateValue would be the output from the PID controller.
Reply With Quote
  #7   Spotlight this post!  
Unread 18-01-2016, 23:18
mmaunu's Avatar
mmaunu mmaunu is offline
Registered User
FRC #2485 (W.A.R. Lords)
Team Role: Mentor
 
Join Date: Mar 2013
Rookie Year: 2010
Location: San Diego, CA
Posts: 89
mmaunu is a jewel in the roughmmaunu is a jewel in the roughmmaunu is a jewel in the roughmmaunu is a jewel in the rough
Re: NavX mxp - can it be used without mecanum wheels

Quote:
Originally Posted by Tparbotmail View Post
The question I have is can this work well with the other classes, like arcade.
The feedback that you get from a quality gyro can be used in many different situations. For our 2014 bot, we used the yaw data from a Nav6 (the predecessor to the NavX) in our 2-ball autonomous routines; this was a 6WD bot that used a custom version of arcade drive (shout out to Team 254). Our bot drove straight that year, so we didn't need to use it to correct for a drive-train that listed to one side or the other. However, in 2015, we used the yaw data from the Nav6 to drive straight when we wanted to and to strafe perfectly sideways when we wanted to; this was a 5-wheel omni drive system (holonomic drive). While these goals can be achieved with any quality gyro, we like the way that the Nav6 performed, so we have decided to move on to the NavX this year and in future years. You can look at our codebase (sorry for any trouble deciphering it) to see how we used it, but the important takeaway is that the Nav6/NavX is a quality sensor that can enable your bot to determine its orientation relative to the field throughout a 2:30 match, regardless of which type of drivetrain you use. The promotional materials emphasize certain drivetrains because you can get really interesting behaviour out of a mechanum or swerve drive when you incorporate a gyro; however, it is useful in a variety of scenarios. (We also used the Nav6 to achieve field-centric control on a summer project that has a swerve drive.)

TL;DR: if you want quality yaw data, this is a great sensor that has minimal drift over the course of an FRC match. It doesn't matter what drivetrain you use; we have used it (with great results) on a 6wD, an omni drive (H-drive), and a swerve drive. The only thing that we actually haven't used it on is a mechanum drive (which might be next...but definitely after 2016).
__________________
2014 Las Vegas (Winners with 987, 2478; Excellence in Engineering)
2014 San Diego (Finalists with 987, 3250; Quality Award)
2013 Inland Empire (Winners with 1538, 968; Excellence in Engineering Award)
2013 San Diego (Finalists with 2984, 4322; Creativity Award)
2012 Las Vegas (Finalists with 2034, 3187; Quality Award)
Reply With Quote
  #8   Spotlight this post!  
Unread 19-01-2016, 01:11
Tparbotmail Tparbotmail is offline
Registered User
FRC #3944
 
Join Date: Jan 2015
Location: Az
Posts: 69
Tparbotmail is an unknown quantity at this point
Re: NavX mxp - can it be used without mecanum wheels

Thank you both for replying and sharing your advise and experience. We were actually able to jump to arcade and implement it with PID on the 2016 bot and were able to run it on the 2015 bot using mecanum Cartesian on the rotate to angle. Both robots used omnimount too. I am very impressed with Navx and hope that we have an appropriate use case. The quality of their site is impressive, and the customer service is excellent.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 22:36.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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