Go to Post You know, if I was John V-Neun I would get a copyright on my name! - Jay H 237 [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 01-11-2010, 10:22 PM
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
  #2   Spotlight this post!  
Unread 01-12-2010, 08:47 AM
derekwhite's Avatar
derekwhite derekwhite is offline
Java Virtual Machine Hacker
no team (FIRST@Oracle)
Team Role: Programmer
 
Join Date: May 2009
Rookie Year: 2009
Location: Burlington, MA
Posts: 127
derekwhite is on a distinguished road
Re: drive problems

This basic robot class name gets embedded in the file resources/META_INF/MANIFEST.MF and needs to change when the the name of the main class changes (there's code in the NetBeans modules to do this automatically, but it doesn't seem to work at the present).

So check that the class name in the MANIFEST.MF file matches your team's robot class name (ie "edu.wpi.first.wpilibj.templates.RobotTemplate 2" in your case).
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
Non-Arcade Drive causes problems in Autonomous... pinballwizard96 NI LabVIEW 2 02-01-2009 08:45 PM
Crab Drive Problems Ice1605 Electrical 13 01-25-2009 11:44 PM
pic: Jester Drive:Mecanum Wheel Drive Train Ken Delaney 357 Technical Discussion 64 03-29-2006 10:16 PM
Labview problems and code problems ajsetter Programming 25 01-18-2006 05:07 PM
Major problems with tank tread drive Lord Nerdlinger Technical Discussion 13 02-23-2004 09:15 PM


All times are GMT -5. The time now is 08:38 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