Go to Post I need someone to kick me out...unfortunately that would have to be me... - Mark McLeod [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

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 02-14-2015, 04:31 AM
rame rame is offline
Registered User
FRC #5615
Team Role: Mentor
 
Join Date: Oct 2014
Rookie Year: 2015
Location: Canada
Posts: 4
rame is an unknown quantity at this point
arcadeDrive, 3D Pro, pushing forward, goes backward

Hi,

I am a newbie and this my first post. Sorry.

We are using this Java code without making any changes.

https://wpilib.screenstepslive.com/s...p-test-program
...
myRobot.arcadeDrive(stick);
....

We are using the Logitech 3D Pro from the KOP.

The robot moves. But pulling backwards on the joystick = robot moves forwards. Pushing the joystick forwards = robot moves backwards.

How can we reverse this?

Sorry I do not know how to post code and I do not want to paste the code here.

Thanks in advance for your help.
Reply With Quote
  #2   Spotlight this post!  
Unread 02-14-2015, 07:36 AM
Rakusan2 Rakusan2 is offline
Registered User
AKA: Tomas Rakusan
FRC #3571 (Milton Mustangs)
Team Role: Programmer
 
Join Date: May 2014
Rookie Year: 2011
Location: Milton, ON, Canada
Posts: 22
Rakusan2 is an unknown quantity at this point
My suggestions is to take appart stick and use it as stick.getX () and stick.getY (). Also since you want to reverse forawd with backward, you can reverse the y value.
Therefore instead of myRobot.arcadeDrive (stick) put myRobot.arcadeDrive (-stick.getY(), stick.getX ())
Reply With Quote
  #3   Spotlight this post!  
Unread 02-14-2015, 09:13 AM
GeeTwo's Avatar
GeeTwo GeeTwo is online now
Technical Director
AKA: Gus Michel II
FRC #3946 (Tiger Robotics)
Team Role: Mentor
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Slidell, LA
Posts: 3,539
GeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond repute
Re: arcadeDrive, 3D Pro, pushing forward, goes backward

Check that you have the left and right motors connected to the correct ports as written into your code. Reversing left and right motors rotates the robot so that front is back and back is front.
__________________

If you can't find time to do it right, how are you going to find time to do it over?
If you don't pass it on, it never happened.
Robots are great, but inspiration is the reason we're here.
Friends don't let friends use master links.
Reply With Quote
  #4   Spotlight this post!  
Unread 02-14-2015, 04:47 PM
rame rame is offline
Registered User
FRC #5615
Team Role: Mentor
 
Join Date: Oct 2014
Rookie Year: 2015
Location: Canada
Posts: 4
rame is an unknown quantity at this point
Re: arcadeDrive, 3D Pro, pushing forward, goes backward

Quote:
Originally Posted by Rakusan2 View Post
My suggestions is to take appart stick and use it as stick.getX () and stick.getY (). Also since you want to reverse forawd with backward, you can reverse the y value.
Therefore instead of myRobot.arcadeDrive (stick) put myRobot.arcadeDrive (-stick.getY(), stick.getX ())
Thanks, I will try this and report back. Much appreciated.
Reply With Quote
  #5   Spotlight this post!  
Unread 02-14-2015, 06:06 PM
rame rame is offline
Registered User
FRC #5615
Team Role: Mentor
 
Join Date: Oct 2014
Rookie Year: 2015
Location: Canada
Posts: 4
rame is an unknown quantity at this point
Re: arcadeDrive, 3D Pro, pushing forward, goes backward

Thanks! That worked!!! Reversing the x and y value did the trick. Thanks!
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


All times are GMT -5. The time now is 08:56 AM.

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