Go to Post Please forgive any possible profound language. - PortugazD.Ace [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 11-01-2010, 22:22
will_1359 will_1359 is offline
Registered User
FRC #1359
 
Join Date: Jan 2010
Location: lebanon
Posts: 15
will_1359 is an unknown quantity at this point
Arrow drive problems

ok, so i'm setting up just the basic tank drive for our robot. i'm using code from one of the, what i assume, was a beta team. and it seems to check out to me.

Code:
/*----------------------------------------------------------------------------*/
/* Copyright (c) FIRST 2008. All Rights Reserved.                             */
/* Open Source Software - may be modified and shared by FRC teams. The code   */
/* must be accompanied by the FIRST BSD license file in the root directory of */
/* the project.                                                               */
/*----------------------------------------------------------------------------*/

package edu.wpi.first.wpilibj.templates;


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

/**
 * The VM is configured to automatically run this class, and to call the
 * functions corresponding to each mode, as described in the SimpleRobot
 * documentation. If you change the name of this class or the package after
 * creating this project, you must also update the manifest file in the resource
 * directory.
 */
public class RobotTemplate2 extends SimpleRobot {
    private RobotDrive drivetrain;
    private Joystick leftStick;
    
    /**
     * This function is called once each time the robot enters autonomous mode.
     */
     public RobotTemplate2(){
         drivetrain = new RobotDrive(1,2);
         leftStick = new Joystick(1);
         
     }
    public void autonomous() {
         getWatchdog().feed();

        
    }

    /**
     * This function is called once each time the robot enters operator control.
     */
    public void operatorControl() {
        getWatchdog().setEnabled(false);
        while (isOperatorControl()){
            drivetrain.drive(leftStick.getY(), leftStick.getX());
            //slower itterations seem to work more smoothely
            Timer.delay(0.005);
        }
        stop();

    }
    
    public void stop(){
        drivetrain.drive(0.0,0.0);
    }

}
but when i send it over to the cRIO, on net beans on the consol, it says
"no user supplied robotmain"

now after i detach the computer with netbeans and plug the cRIO into the classmate via ethernet, it works fine, i can select autonomous, and hit start and the light will blink like its supposed to. but nothing happens. which makes sense. but when i set it to teleop, and make it run, still nothing will happen on the robot.

when i move either of the joysticks, there is no activity. when i look under setup on the classmate and move the joysticks it shows no activity, but when i press a button the coresponding one will light up blue.

also on the operation screen on the small status window, i get a message "watchdog not fed".

been trying to get this work for 3 days now, the big problem is that i feel i should have had this done by the end of the first day. any help would be great.
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Non-Arcade Drive causes problems in Autonomous... pinballwizard96 NI LabVIEW 2 01-02-2009 20:45
Crab Drive Problems Ice1605 Electrical 13 25-01-2009 23:44
pic: Jester Drive:Mecanum Wheel Drive Train Ken Delaney 357 Technical Discussion 64 29-03-2006 22:16
Labview problems and code problems ajsetter Programming 25 18-01-2006 17:07
Major problems with tank tread drive Lord Nerdlinger Technical Discussion 13 23-02-2004 21:15


All times are GMT -5. The time now is 11:06.

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