Go to Post This brings back childhood memories of playing with erector sets... Wait. I still do. :D - Whippet [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Spotlight this post!  
Unread 15-12-2016, 19:01
minisolarclown minisolarclown is offline
Registered User
FRC #3603
Team Role: Programmer
 
Join Date: Dec 2016
Rookie Year: 2015
Location: Reed City
Posts: 7
minisolarclown is an unknown quantity at this point
Holonomic Drive Issues With Strafing

I'm having issues with holonomic driving with our meccanum robot. Driving forwards and backwards on the y-axis is working, and so is turning left and right with the twist-axis, but moving left and right on the x-axis isn't working. I know that in order to drive sideways, the wheels on one side have to be spinning away from each other, while the wheels on the other side need to spin towards each other. The moving back and forth and turning left and right is working, but when I try strafing, both sets of wheels spin away from each other, which is not correct. Here is my drive code (java):

Code:
double x = -Math.pow(joy1.getRawAxis(0), 3);
	    		double y = -Math.pow(joy1.getRawAxis(1), 3);
	    		double rot = -Math.pow(joy2.getRawAxis(0), 3);
	    		
	    		if(Math.abs(x)>=0.1 || Math.abs(y)>=0.1 || Math.abs(rot)>=0.1) {
	    			mainDrive.mecanumDrive_Cartesian(x, rot, y, gyro.getAngle());
	    		}

The -Math.pow(); statements are for sensitivity, while the if statement is for a threshold. "x" is the x-axis, "y" is the y-axis, and "rot" is rotation. joy1 and joy2 are joysticks. If this is a mechanical problem, how do I fix it? If it is a programming problem, how do I fix it?
Reply With Quote
 


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 09:31.

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