I had asked a student to post this question, because I had given up and he was willing to work on it with no success.
We have used Robot Builder with enough success last year that we wanted to use it again this year. It is great for organizing command based code and is a tremendous testing tool. Normally you can export the c++ code, build it and deploy it and start testing motors and PID Loops. We just love it.
This year it did not work in Test Mode and with the help of Joe Ross (my hero), we had to make some changes to code generated by Robot Builder. Life was good and we have already been able to test motors and PID loop controls without have to write any C++ code (other than the Joe Ross fixes).
As shown in the original Brad Mill videos and as described in RobotBuilder, “Driving the robot with tank drive and joysticks”, we had to write code to drive with joystick. Not being particularly bright, it usually takes us an hour or so to get it to build. This year I spent a couple hours and a student has spent a couple of hours without success. I am pretty sure that this has convinced him to give up the programming career and pursue Fine Arts.
Basically we designed a 2 motor drive subsystem (Chassis), a Joystick and a DriveWithJoystick command in Robot Builder then export (C++). We added the following method to our Chassis subsystem:
// Put methods for controlling this subsystem
// here. Call these from Commands.
void Chassis::SixDrive(Joystick driveStick){ // %seb17-1
tankdrive->ArcadeDrive(driveStick);
With a declaration in Chassis.h.
Then we added this code to DriveWithJoyStick command:
void Drivewithjoystick::Execute() {
Robot::chassis->SixDrive((Joystick)(Robot::oi->getDriveJoystick()));
}
This gives us a Red X which displays the message:
Multiple markers at this line
- candidate is:
- no matching function for call to ‘Chassis::SixDrive (std::shared_ptr<Joystick>’
So we tried random things for several hours, then our X student programmer posted the beginning of this thread.
Any help may get him to rethink his Fine Arts goal.
Thanx