Go to Post Wait, that's exactly how it's supposed to work, isn't it. Well played GDC, well played. - alopex_rex [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 22-01-2015, 10:59
nfusselman1 nfusselman1 is offline
Registered User
FRC #4076
 
Join Date: Jan 2015
Location: Justin TX
Posts: 26
nfusselman1 is an unknown quantity at this point
Robot Accelerometer

Hello I am trying to make a code that will take the roboRIO's built in accelerometer and a Gyroscope so we can know how far the robot has traveled and the direction it is facing. The code will need to be integrated into the autonomous code to make the robot stop after a certain distance has been traveled and the angle it is facing.
Reply With Quote
  #2   Spotlight this post!  
Unread 22-01-2015, 11:15
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,043
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Robot Accelerometer

Quote:
Originally Posted by nfusselman1 View Post
Hello I am trying to make a code that will take the roboRIO's built in accelerometer and a Gyroscope so we can know how far the robot has traveled and the direction it is facing. The code will need to be integrated into the autonomous code to make the robot stop after a certain distance has been traveled and the angle it is facing.
Using an accelerometer to measure distance will require integrating a noisy signal twice.

It would be better to put encoder(s) on the wheel(s).


Reply With Quote
  #3   Spotlight this post!  
Unread 22-01-2015, 11:26
gpetilli gpetilli is offline
Registered User
FRC #1559
 
Join Date: Jan 2009
Location: Victor, NY
Posts: 285
gpetilli is a name known to allgpetilli is a name known to allgpetilli is a name known to allgpetilli is a name known to allgpetilli is a name known to allgpetilli is a name known to all
Re: Robot Accelerometer

The September specs for the roboRIO showed that it included an accelerometer but I don't believe it included a gyro. They may have snuck it in when I was not looking, but one reason the gyro may not work is that you need to physically add one.

Keep in mind that a gyro measures the rotation about the point where the sensor is located, so putting a gyro inside the roboRIO may be overly restrictive in that you would want to locate it at the center of rotation of the robot. A remote gyro makes more sense to me.
Reply With Quote
  #4   Spotlight this post!  
Unread 22-01-2015, 12:07
Fauge7 Fauge7 is offline
Head programmer
FRC #3019 (firebird robotics)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Scottsdale
Posts: 195
Fauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to allFauge7 is a name known to all
Re: Robot Accelerometer

Integrating the accelerometer twice does not work very well your better off using the encoders on andymark because they are really simple to use! If you need help calibrating them and finding the distance per pulse let me know! I got my teams calibrated so they were off 1 inch per 6 feet!
Reply With Quote
  #5   Spotlight this post!  
Unread 24-01-2015, 23:56
Pockets Pockets is offline
Registered User
FRC #2177
Team Role: Alumni
 
Join Date: Oct 2013
Rookie Year: 2012
Location: Minnesota
Posts: 10
Pockets is just really nicePockets is just really nicePockets is just really nicePockets is just really nicePockets is just really nice
Re: Robot Accelerometer

My team is experimenting with this idea. We're using mecanums.

Because the mecanums might slip some as they drive, and because the rate of slip may be variable, encoders on the wheels may not be very accurate. We're going to try adding small, non-driven wheels in the center of the robot, perpendicular to each other. Each one will be on a pneumatic powered arm and be connected to an encoder so we can measure how far the robot has traveled in the x and y directions.
Reply With Quote
  #6   Spotlight this post!  
Unread 25-01-2015, 00:15
GeeTwo's Avatar
GeeTwo GeeTwo is offline
Technical Director
AKA: Gus Michel II
FRC #3946 (Tiger Robotics)
Team Role: Mentor
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Slidell, LA
Posts: 3,574
GeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond repute
Re: Robot Accelerometer

Quote:
Originally Posted by Pockets View Post
My team is experimenting with this idea. We're using mecanums.

Because the mecanums might slip some as they drive, and because the rate of slip may be variable, encoders on the wheels may not be very accurate. We're going to try adding small, non-driven wheels in the center of the robot, perpendicular to each other. Each one will be on a pneumatic powered arm and be connected to an encoder so we can measure how far the robot has traveled in the x and y directions.
Because mecanums only slip along one axis, but not the other (at least not usually), it would be possible to use encoders to keep track of a mecanum drive, but I wouldn't want to tackle it as one of many projects during build season. Your idea is rather like putting a roller-ball style mouse under the robot.
Reply With Quote
  #7   Spotlight this post!  
Unread 25-01-2015, 14:58
dash121 dash121 is offline
Registered User
FRC #4085
 
Join Date: Oct 2014
Location: Reynoldsburg Ohio
Posts: 23
dash121 is an unknown quantity at this point
Re: Robot Accelerometer

Well since no one has actually answered the question just speculated around the question I guess its up to me. That was one of the /very/ first things I did with the new roboRIO even before tank drive (being a 2nd year First'er and a 1 year VEX'er). After finding the javadocs it was very easy. I found the java docs here. And for the built in accelerometer I found it here. I have yet to find any kind of built in acceleromoter in the new roboRIO but MESSAGE ME IF YOU FIND ONE!!! Oh and you probably want smartdashboard stuff too!! I forgot!! The stuff hasn't changed since last year in regards to the smartdashboard but the new javadocs are here the rest you might want to find in screensteps from the 2014 cRIO.

Last edited by dash121 : 25-01-2015 at 15:01. Reason: Forgot smartdashboard stuff
Reply With Quote
  #8   Spotlight this post!  
Unread 25-01-2015, 15:55
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,043
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Robot Accelerometer

Quote:
Originally Posted by Pockets View Post
We're going to try adding small, non-driven wheels in the center of the robot, perpendicular to each other.
How many wheels?


Reply With Quote
  #9   Spotlight this post!  
Unread 26-01-2015, 00:57
GeeTwo's Avatar
GeeTwo GeeTwo is offline
Technical Director
AKA: Gus Michel II
FRC #3946 (Tiger Robotics)
Team Role: Mentor
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Slidell, LA
Posts: 3,574
GeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond repute
Re: Robot Accelerometer

Quote:
Originally Posted by Pockets
We're going to try adding small, non-driven wheels in the center of the robot, perpendicular to each other.
Quote:
Originally Posted by Ether View Post
How many wheels?
Presumably two, as they're perpendicular to each other, and the robot doesn't seem like it's going to climb the walls or travel unusually through time.
Reply With Quote
  #10   Spotlight this post!  
Unread 26-01-2015, 01:53
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,043
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Robot Accelerometer


I'd rather not speculate. Let's let Pockets answer the question directed to him.



Last edited by Ether : 26-01-2015 at 02:07.
Reply With Quote
  #11   Spotlight this post!  
Unread 26-01-2015, 02:15
GeeTwo's Avatar
GeeTwo GeeTwo is offline
Technical Director
AKA: Gus Michel II
FRC #3946 (Tiger Robotics)
Team Role: Mentor
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Slidell, LA
Posts: 3,574
GeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond repute
Re: Robot Accelerometer

Quote:
Originally Posted by Ether View Post

I'd rather not speculate. Let's let Pockets answer the question directed to him.
I believe he did, in the original post. It's implicit, but the x and y directions definitely imply two wheels:

Quote:
We're going to try adding small, non-driven wheels in the center of the robot, perpendicular to each other. Each one will be on a pneumatic powered arm and be connected to an encoder so we can measure how far the robot has traveled in the x and y directions.
Reply With Quote
  #12   Spotlight this post!  
Unread 26-01-2015, 02:19
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,043
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Robot Accelerometer


I have a reason for asking the question. Can we please let Pockets answer it?


Reply With Quote
  #13   Spotlight this post!  
Unread 26-01-2015, 02:43
GeeTwo's Avatar
GeeTwo GeeTwo is offline
Technical Director
AKA: Gus Michel II
FRC #3946 (Tiger Robotics)
Team Role: Mentor
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Slidell, LA
Posts: 3,574
GeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond repute
Re: Robot Accelerometer

Quote:
Originally Posted by Ether View Post

I have a reason for asking the question. Can we please let Pockets answer it?
Fair enough. If it's anything other than two, I'll buy you lunch. If you're in CONUS, I'll drive to wherever it is you are to do so sometime this summer. All of CD is my witness on this.
Reply With Quote
  #14   Spotlight this post!  
Unread 26-01-2015, 19:40
Pockets Pockets is offline
Registered User
FRC #2177
Team Role: Alumni
 
Join Date: Oct 2013
Rookie Year: 2012
Location: Minnesota
Posts: 10
Pockets is just really nicePockets is just really nicePockets is just really nicePockets is just really nicePockets is just really nice
Yes, I meant two wheels. Sorry for the confusion.
Reply With Quote
  #15   Spotlight this post!  
Unread 26-01-2015, 19:58
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,043
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Robot Accelerometer

Quote:
Originally Posted by Pockets View Post
Yes, I meant two wheels. Sorry for the confusion.
Thank you. Can you give some more detail (see below)?

Quote:
Originally Posted by Pockets View Post
We're going to try adding small, non-driven wheels in the center of the robot, perpendicular to each other. Each one will be on a pneumatic powered arm and be connected to an encoder so we can measure how far the robot has traveled in the x and y directions..
would you please show the calculations you plan to do with the two encoder signals to achieve that objective?



Last edited by Ether : 26-01-2015 at 20:03.
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 11:18.

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