In the test program, nothing is happening on the robot. No motors move. The only change I made to the code was I reconfigured the motor IDs correctly on RobotDrive to correspond with the left and right motors on the robot.
Anyway, see the code:
#include <IterativeRobot.h>
#include <Joystick.h>
#include <LiveWindow/LiveWindow.h>
#include <RobotDrive.h>
#include <Timer.h>
class Robot: public frc::IterativeRobot {
public:
Robot() {
myRobot.SetExpiration(0.1);
timer.Start();
}
private:
frc::RobotDrive myRobot { 3, 4 }; // Robot drive system
frc::Joystick stick { 0 }; // Only joystick
frc::LiveWindow* lw = frc::LiveWindow::GetInstance();
frc::Timer timer;
void AutonomousInit() override {
timer.Reset();
timer.Start();
}
void AutonomousPeriodic() override {
// Drive for 2 seconds
if (timer.Get() < 2.0) {
myRobot.Drive(-0.5, 0.0); // Drive forwards half speed
} else {
myRobot.Drive(0.0, 0.0); // Stop robot
}
}
void TeleopInit() override {
}
void TeleopPeriodic() override {
// Drive with arcade style (use right stick)
myRobot.ArcadeDrive(stick);
}
void TestPeriodic() override {
lw->Run();
}
};
START_ROBOT_CLASS(Robot)
And this is the build log when running the code on our RoboRIO:
Buildfile: C:\Users\Aiden\Desktop\Robotics Team\FRC Workspace\Getting Started\build.xml
Trying to override old definition of task classloader
get-target-ip:
[echo] Finding roboRIO, please ignore any [hostinfo] error messages
[echo] Trying DNS: roboRIO-4104-FRC.lan
[echo] Trying USB: 172.22.11.2
[echo] Trying mDNS: roboRIO-4104-FRC.local
[echo] Trying Static Ethernet: 10.41.4.2
[hostinfo] Error retrieving remote host information for host:roboRIO-4104-FRC.lan.
[echo] Resolved mDNS to 169.254.62.76
[echo] roboRIO found at 169.254.62.76
dependencies:
[echo] roboRIO image version validated
deploy:
[delete] Deleting: C:\Users\Aiden\wpilib\cpp\current\lib\WPI_Native_Libraries.properties
[scp] Connecting to 169.254.62.76:22
[scp] Receiving file: /usr/local/frc/lib/WPI_Native_Libraries.properties
[scp] Receiving: WPI_Native_Libraries.properties : 2177
[scp] File transfer time: 0.0 Average Rate: ∞ B/s
[scp] done
[scp] Connecting to 169.254.62.76:22
[scp] Receiving file: /usr/local/frc/lib/User_Libraries.properties
[scp] Caught exception: scp: /usr/local/frc/lib/User_Libraries.properties: No such file or directory
[sshexec] Connecting to 169.254.62.76:22
[sshexec] cmd : rm -f /home/lvuser/FRCUserProgram
[sshexec] Connecting to 169.254.62.76:22
[sshexec] cmd : ldconfig
[echo] [athena-deploy] Copying code over.
[scp] Connecting to 169.254.62.76:22
[scp] done.
[sshexec] Connecting to 169.254.62.76:22
[sshexec] cmd : killall -q netconsole-host || :
[delete] Deleting: C:\Users\Aiden\wpilib\cpp\current\ant
etconsole-host.properties
[scp] Connecting to 169.254.62.76:22
[scp] Receiving file: /usr/local/frc/bin/netconsole-host.properties
[scp] Receiving: netconsole-host.properties : 127
[scp] File transfer time: 0.0 Average Rate: ∞ B/s
[scp] done
[scp] Connecting to 169.254.62.76:22
[scp] done.
[echo] [athena-deploy] Giving program CAP_SYS_NICE capability.
[sshexec] Connecting to 169.254.62.76:22
[sshexec] cmd : setcap 'cap_sys_nice=pe' /home/lvuser/FRCUserProgram
[echo] [athena-deploy] Starting program.
[sshexec] Connecting to 169.254.62.76:22
[sshexec] cmd : . /etc/profile.d/natinst-path.sh; chmod a+x /home/lvuser/FRCUserProgram; /usr/local/frc/bin/frcKillRobot.sh -t -r;
[sshexec] Connecting to 169.254.62.76:22
[sshexec] cmd : sync
BUILD SUCCESSFUL
Total time: 21 seconds
And this is the only error:
Description Resource Path Location Type
Program "C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin\amd64\cl" not found in PATH Getting Started Project Properties, C++ Preprocessor Include.../Providers, [CDT Cross GCC Built-in Compiler Settings] options C/C++ Scanner Discovery Problem
And I’m pretty sure that error only applies to when I work with Visual Studio, which I don’t do.
And also, the Talon SRX’s lights alternate with orange LED. That may be an issue.
So what are we doing wrong? I try to understand ::rtm:: and I always say, “I’m gonna get stuff done today!” but the lack of user friendliness says, “That’s where your wrong kiddo”