Go to Post What do you do after making a design public? Improve it! What do you do when you give your opponents a weapon? Come up with a better one or a way to beat it! What is Wildstang going to do, you ask? Make their drivetrains better! - EricH [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 29-01-2015, 11:49
Dinnesy Dinnesy is offline
Registered User
FRC #4968 (Robo Hawks)
Team Role: Teacher
 
Join Date: Dec 2013
Rookie Year: 2014
Location: Lively
Posts: 19
Dinnesy is an unknown quantity at this point
Code changes not deploying to robot?

My team has deployed the following code to our robot:
package org.usfirst.frc.team4968.robot;

import edu.wpi.first.wpilibj.SampleRobot;
import edu.wpi.first.wpilibj.RobotDrive;
import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.Timer;

public class Robot extends SampleRobot
{
RobotDrive myRobot; // class that handles basic drive operations
Joystick leftStick; // set to ID 1 in DriverStation
Joystick rightStick; // set to ID 2 in DriverStation
public Robot()
{
myRobot = new RobotDrive(0, 1);
myRobot.setExpiration(0.1);
leftStick = new Joystick(0);
rightStick = new Joystick(1);
}
public void operatorControl()
{
myRobot.setSafetyEnabled(true);
while (isOperatorControl() && isEnabled())
{
myRobot.arcadeDrive(leftStick);
//myRobot.tankDrive(leftStick, rightStick);
Timer.delay(0.005); // wait for a motor update time
}
}
}

Initially, the code was working. However we then tried redeploying the code with a few changes, and the robot stopped working. So, we reverted the code back to EXACTLY what it was when it was working, and redeployed it, but the robot still does not work. I believe this to because by our code is not successfully deploying to the robot, because no matter what we do, nothing seems to change and the robot does not respond. Could someone outline the code deploying process for us to ensure we are not missing anything? Does the build.xml file need to be updated?
Reply With Quote
  #2   Spotlight this post!  
Unread 29-01-2015, 11:53
BigJ BigJ is offline
Registered User
AKA: Josh P.
FRC #1675 (Ultimate Protection Squad)
Team Role: Engineer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Milwaukee, WI
Posts: 945
BigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond repute
Re: Code changes not deploying to robot?

Before doing anything else, try using some System.out.println statements to make sure whether the code is or is not getting updated on the bot.
Reply With Quote
  #3   Spotlight this post!  
Unread 29-01-2015, 12:23
Dinnesy Dinnesy is offline
Registered User
FRC #4968 (Robo Hawks)
Team Role: Teacher
 
Join Date: Dec 2013
Rookie Year: 2014
Location: Lively
Posts: 19
Dinnesy is an unknown quantity at this point
Re: Code changes not deploying to robot?

Quote:
Originally Posted by BigJ View Post
Before doing anything else, try using some System.out.println statements to make sure whether the code is or is not getting updated on the bot.
We have a very new and inexperienced coder this year and he is not very familiar with system.out.println statements, could you explain how we would do so? Thanks a Lot!

Last edited by Dinnesy : 29-01-2015 at 12:26.
Reply With Quote
  #4   Spotlight this post!  
Unread 29-01-2015, 12:43
BigJ BigJ is offline
Registered User
AKA: Josh P.
FRC #1675 (Ultimate Protection Squad)
Team Role: Engineer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Milwaukee, WI
Posts: 945
BigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond repute
Re: Code changes not deploying to robot?

System.out.println("Hello world"); will print a line of text containing "Hello world" in the console. You can substitute any string for "Hello world".

Then you can look at the console output to see if your text is printing.
Reply With Quote
  #5   Spotlight this post!  
Unread 29-01-2015, 12:59
Dinnesy Dinnesy is offline
Registered User
FRC #4968 (Robo Hawks)
Team Role: Teacher
 
Join Date: Dec 2013
Rookie Year: 2014
Location: Lively
Posts: 19
Dinnesy is an unknown quantity at this point
Re: Code changes not deploying to robot?

Quote:
Originally Posted by BigJ View Post
System.out.println("Hello world"); will print a line of text containing "Hello world" in the console. You can substitute any string for "Hello world".

Then you can look at the console output to see if your text is printing.
I get the hello world printout infinitely in the console. So, that would imply that there is an issue with my code, however i am not getting any errors, and all of the ports are correct.
Reply With Quote
  #6   Spotlight this post!  
Unread 29-01-2015, 13:14
BigJ BigJ is offline
Registered User
AKA: Josh P.
FRC #1675 (Ultimate Protection Squad)
Team Role: Engineer
 
Join Date: Jan 2007
Rookie Year: 2007
Location: Milwaukee, WI
Posts: 945
BigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond reputeBigJ has a reputation beyond repute
Re: Code changes not deploying to robot?

All that means is that you put that statement in a loop (this is okay). More importantly, it means that your code is being deployed and updated properly.
Reply With Quote
  #7   Spotlight this post!  
Unread 29-01-2015, 13:54
Jon Stratis's Avatar
Jon Stratis Jon Stratis is offline
Electrical/Programming Mentor
FRC #2177 (The Robettes)
Team Role: Mentor
 
Join Date: Feb 2007
Rookie Year: 2006
Location: Minnesota
Posts: 3,738
Jon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond reputeJon Stratis has a reputation beyond repute
Re: Code changes not deploying to robot?

The posted code is just for driving the robot... Have you verified through the driver station that the joysticks are still connected?. Unplugging them and then plugging them back in while the driver station is up can cause them to no longer be recognized or read.
__________________
2007 - Present: Mentor, 2177 The Robettes
LRI: North Star 2012-2016; Lake Superior 2013-2014; MN State Tournament 2013-2014, 2016; Galileo 2016; Iowa 2017
2015: North Star Regional Volunteer of the Year
2016: Lake Superior WFFA
Reply With Quote
  #8   Spotlight this post!  
Unread 30-01-2015, 09:40
Dinnesy Dinnesy is offline
Registered User
FRC #4968 (Robo Hawks)
Team Role: Teacher
 
Join Date: Dec 2013
Rookie Year: 2014
Location: Lively
Posts: 19
Dinnesy is an unknown quantity at this point
Re: Code changes not deploying to robot?

Quote:
Originally Posted by Jon Stratis View Post
The posted code is just for driving the robot... Have you verified through the driver station that the joysticks are still connected?. Unplugging them and then plugging them back in while the driver station is up can cause them to no longer be recognized or read.
Yes, they joysticks are connected and the driver station is recognizing all feedback from them.
Reply With Quote
  #9   Spotlight this post!  
Unread 30-01-2015, 09:48
notmattlythgoe's Avatar
notmattlythgoe notmattlythgoe is offline
Flywheel Police
AKA: Matthew Lythgoe
FRC #2363 (Triple Helix)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Newport News, VA
Posts: 1,715
notmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond repute
Re: Code changes not deploying to robot?

What do the lights on the motor controllers do when you enable the robot?

Also, when posting code, please use code tags to make it easier to read. To use a code tag place a [/code] at the end and a [code] at the beginning. Thanks.
Reply With Quote
  #10   Spotlight this post!  
Unread 30-01-2015, 10:03
Dinnesy Dinnesy is offline
Registered User
FRC #4968 (Robo Hawks)
Team Role: Teacher
 
Join Date: Dec 2013
Rookie Year: 2014
Location: Lively
Posts: 19
Dinnesy is an unknown quantity at this point
Re: Code changes not deploying to robot?

Quote:
Originally Posted by notmattlythgoe View Post
What do the lights on the motor controllers do when you enable the robot?

Also, when posting code, please use code tags to make it easier to read. To use a code tag place a [/code] at the end and a [code] at the beginning. Thanks.
the light on the motor controllers(talons) do not change when the robot is enabled, they are always flashing orange. I will use the code tag from now on, sorry.
Reply With Quote
  #11   Spotlight this post!  
Unread 30-01-2015, 10:05
notmattlythgoe's Avatar
notmattlythgoe notmattlythgoe is offline
Flywheel Police
AKA: Matthew Lythgoe
FRC #2363 (Triple Helix)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Newport News, VA
Posts: 1,715
notmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond repute
Re: Code changes not deploying to robot?

Quote:
Originally Posted by Dinnesy View Post
the light on the motor controllers(talons) do not change when the robot is enabled, they are always flashing orange. I will use the code tag from now on, sorry.
No need to apologize, most people don't know about them. It just makes it easier to read.

The flashing talons means that they are note being communicated with. Can you verify that the talons are plugged into the correct ports and that they are plugged in correctly?
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 11:17.

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