Go to Post The GDC is the Grinch because they just stole my Christmas! - scottmacdonald [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 17-11-2015, 21:06
Poseidon5817's Avatar
Poseidon5817 Poseidon5817 is offline
Founder and CEO, DeadMemes Studios
AKA: Mitchel Stokes
FRC #5817 (Uni-Rex)
Team Role: Mentor
 
Join Date: Aug 2013
Rookie Year: 2014
Location: Clovis, CA
Posts: 379
Poseidon5817 has much to be proud ofPoseidon5817 has much to be proud ofPoseidon5817 has much to be proud ofPoseidon5817 has much to be proud ofPoseidon5817 has much to be proud ofPoseidon5817 has much to be proud ofPoseidon5817 has much to be proud ofPoseidon5817 has much to be proud ofPoseidon5817 has much to be proud ofPoseidon5817 has much to be proud of
Using navX MXP to get robot velocity

From this thread:

Quote:
Originally Posted by Arhowk
I'd also like to know... In my experience most mouse only maintain about 95% accuracy (meaning that the same motion repeated an infinite number of times will have a 5% deviance in delta distance). At the start of the season I expected to integrate the accelerometer to obtain velocity, but it's noise is horrendous. If the mouse gets good data, than it might be a good option.
I'm assuming that Arhowk tried this with the roboRIO's built-in accelerometer. Has anyone tried something similar with accelerometer data from the navX MXP expansion board? If integrating that data can give a reasonably accurate velocity, I could see this being another solution for simple autonomous motion profiling, rather than using encoders on the drive.
__________________
My FRC History:

2014 - Team 1671: Central Valley Regional Finalist and Chairman's Award Winner, Sacramento Regional Finalist, Archimedes Quarterfinalist
2015 - Team 1671: Central Valley Regional Semifinalist, Sacramento Regional Semifinalist and Chairman's Award Winner, Newton Winner, Einstein Winner
2016 - Team 5817: Central Valley Regional Finalist and Rookie All-Star, Orange County Regional Quarterfinalist and Rookie All-Star, Newton Division
2017 - Team 5817: Return of the bench grinder


  #2   Spotlight this post!  
Unread 17-11-2015, 23:19
Skyehawk's Avatar
Skyehawk Skyehawk is offline
Nuts N' Bolts
AKA: Skye Leake
FRC #0876 (Thunder Robotics)
Team Role: Mentor
 
Join Date: Nov 2012
Rookie Year: 2011
Location: Northwood, ND
Posts: 216
Skyehawk is a name known to allSkyehawk is a name known to allSkyehawk is a name known to allSkyehawk is a name known to allSkyehawk is a name known to allSkyehawk is a name known to all
Re: Using navX MXP to get robot velocity

Now that you bring it up I am really excited to give it a go before the season starts. Too bad I am a college student and don't have access to the hardware for this endeavor.

The way I see it though the noise of the accelerator will result in an error of many magnitudes greater than the error in robot velocity from drive train encoders.

While we are on the subject of sensors to obtain robot velocity, has anyone tried multi point sonar (or other range finder) velocity? Not that it would be in any way practical, but just a thought.

I don't mean to hijack this tread in any way, sorry if I do.
__________________
My time in FIRST has made me a better person, frankly I don't know where I'd be without it.



2011 Lake Superior Regional Champs
2015 Central Illinois Regional Engineering Inspiration Award recipients
2016 Central Illinois Regional Champs
  #3   Spotlight this post!  
Unread 18-11-2015, 00:34
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: 347
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: Using navX MXP to get robot velocity

Quote:
Originally Posted by Poseidon1671 View Post
From this thread:



I'm assuming that Arhowk tried this with the roboRIO's built-in accelerometer. Has anyone tried something similar with accelerometer data from the navX MXP expansion board? If integrating that data can give a reasonably accurate velocity, I could see this being another solution for simple autonomous motion profiling, rather than using encoders on the drive.
There are a number of reasons why using the onboard RoboRIO accelerometers for this is a non-starter, including that rotation needs to be taken into account, and that accelerometers measure acceleration due to gravity in addition to acceleration due to linear motion, and the gravity component needs to be removed accurately to access the linear acceleration data.

The navX-MXP can track the rotation and remove the gravity component since it fuses the gyroscope data w/the accelerometer data. The navX-MXP v. 2.0 firmware has been modified to calculate velocity and displacement onboard in real-time. However....

After analyzing the resulting displacement data, my determination is that it's accurate to about 1 meter over a 15 second autonomous period, which is not accurate enough for the types of things we are doing. There are a few reasons for this level of accuracy. The primary reason is that the levels of noise present in the current generation of MEMS accelerometers, such as those in the navX-MXP, is high enough that when it is double-integrated (cubed) there's a large error that's introduced. And this is what leads to the inaccuracy. Lots of work went into filtering the data, and also disabling integration when no motion is detection, but the results still aren't near what we need for use in Autonomous.

Based upon this investigation, my current estimation is we need to see noise levels that are about 1/100th (2 orders of magnitude) lower than current technology to get to an error of about a centimeter or so during the autonomous period. When technology reaches that point, we'll build a board that makes this features available for use in FIRST FRC and FTC robots. But until that time, it's a waiting game.

STMicro is making good strides towards lower-noise MEMS accelerometers (25 ug/square-root-hertz is their best noise spec); these accelerometers are more expensive, and they're still not to the level we'll need them to be (~2 ug/square-root-hertz). Looking into my crystal ball, I think we're roughly 5 years away from something that becomes viable.

If you do want to play around with what the navX-MXP calculates, there's a new "Experimental" button in the navXUI that, along w/the new v. 2.0 firmware, will display integrated velocity and displacement in the x and y axes. It's marked "experimental" for a reason...
  #4   Spotlight this post!  
Unread 18-11-2015, 07:57
Gdeaver Gdeaver is offline
Registered User
FRC #1640
Team Role: Mentor
 
Join Date: Mar 2004
Rookie Year: 2001
Location: West Chester, Pa.
Posts: 1,363
Gdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond reputeGdeaver has a reputation beyond repute
Re: Using navX MXP to get robot velocity

Initially, I thought the Bosch integrated IMU was better than the Navmxp for this. However there is a difference between on the kitchen table and on a robot. On a really robot the error is about the same as Silbert noted. We also looked at several gaming mice back in 2013. The problem with mice is the carpet. If we played on a smooth flooring they could be a solution. They loose there accuracy at higher velocities. If some one wanted to put the effort into it using a camera several inches off the carpet and proper illumination coupled Advanced optic flow algorithms may work for FRC bots.
For our team, machine vision solutions have been beyond our reach with the resources we have. We are a swerve team. To navigate 3 tote auto this year we used encoders on all 4 wheels, a navxmxp, and a sonar sensor referencing the distance to the player station wall. Fusing these inputs, we are able to perform the several motions needed to accomplish the 3 tote auto reliably. Maybe some day auto navigation will be plug and play but for now it's hard. I commend the teams that did 3 tote auto this year.
  #5   Spotlight this post!  
Unread 18-11-2015, 11:54
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: 347
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: Using navX MXP to get robot velocity

Quote:
Originally Posted by Gdeaver View Post
Advanced optic flow algorithms may work for FRC bots.
Interesting to note - Kauailabs is working on a prototype of this - PX4Flow optical flow sensor plus navX-based sensor plus LEDs plus proximity sensor - and sensor fusion. Illumination and optical focus are tricky issues, esp at higher speeds (higher frame rates), and an autofocus mechanism may be required to make it easy to configure. As you say, it's not trivial, and our goal is to determine its accuracy, repeatability, and if it can be manufactured as a plug n play product at a reasonable cost. If enough progress is made we hope to present some preliminary results next year. Fusing optical flow and imu with wheel encoders as a fallback if optical flow SNR is too low may be the way to go.
  #6   Spotlight this post!  
Unread 18-11-2015, 14:15
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Using navX MXP to get robot velocity

We tested using optical tracking of robot position a decade ago, using an optical mouse with the equivalent of a telephoto lens. When the distance from the sensor to the carpet is perfectly consistent, the results are great. But any variation in height changes the field of view, and that changes the relationship between motion of the image and physical motion of the robot. We couldn't eliminate vibration and bounce from the system, and eventually abandoned the project as unworkable on a real-world FRC robot. (It might have been worth trying for Lunacy, with the super-smooth floor and very low accelerations, but the trailer still caused some variations in tilt that would have to be compensated for somehow.)

If the carpet had a pattern on it that could be detected and measured, keeping the horizontal distances calibrated, I think it would be a good idea to revisit the concept.
  #7   Spotlight this post!  
Unread 18-11-2015, 15:02
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: 347
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: Using navX MXP to get robot velocity

Quote:
Originally Posted by Alan Anderson View Post
We tested using optical tracking of robot position a decade ago, using an optical mouse with the equivalent of a telephoto lens. When the distance from the sensor to the carpet is perfectly consistent, the results are great. But any variation in height changes the field of view, and that changes the relationship between motion of the image and physical motion of the robot. We couldn't eliminate vibration and bounce from the system, and eventually abandoned the project as unworkable on a real-world FRC robot. (It might have been worth trying for Lunacy, with the super-smooth floor and very low accelerations, but the trailer still caused some variations in tilt that would have to be compensated for somehow.)

If the carpet had a pattern on it that could be detected and measured, keeping the horizontal distances calibrated, I think it would be a good idea to revisit the concept.
Great input, our initial tests a few years ago showed an accurate, fast ranging sensor is part of the solution, so the current prototype has a fast IR ranging sensor.

The vibration part would seem to be managed by a very high framerate in the sensor, our previous experiments worked w/the ADNS3080 optical mouse sensor which had a 6400hz framerate if I recall correctly. What framerate were you using, and what was the general frequency of the vibration?

The resolution of the ADNS3080 was very low, which is why our hope is the much higher resolution of the PX4FLOW sensor will allow it to seem more structure in the carpet than the ADNS3080. Getting enough CPU and illumination to use the higher res at a high framerate is the challenging part currently encountered.
  #8   Spotlight this post!  
Unread 18-11-2015, 17:14
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Using navX MXP to get robot velocity

Quote:
Originally Posted by slibert View Post
The vibration part would seem to be managed by a very high framerate in the sensor, our previous experiments worked w/the ADNS3080 optical mouse sensor which had a 6400hz framerate if I recall correctly. What framerate were you using, and what was the general frequency of the vibration?
Frame rate wouldn't seem to be relevant. Our test system could track the carpet at more than 20 feet per second from about 2.5 cm, and at least 30 feet per second at 4-5 cm. The problem wasn't related to the speed of horizontal tracking, it was because the vertical distance between sensor and carpet was varying. Moving the sensor upward or downward by less than a millimeter, corresponding to about 2-4 percent of the separation, would throw off the distance measurements by about 5-10 percent. We thought about trying to mount the mouse much higher to make the error a lower percentage, but we didn't have the lenses available to get the focus to work.

The vibration on our test rig was induced by a 2004-vintage Thomas air compressor (we used a pneumatic linear actuator to move a strip of carpet a known distance), at I'd guess a few dozen Hertz. When we tried to use the sensors on an actual robot, the roughness of the wheels and the compliance of the carpet induced enough bounce and other vertical "noise" to make the readings nearly useless.
  #9   Spotlight this post!  
Unread 18-11-2015, 18:32
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: 347
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: Using navX MXP to get robot velocity

Quote:
Originally Posted by Alan Anderson View Post
Frame rate wouldn't seem to be relevant. Our test system could track the carpet at more than 20 feet per second from about 2.5 cm, and at least 30 feet per second at 4-5 cm. The problem wasn't related to the speed of horizontal tracking, it was because the vertical distance between sensor and carpet was varying. Moving the sensor upward or downward by less than a millimeter, corresponding to about 2-4 percent of the separation, would throw off the distance measurements by about 5-10 percent. We thought about trying to mount the mouse much higher to make the error a lower percentage, but we didn't have the lenses available to get the focus to work.

The vibration on our test rig was induced by a 2004-vintage Thomas air compressor (we used a pneumatic linear actuator to move a strip of carpet a known distance), at I'd guess a few dozen Hertz. When we tried to use the sensors on an actual robot, the roughness of the wheels and the compliance of the carpet induced enough bounce and other vertical "noise" to make the readings nearly useless.
Got it, thanks, hadn't been taking small-scale vertical variation into account. Moving the lens farther from the floor should help as you say, which also might impact the illumination requirements a bit, but also requires greater depth of field (and wider FOV and higher resolution sensing) to handle faster motion and detect sufficient structure in carpet. It's a fascinating problem...

If we back up to the OP's question about velocity for motion profiling (rather than calculating displacement), do you think your test rig showed promise for velocity vector estimation that would rival or exceed encoders?
  #10   Spotlight this post!  
Unread 18-11-2015, 23:02
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Using navX MXP to get robot velocity

Quote:
Originally Posted by slibert View Post
If we back up to the OP's question about velocity for motion profiling (rather than calculating displacement), do you think your test rig showed promise for velocity vector estimation that would rival or exceed encoders?
Errors in measuring position translate directly to errors in deriving velocity.

When we gave up on the "telephoto mouse" project, we went to a trio of encoders (something like a US Digital S1, 64 counts per revolution) mounted to custom-fabricated follower wheels that were built something like the old "trick wheel" omnis. On carpet, they worked very well (though we soon discovered a hardware limitation in the IFI controllers' interrupt support, which we overcame with a simple TTL "quadrature hysteresis" circuit between the encoder and the digital input pins).
Closed Thread


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 06:14.

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