Go to Post Welcome to FIRST, the place where you can be competitive in a team. Here people can learn more in one year of FIRST than in four years of high school. - dude__hi [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
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 05-05-2009, 20:00
avolkov avolkov is offline
Registered User
FRC #1155
 
Join Date: May 2009
Location: NY
Posts: 10
avolkov is an unknown quantity at this point
SimpleRobot Windriver issues...

So I just started to mess around with WindRiver on an old robot outfitted with a cRio and the who 2009 electronics equipment, when I ran into a couple of issues... here are some of the questions which arose:

1) Whenever I changed the "SimpleRobot" code, I right clicked on the program name in the explorer windom, and clicked "build"... then I clicked on First-->download... is this the correct way to upload code to the cRio or is there a better/proper way, or what?

2) Because of (possibly) some weird wiring issues, it took me some time to finally get the robot to respond to the joystick, as it should in "SimpleRobot"... but, as it turned out... the x and y axis were backwards... I have looked everywhere and tried a lot of things in the code to fix this issue, but came to no change... can someone please tell me exactly how to change the x and y axis control when it comes to the "SimpleRobot" program in WindRiver?

I am sure more questions will arise from me soon enough, as I am completely new to WindRiver, which makes me absolutely oblivious, besides what I can actually piece together from my knowledge of other C++ libraries... But yea, if someone could help me out that would be great, and would be appreciated tremendously...
Reply With Quote
  #2   Spotlight this post!  
Unread 06-05-2009, 00:16
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: SimpleRobot Windriver issues...

Quote:
Originally Posted by avolkov View Post
2) Because of (possibly) some weird wiring issues, it took me some time to finally get the robot to respond to the joystick, as it should in "SimpleRobot"... but, as it turned out... the x and y axis were backwards... I have looked everywhere and tried a lot of things in the code to fix this issue, but came to no change... can someone please tell me exactly how to change the x and y axis control when it comes to the "SimpleRobot" program in WindRiver?
This is with single-joystick "arcade" style control? You are probably misinterpreting the problem. I suspect that the axes are correct, and the motor wiring is merely "backwards" on one side. If that's the situation, pushing the joystick forward or backward will make one side of the robot go forward and the other go backward, spinning the robot and making it act like a correctly-wired robot with the joystick pushed to the side. Pushing the joystick to the side will make both motors go in the same direction, emulating correct wiring with the joystick pushed forward or backward.

The appropriate fix is either to swap the wiring on the "backwards" motor, or to tell the software that the motor control on one side or the other needs to be inverted. The software fix is applied when you instantiate the arcade drive.
Reply With Quote
  #3   Spotlight this post!  
Unread 06-05-2009, 07:41
avolkov avolkov is offline
Registered User
FRC #1155
 
Join Date: May 2009
Location: NY
Posts: 10
avolkov is an unknown quantity at this point
Re: SimpleRobot Windriver issues...

I am guessing you are talking about the leads going directly to the motor (from the jaguar) being backward.... well that does make sense, so I can check... but wow thats really pathetic that this issue on the robot has gone unnoticed for about 2 years now... hopefully ure right
Reply With Quote
  #4   Spotlight this post!  
Unread 06-05-2009, 11:09
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: SimpleRobot Windriver issues...

Quote:
Originally Posted by avolkov View Post
...thats really pathetic that this issue on the robot has gone unnoticed for about 2 years now...
Some people prefer to keep the motor wiring consistent (e.g. positive polarity yields clockwise rotation) rather than make the speed controller values consistent (e.g. higher numbers yield faster forward travel). I'm sure the software running that robot in the past properly accounted for the need to reverse that motor's control.

The WPI library has a place to say "please invert this motor" in the drivetrain definition. That's probably all you need to do.
Reply With Quote
  #5   Spotlight this post!  
Unread 06-05-2009, 20:04
byteit101's Avatar
byteit101 byteit101 is offline
WPILib maintainer (WPI)
AKA: Patrick Plenefisch
no team (The Cat Attack (Formerly))
Team Role: Programmer
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Worcester
Posts: 699
byteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of lightbyteit101 is a glorious beacon of light
Re: SimpleRobot Windriver issues...

to build,(make sure you have a Remot esystem connection, look in C:\Windriver\docs\frc\C programming guide for frc.pdf for details) right click project (dont need to build)> Run kernel task and the entry point is FRC_UserProgram_StartupLibraryInit then hit Run. It will download, and run. Reboot to stop debugging and get rid of the file on the crio
also, the joystick Y (forward and back) forward is negative, back is positive
__________________
Bubble Wrap: programmers rewards
Watchdog.Kill();
printf("Watchdog is Dead, Celebrate!");
How to make a self aware robot: while (∞) cout<<(sqrt(-∞)/-0);
Previously FRC 451 (The Cat Attack)
Now part of the class of 2016 at WPI & helping on WPILib
Reply With Quote
  #6   Spotlight this post!  
Unread 07-05-2009, 17:15
avolkov avolkov is offline
Registered User
FRC #1155
 
Join Date: May 2009
Location: NY
Posts: 10
avolkov is an unknown quantity at this point
Re: SimpleRobot Windriver issues...

I have just spend 2 hours looking through the code and the manual(s) and still have no idea how to invert the motors... exactly in which file should I look?
Reply With Quote
  #7   Spotlight this post!  
Unread 07-05-2009, 22:35
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,113
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: SimpleRobot Windriver issues...

Quote:
Originally Posted by avolkov View Post
I have just spend 2 hours looking through the code and the manual(s) and still have no idea how to invert the motors... exactly in which file should I look?
If you don't see the file byteit101 pointed to, try http://first.wpi.edu/Images/CMS/Firs...ming_Guide.pdf online. Look at the RobotDrive class, specifically its SetInvertedMotor() method. I found it in about three seconds by searching for the text "invert".
Reply With Quote
  #8   Spotlight this post!  
Unread 08-05-2009, 00:25
avolkov avolkov is offline
Registered User
FRC #1155
 
Join Date: May 2009
Location: NY
Posts: 10
avolkov is an unknown quantity at this point
Re: SimpleRobot Windriver issues...

Thanks, but nevermind, I found that right after I posted the question...
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
Windriver LAC McGurky C/C++ 12 25-02-2009 18:38
Windriver on Mac? jasonpeinko C/C++ 3 02-02-2009 21:36
WindRiver errors dnrobotics11 C/C++ 1 27-01-2009 20:44
WindRiver Installation Issues - can you help a brother out? tdressel C/C++ 1 08-01-2009 00:42


All times are GMT -5. The time now is 03:29.

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