View Single Post
  #30   Spotlight this post!  
Unread 13-08-2014, 12:10
tr6scott's Avatar
tr6scott tr6scott is online now
Um, I smell Motor!
AKA: Scott McBride
FRC #2137 (TORC)
Team Role: Mentor
 
Join Date: Dec 2007
Rookie Year: 2005
Location: Oxford, MI
Posts: 510
tr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond repute
Re: paper: LabVIEW Mecanum Programming

We purchased a Mecanum kit as an off-season project and played with the code last night. I believe there are some errors in the code, that I thought I would post here in case others also did not get the results expected.

First, let me thank you for taking the time to develop this, it was a huge asset with trying to get students to get the code working.

Now to the issues.

On page 14, I believe the feedback node needs to be outside of the case structure for "Straight"... What we saw is that the only way you can get into the "Straight" structure is for the rotate_mode to be equal to "Straight" and therefore the feedback node can only be equal to "Straight" and since they never not equal each other, you never update the "Header" value.

When you add the PID on page 15, the PID now will unwind whatever rotation you do, because the Header is not updated, and stuck at the default, which we set to 0. So spin the bot 3 times CCW, and the let go of the sticks, the PID runs the 3 times CW and stops.

The simple fix for this is to move the feedback node out, and the header updates correctly.

On slide 17, when you add the case structure to make sure the rotate momentum is less than 10, this also breaks Header updating. As written the Header can only update the first loop after you took your finger off the sticks, so if you are spinning faster than the 10, the Header will not update, and if spinning slower than 10, you really didn't need this case anyways....

I have not fixed this one yet. It seems we almost need another enumeration state.. Say the joysticks put you in a "WaitingForStraight" and the case structure for WaitingForStriaght would check that rate less than 10 while sending 0 to the rotation, once the rate is less than ten we would write Straight to the "Rotate_Mode"

I'll post back in a couple weeks on this fix, and debugging of page 21.
__________________
The sooner we get behind schedule, the more time we have to catch up.

Reply With Quote