View Single Post
  #1   Spotlight this post!  
Unread 05-02-2015, 11:02
droswell's Avatar
droswell droswell is offline
Registered User
FRC #2370 (iBots)
Team Role: Mentor
 
Join Date: Mar 2011
Rookie Year: 2009
Location: Rutland, VT
Posts: 67
droswell will become famous soon enoughdroswell will become famous soon enough
Assistance with RobotBuilder and Drive

Greetings,

We're trying to use robotbuilder this year. We have PID and solenoids working, for some reason I'm having a lot of trouble getting the mecanum drivetrain code working.

I followed this tutorial http://wpilib.screenstepslive.com/s/...-and-joysticks

and got the drive subsystem all set. When I try to add the method to the execute() section of our DriveWithJoystick command, I get the error "No known conversion for argument 1 from 'Joystick*' to 'Joystick'.

From the command DriveWithJoystick
Code:
void DriveWithJoystick::Execute()
{
     Robot::driveSubsystem->takeJoystickInputs(Robot::io->getJoystick1() );
}


In my header file for my driveSubsystem, I added this
Code:
void takeJoystickInputs(Joystick stick);
void stop();

and finally in my driveSystem.cpp these are the two functions I added after InitDefaultCommand:

Code:
void  takeJoystickInputs(Joystick stick)
{
     Robot::driveSubsystem->robotDrive4->MecanumDrive_Cartesian(stick.GetX(), stick.GetY(), stick,GetZ() );
}

void stop()
{
      Robot::driveSubsystem->robotDrive4->StopMotor();
}
Thank you for any help you can provide!
Reply With Quote