Go to Post Isn't that the name of the game... Roomba Rumble? - Mr. Van [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #16   Spotlight this post!  
Unread 24-10-2010, 21:09
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,908
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: How to code Macanum ddrive

For a first test to make sure everything works the way you expect, I'd suggest using just one of the Attach 3 joysticks and using the simple code as-is.
Assuming you get the LabVIEW update installed.

That just means rotate will be controlled by the throttle on the Attack 3, so make sure that's centered when you start.

Once you're sure the mechanics all work properly and the PWM wiring goes to all the correct motors, then start improving the controls.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #17   Spotlight this post!  
Unread 24-10-2010, 21:24
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,126
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: How to code Macanum ddrive

Quote:
Originally Posted by RoboMaster View Post
"Tank-based holo drive" (what Ether was describing): robot is driven normally like a tank: two joysticks control the left and right wheels of the robot.
Correct. You use the Y axis of each joystick for tank drive.

Quote:
But, when the driver presses a button, the robot switches to strafing only
That's not what I was describing. When you hold a button down, it enables the X axis of, say, the right joystick. The X-axis controls strafing. But the Y axes are not disabled. The Y axes of the 2 joysticks continue to operate as tank drive in this mode, controlling the fwd/rev and rotate degrees of freedom. So the driver, if skilled enough, can control all three degrees of freedom simultaneously.

The button is not required. You could leave the X-axis (strafe command) enabled all the time. Field experience has shown, however, that it is useful to disable the X-axis unless it is needed. This way, the driver doesn't unintentionally command strafe when he doesn't want it.


Quote:
This might be a little trickier and would require a combination of the holo drive VI and the tank drive VI (switching between the two based on if the button was pressed).
All it requires is the cartesian mecanum vi. No switching is required. Calculate (Y1+Y2)/2 and feed it to the cartesian mecanum vi "Y" input (fwd/rev). Calculate (Y1-Y2)/2 and feed it to the "rotation" input. Feed X to the X input (strafe). This will provide tank drive with the left and right joystick Y axes; and when X is not zero you will get strafing too.

Quote:
However, this is nice and easy to drive because you normally just drive with the tank drive technique, which is intuitive. The strafing is like an added bonus.
Exactly.

Quote:
(Note: you could use arcade drive instead of tank drive, which would require only one joystick. The point is that you're switching between that and holo drive to enable strafing).
You could use 2 joysticks for arcade+strafe with the cartesian mecanum vi: Y1 for fwd/rev, X1 for rotate, and X2 for strafe.






Last edited by Ether : 24-10-2010 at 21:51.
Reply With Quote
  #18   Spotlight this post!  
Unread 24-10-2010, 21:50
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,126
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: How to code Macanum ddrive

Quote:
Originally Posted by Mark McLeod View Post
For a first test to make sure everything works the way you expect, I'd suggest using just one of the Attach 3 joysticks and using the simple code as-is.
Wise advice.

Something I've found to be helpful too: Put the robot up on blocks and observe the wheels:
  • When you command straight forward, all four wheels should spin forward.
  • When you command straight backward, all four wheels should spin backward.
  • When you command pure CW rotation, the front and rear port side wheels should spin forward and the front and rear starboard wheels should spin backward.
  • When you command pure CCW rotation, the front and rear port side wheels should spin backward and the front and rear starboard wheels should spin forward.
  • When you command pure strafe left, the front port and rear starboard wheels should spin backward, and the front starboard and rear port wheels should spin forward.
  • When you command pure strafe right, the front port and rear starboard wheels should spin forward, and the front starboard and rear port wheels should spin backward.

Pay careful attention to how you have the mecanum wheels mounted too: Right way Wrong way



Last edited by Ether : 24-10-2010 at 22:16.
Reply With Quote
  #19   Spotlight this post!  
Unread 24-10-2010, 22:08
RoboMaster's Avatar
RoboMaster RoboMaster is offline
Alum, former programmer&co-captain
FRC #2472 (The Centurions)
Team Role: Mentor
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Minnesota, Twin Cities
Posts: 268
RoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant future
Re: How to code Macanum ddrive

Good points, Ether, thanks.

Yes, I suppose I should have said it was my version of your describe drive, but I was just being general and as simple as (I thought) possible. But you explained your control ideas very well in your (second to) last post, thank you. I new you could probably drive a robot tank style with the holo drive VI, but it would require complex converting of two joystick axis into the X and Y holo drive terminals. Thanks for your explanation of how to do it easily!
__________________
My engineering blog: noeticbrainwaves.blogspot.com

I'm not slacking, my code's compiling
...and I'm using LabVIEW
Reply With Quote
  #20   Spotlight this post!  
Unread 15-12-2010, 19:19
whcirobotics's Avatar
whcirobotics whcirobotics is offline
Registered User
FRC #1514 (Vikings)
 
Join Date: Nov 2008
Rookie Year: 2009
Location: WHCI
Posts: 174
whcirobotics is an unknown quantity at this point
Re: How to code Macanum ddrive

I have finished coding it and i have attached a picture. Is it accurate? i just want to make sure so i dont disappoint the construction crew that worked so hard to make me a test frame with attached macanum wheels.
Attached Files
File Type: doc macanum code.doc (86.0 KB, 47 views)
Reply With Quote
  #21   Spotlight this post!  
Unread 15-12-2010, 20:22
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,126
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: How to code Macanum ddrive

Quote:
Originally Posted by whcirobotics View Post
I have finished coding it and i have attached a picture. Is it accurate?
What user interface are you trying to implement?

I don't recognize Tank, Arcade, or Halo in the code you made.

Did you mean to set the holo vi for polar? If so, doesn't look like direction input is scaled correctly.

Did you mean to use the throttle for rotation? Seems awkward. Driver needs three hands.




Last edited by Ether : 15-12-2010 at 20:25.
Reply With Quote
  #22   Spotlight this post!  
Unread 15-12-2010, 22:16
whcirobotics's Avatar
whcirobotics whcirobotics is offline
Registered User
FRC #1514 (Vikings)
 
Join Date: Nov 2008
Rookie Year: 2009
Location: WHCI
Posts: 174
whcirobotics is an unknown quantity at this point
Re: How to code Macanum ddrive

O.o I meant to have it on "cartestian" not polar. slight error woops! I wanted it to be like 1 joystick controls the up and down motion of robot, and the other joystick the starfing part, thats why i attached the y axis to one joystick(up down) and the starfing and x to other joystick. Isnt that what my code is doing? :S

And plus * mark posted this picture earlier in this post > http://www.chiefdelphi.com/forums/at...9&d=1287950414 > in which he has 3 wires that can go into the holonomicdrive(cartestian) but i only have 2 terminals :S i did the update , how come he has an extra bit? i only have x, y, rotation and robotdevref and gyro angle ? i connected the x and y but where does the throttle go?

Last edited by whcirobotics : 15-12-2010 at 22:58.
Reply With Quote
  #23   Spotlight this post!  
Unread 16-12-2010, 00:36
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,126
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: How to code Macanum ddrive

Quote:
Originally Posted by whcirobotics View Post
I wanted it to be like 1 joystick controls the up and down motion of robot, and the other joystick the starfing part, thats why i attached the y axis to one joystick(up down) and the starfing and x to other joystick.
You've got Y2 controlling fwd/rev, X1 controlling strafe, and throttle controlling rotation. This sounds like an extremely awkward driver interface to me. Driver needs 3 hands.

Why not use a more standard driver interface like one of the following:

1) Tank Drive plus strafe. See posts 9 and 17 in this thread. Takes advantage of driver's familiarity with tank drive.

2) Halo plus rotate. Y1 controls fwd/rev, X1 controls strafe, X2 controls rotation. Takes advantage of driver's skill at playing Halo-style videogames.

3) Arcade plus strafe. See post 17 in this thread.


You can use the throttle to adjust joystick sensitivity (gain) so different drivers can adjust it to their liking.



Last edited by Ether : 16-12-2010 at 00:43.
Reply With Quote
  #24   Spotlight this post!  
Unread 16-12-2010, 07:35
whcirobotics's Avatar
whcirobotics whcirobotics is offline
Registered User
FRC #1514 (Vikings)
 
Join Date: Nov 2008
Rookie Year: 2009
Location: WHCI
Posts: 174
whcirobotics is an unknown quantity at this point
Re: How to code Macanum ddrive

I did the Halo + rotate and attached the up/down to y1, starfing to x1, and rotation to x2. But where does the axis three throttle go? In the picture which mark posted he had it going to one of the terminals in the cartestiandrive, but in the picture i attached, i only have x, and y, and rotation :S am i missing something? an update perhaps? I have attached the code, is it accurate now?
Attached Files
File Type: doc macanum code.doc (85.0 KB, 42 views)
Reply With Quote
  #25   Spotlight this post!  
Unread 16-12-2010, 08:29
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,126
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: How to code Macanum ddrive

Quote:
Originally Posted by whcirobotics View Post
I did the Halo + rotate and attached the up/down to y1, starfing to x1, and rotation to x2. But where does the axis three throttle go? In the picture which mark posted he had it going to one of the terminals in the cartestiandrive, but in the picture i attached, i only have x, and y, and rotation :S am i missing something? an update perhaps? I have attached the code, is it accurate now?
I'm not a LabVIEW programmer so I can't tell you if it's accurate, but I'm pretty sure it's not correct: If you want your robot to go up and down and starfe, you're going to have to write your own vi for that. The built-in LabVIEW vi supports only fwd/rev, strafe, and rotate. :-)

But seriously, as for the throttle, where you "attach" it depends on what you want it to do. What do you want it to do? You need to re-read Mark's post to understand that he attached the throttle to the rotation input "For a first test to make sure everything works the way you expect" with one Attack3 joystick. If you now have two joysticks (or a joystick with a twist axis), you don't need to do that.




Last edited by Ether : 16-12-2010 at 09:22.
Reply With Quote
  #26   Spotlight this post!  
Unread 16-12-2010, 09:29
whcirobotics's Avatar
whcirobotics whcirobotics is offline
Registered User
FRC #1514 (Vikings)
 
Join Date: Nov 2008
Rookie Year: 2009
Location: WHCI
Posts: 174
whcirobotics is an unknown quantity at this point
Re: How to code Macanum ddrive

I meant the up/down as in forward and reverse. And i am using two joysticks so i guess i wont need to attach throttle to anything. I will try this code(hopefully it works) but you are saying it is wrong so i am not so sure as to try it or not. :S
Reply With Quote
  #27   Spotlight this post!  
Unread 16-12-2010, 09:55
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,126
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: How to code Macanum ddrive

Quote:
Originally Posted by whcirobotics View Post
I meant the up/down as in forward and reverse... but you are saying it is wrong
Yes I assumed that or we couldn't have had this conversation. The smiley at the end was meant to convey that I was just joking.

Quote:
but you are saying it is wrong so i am not so sure as to try it or not.
All I can tell you is that it looks like you now have the inputs to the holo vi wired correctly for two-joystick "Halo plus rotate" driver interface.

As for the rest of the diagram, I am not a LabVIEW programmer so maybe someone else will take a look at it to see if there are errors.

Quote:
I will try this code(hopefully it works)
Have you checked to see that the mecanum wheels are mounted correctly? This is a common error. Checking this can save you a lot of frustration.




Reply With Quote
  #28   Spotlight this post!  
Unread 16-12-2010, 23:48
RoboMaster's Avatar
RoboMaster RoboMaster is offline
Alum, former programmer&co-captain
FRC #2472 (The Centurions)
Team Role: Mentor
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Minnesota, Twin Cities
Posts: 268
RoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant futureRoboMaster has a brilliant future
Re: How to code Macanum ddrive

As a LabVIEW programmer, your newest screen shot looks good to go.
__________________
My engineering blog: noeticbrainwaves.blogspot.com

I'm not slacking, my code's compiling
...and I'm using LabVIEW
Reply With Quote
  #29   Spotlight this post!  
Unread 23-12-2010, 10:02
whcirobotics's Avatar
whcirobotics whcirobotics is offline
Registered User
FRC #1514 (Vikings)
 
Join Date: Nov 2008
Rookie Year: 2009
Location: WHCI
Posts: 174
whcirobotics is an unknown quantity at this point
Re: How to code Macanum ddrive

Hi CD, I got 5 team members and 1 mentor to come on a Wednesday(December 22, 2010) and we build a test robot with the macanum wheels in 4 hours. We finished and i deployed the code and pressed enable on teleop. This is a video of what happend:

http://www.youtube.com/watch?v=es7OF_V-LWU

Is there something wrong with the code? It is the same code as the one attached above. But the problem was that one wheel kept turning. I tried attaching the pwms to other than that of 7, 8 , 9 , 10 and put them in 3 , 4 , 5 , 6 and again that wheel kept turning. :S

The mentor suggested that that one might be calibrated other than 0, but what else could possibly be wrong? Maybe the software? :S Help please.
__________________
"A team back in training !"

Last edited by whcirobotics : 23-12-2010 at 10:05.
Reply With Quote
  #30   Spotlight this post!  
Unread 23-12-2010, 10:49
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,126
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: How to code Macanum ddrive

Quote:
Originally Posted by whcirobotics View Post
Hi CD, I got 5 team members and 1 mentor to come on a Wednesday(December 22, 2010) and we build a test robot with the macanum wheels in 4 hours. We finished and i deployed the code and pressed enable on teleop. This is a video of what happend:

http://www.youtube.com/watch?v=es7OF_V-LWU

Is there something wrong with the code? It is the same code as the one attached above. But the problem was that one wheel kept turning. I tried attaching the pwms to other than that of 7, 8 , 9 , 10 and put them in 3 , 4 , 5 , 6 and again that wheel kept turning. :S

The mentor suggested that that one might be calibrated other than 0, but what else could possibly be wrong? Maybe the software? :S Help please.
Others may have different suggestions, but if I were you here's what I'd do in your situation:
- Create a separate new software project with VERY SIMPLE CODE that allows you to control each wheel one at a time. This should be very quick and simple to do.

- Run this code and test each wheel individually to make sure each wheel responds properly (both forward and reverse) and equally with respect to the others.

- If your robot passes this test, it is mechanically and electrically sound. The problem is in your mecanum software.

- If the robot fails this test, first double-check your simple code. Then check the PWM indicator light on the Dashboard for that motor. If everything checks out, then you have a hardware problem. Check the indicator lights on each Jag when it is being commanded. If OK, check the voltages for that circuit (motor out, power in).


Last edited by Ether : 23-12-2010 at 10:54.
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Macanum ability to climb ramps BIGWILLI2081 Rules/Strategy 47 17-01-2010 00:20
How do i Upload code? seanl Programming 2 20-01-2009 10:46
Inventor > G-Code - HOW!!?? =Martin=Taylor= Inventor 4 17-07-2007 03:18
How to type my code jewbilee Programming 7 07-03-2007 21:51
how to convert Easy C code into real code? TheHolyLancer Programming 1 29-01-2006 09:09


All times are GMT -5. The time now is 15:01.

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