I’ve been attempting to use the EZ template recently and have ran across this issue- our drive is supposed to be the flipped arcade but will not work as intended. The left joystick turns the robot when pushed up and down, and the right joystick moves the bot forward and backward when pushed side to side. We have tried changing the direction of the motors and the ports they are in but with noting changing. Has anyone else experienced this?
I know how to program arcade. Post your code and which ports which motors are in. Actually as long as your motors are programmed into the ports they’re in and the direction “forward” in the program will spin each motor forward, your code will be enough. Post it and I’ll help you.
Could you possibly post the code, I used EZ template all of tipping point and ran into no issues. This is most likely that you didn’t reverse one side of your robot meaning when it feeds one side positive velocity and one side negative it goes forwards vs turning.
if they’re using EZ-Template arcade control is a built in feature so all they should need to do is have chassis.arcade() in their op_control loop
We were using the EZ template example project just so we could learn the ropes of the ez template, given that we were changing values in the example project to try and get it run. Originally we were running into the wrong joystick controlling the wrong direction for example the joystick left x axis was driving the robot forward and backward. We then changed it to tank control but ran into another problem, it seemed to stop reciving joystick analog input at all. Bellow is attached the tank control version of the code with the opcontrol and chassis config
Drive chassis (
// Left Chassis Ports (negative port will reverse it!)
// the first port is the sensored port (when trackers are not used!)
{11, -12}
// Right Chassis Ports (negative port will reverse it!)
// the first port is the sensored port (when trackers are not used!)
,{-19, 20}
// IMU Port
,21
// Wheel Diameter (Remember, 4" wheels are actually 4.125!)
// (or tracking wheel diameter)
,2.75
// Cartridge RPM
// (or tick per rotation if using tracking wheels)
,200
// External Gear Ratio (MUST BE DECIMAL)
// (or gear ratio of tracking wheel)
// eg. if your drive is 84:36 where the 36t is powered, your RATIO would be 2.333.
// eg. if your drive is 36:60 where the 60t is powered, your RATIO would be 0.6.
,1
// Uncomment if using tracking wheels
/*
// Left Tracking Wheel Ports (negative port will reverse it!)
// ,{1, 2} // 3 wire encoder
// ,8 // Rotation sensor
// Right Tracking Wheel Ports (negative port will reverse it!)
// ,{-3, -4} // 3 wire encoder
// ,-9 // Rotation sensor
*/
// Uncomment if tracking wheels are plugged into a 3 wire expander
// 3 Wire Port Expander Smart Port
// ,1
);
void opcontrol() {
// This is preference to what you like to drive on.
chassis.set_drive_brake(MOTOR_BRAKE_COAST);
while (true) {
chassis.tank(); // Tank control
// chassis.arcade_standard(ez::SPLIT); // Standard split arcade
// chassis.arcade_standard(ez::SINGLE); // Standard single arcade
// chassis.arcade_flipped(ez::SPLIT); // Flipped split arcade
// chassis.arcade_flipped(ez::SINGLE); // Flipped single arcade
// . . .
// Put more user control code here!
// . . .
pros::delay(ez::util::DELAY_TIME); // This is used for timer calculations! Keep this ez::util::DELAY_TIME
}
also we switched and unattached 2 motors just to see if we could get it working. Is it possible the example project just doesn’t work we are very confused and any help would be great! Thank you.
If you have a direct drive drivetrain both motors on one side should be spinning the same way.