|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
|||
|
|||
|
Holonomic drive angle?
What direction will the robot travel if the holonomic vi is fed 0 for degrees and some number for mag and 0 for rotation. I am assuming straight ahead, but don't have the robot in front of me to try it out.
I am tring to understand how the vi works. It looks like the joystick x and y when converted to degrees produces 90 degrees when pushed straight up, so I am questioning my assumption. Thanks in advance! |
|
#2
|
|||
|
|||
|
Re: Holonomic drive angle?
In our testing, 0 degree input to the holo VI is straight forward.
|
|
#3
|
|||
|
|||
|
Re: Holonomic drive angle?
Quote:
|
|
#4
|
|||
|
|||
|
Re: Holonomic drive angle?
Here how, got the code from another post.
|
|
#5
|
|||||
|
|||||
|
Re: Holonomic drive angle?
You may want to display the output that that code provides.
Our testing indicated that when you connect joystick outputs into the "obvious" inputs of the rectangular to polar conversion, it produces a zero angle when the joystick was moved to the right (logical for a normal math chart) and of course, forward and backwards was reversed because of the stupid forward = -ve orientation of the joysticks. So I suggest normalizing you joystic outputs to generate +/-1 with propper cartesian (rectangular) orientation first... It's too bad that the holomonic function doesn't adopt a more mathematically correct (standard) input... eg orientation and units. |
|
#6
|
|||
|
|||
|
Re: Holonomic drive angle?
Quote:
-Joe |
|
#7
|
|||||
|
|||||
|
Re: Holonomic drive angle?
Quote:
One of these days, the software community will rebel, and overthrow that -Y convention that probably came about because some EE wired the joystick in reverse on the first ever analog joystick. I can hear the conference room meeting now: SE: Darn..... the Y axis is reversed.... EE: It will cost to much money to fix the circuit. SE: I guess we can fix it in software. EE: Sure, no-one will ever know...... |
|
#8
|
|||
|
|||
|
Re: Holonomic drive angle?
Quote:
This is all just speculation (i.e. I don't have any sources to quote), but it seems to make sense. |
|
#9
|
|||||
|
|||||
|
Re: Holonomic drive angle?
Quote:
![]() Imagine the arguments I had when writing code for an underwater robot: Vertical convention... Positive control value = increased depth.... or increased altitude? |
|
#10
|
|||||
|
|||||
|
Re: Holonomic drive angle?
Quote:
I know the reversal is needed, but if we intend to use the same VI in Auto, having to use negative numbers to go forwards is real annoying (eg when target tracking). I can't tell you how annoying it was writing the code last year to track the target, and having to continually reverse the sign of the forward motion to get the robot to "approach" the target. Flipping the sign is easy, but debugging the control loop was no fun. I still say ground based robot joysticks MUST output +ve numbers when pushed forward. There would be SOOOOOO much less confusion if the Get Joystick just flipped the Y axis, and ALL the controls that currently accept JS inputs were corrected to match. Then they'd work the same in auto and teleop. I'll give you another example. Our robot has it's 4 drive wheels on pivots, so they can be configured to be in-line (90 deg) or at 45 Deg. So at the press of a button, the robot can flip from Skid steer to Holomonic. The trouble is, it turns out that the "default" + direction for the Arcade Drive, and the Holomonic drives are flipped... mainly because the Arcade VI assumes -ve input is forward, and the holomonic assumes 0 Deg is forward (eg: holomonic is logical, Joystick is convenient.) So if the wheel "Invert" bits are set correctly for Arcade drive (as in the sample template), they are incorrect for holomonic. This caused me no end of trouble during debugging. In the end I just had to invert the joystick values going to the Arcade drive. Now stick forward works for both arcade and holomonic. The alternative was to make JoyStick back action request a 0 degree vector for holomonic..... No Thanks. Phil. |
|
#11
|
|||
|
|||
|
Re: Holonomic drive angle?
Quote:
Quote:
Quote:
We considered flipping the Y axis in the Joystick API, but we ran into a showstopper problem with that approach... with game pads and any random joystick, we don't have any way to know what axes are "Y" axes and which are not. I think it would be worse to have a game par where one stick is positive forward and the other is negative forward. Because we couldn't know that it would compensate for all axes that needed it, we left it out. Just think of it as yet another problem to overcome and a tool to teach the kids about the real world of software engineering... "fixing it in software". ![]() -Joe |
|
#12
|
|||||
|
|||||
|
Re: Holonomic drive angle?
Quote:
Having consitant conventions is essential for being able to do sensor fusion and hybrid controls. When it comes to mixing automated functions with Joystick input, you shouldn't have to be constantly inverting and uninverting. I've worked through many of the NI Drive internals, and I'm constantly confused as to when the negative Y is and isn't included in the calculations. If nothing else, the Context help should document that a specific joystick input is assumed to be inverted. The fact that the Drive Arcade and Drive Holomonic need different motor inversion flags just makes my case for the general confusion. Quote:
Here's my read... and then I'll get off my soapbox. I've been doing this (remotely operated vehicles) for 20 years BUT I still have a heck of a time explaining the inner working of these VI's to my budding programmers. It's not that the concept is hard (I love geometry and vector math), it's just that there aren't any consistent conventions. I get half way through the math, and realize that an input was assumed to be negative forward. My recommendation to the NI FIRST programmers. Please decide: Is "forward" positive, or negative? Pick one and STICK WITH IT. eg: In your NI Robotics module, Positive drive on motors run Forward. If a senor or actuator need to be pulled into conformance... do it in that device's VI's. Preferably during the "Open". It's not a matter of convenience, it's a matter of good embedded programming. Loud thump as I step down ![]() Sorry for being a pain... it's just one of my pet programming peves ![]() |
|
#13
|
|||
|
|||
|
Re: Holonomic drive angle?
Quote:
Quote:
In the future we can try to flip everything around and solve the issues that creates, but for now, is consistency not the best option? -Joe |
|
#14
|
|||||
|
|||||
|
Re: Holonomic drive angle?
Quote:
Point taken.... If you only look at the Fore/Aft Joystick values for the external signals going into FRC Drive VI's then yes.... it's consistent. But that's a small subset of NI Robotics. If you look at the bigger picture of "What is the positive Y axis for the robot" , or at the smaller picture of "how to set the inversion flag for the wheels", or maybe "what does +Y means to the inverse kinematics of a manipulator", there isn't a convention in FRC, and there could be... If I've got you even considering flipping everything around in the future, then I've done my job ![]() Phil. |
|
#15
|
||||
|
||||
|
Re: Holonomic drive angle?
We are currently running into problems with our directional angle as well. I've attached a photo of the angles we are getting in regards to the joystick position.
I feel like the problem is somewhere after we convert from radians to degrees.... |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Holonomic Drive Example? | I am error | NI LabVIEW | 9 | 12-02-2010 15:32 |
| Holonomic Drive Help | star_lancer | NI LabVIEW | 2 | 01-02-2010 22:39 |
| Switching to Holonomic Drive | MachineSMMC | NI LabVIEW | 1 | 22-01-2010 13:07 |
| Holonomic Drive Question | Jeff Waegelin | Technical Discussion | 12 | 20-11-2005 21:23 |
| Holonomic Drive Mathmatics Discussion | robotaddict | Programming | 35 | 15-10-2005 13:29 |