Go to Post When I judge a robot, the single most important factor to me is whether or not the robot is rigid. - Gressa [more]
Home
Go Back   Chief Delphi > Technical > Technical Discussion
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
  #22   Spotlight this post!  
Unread 12-02-2015, 15:49
Jared Russell's Avatar
Jared Russell Jared Russell is offline
Taking a year (mostly) off
FRC #0254 (The Cheesy Poofs), FRC #0341 (Miss Daisy)
Team Role: Engineer
 
Join Date: Nov 2002
Rookie Year: 2001
Location: San Francisco, CA
Posts: 3,081
Jared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond reputeJared Russell has a reputation beyond repute
Re: Drive Train Curves Only While Backing Up

Quote:
Originally Posted by Ozuru View Post
I just changed the testing code to this now and the issue persists. Shouldn't this have fixed it?

Code:
package org.usfirst.frc.team2559.robot;

import edu.wpi.first.wpilibj.IterativeRobot;
import edu.wpi.first.wpilibj.RobotDrive;
import edu.wpi.first.wpilibj.Talon;

/**
 * The VM is configured to automatically run this class, and to call the
 * functions corresponding to each mode, as described in the IterativeRobot
 * 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 Robot extends IterativeRobot {
    /**
     * This function is run when the robot is first started up and should be
     * used for any initialization code.
     */
	
	Talon talonleft0 = new Talon(3);
	Talon talonleft1 = new Talon(4);
	Talon talonright0 = new Talon(5);
	Talon talonright1 = new Talon(6);
	RobotDrive rDrive;
		
    public void robotInit() {
    	rDrive = new RobotDrive(talonleft0, talonleft1, talonright0, talonright1);

    }

    /**
     * This function is called periodically during autonomous
     */
    public void autonomousPeriodic() {
    	rDrive.tankDrive(-0.4, -0.4);
    }

    public void teleopInit() {
    }
    /**
     * This function is called periodically during operator control
     */
    public void teleopPeriodic() {
    	
    }
    
    /**
     * This function is called periodically during test mode
     */
    public void testPeriodic() {
    
    }
    
}
RobotDrive by default inverts the command to your right side drive motors (the authors assumed you'd wire red to + on both sides), so calling tankDrive(-.4, -.4) actually sends -.4 and +.4 to your Talons.

tankDrive(-.4, .4) or visa versa should result in identical pulsewidths.
 


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 00:43.

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