

Remove the reverse from the #pragma config, but compensate by flipping the corresponding motor leads.Remove the encoder from the #pragma config.Check for wiring problems a wire that isn't all the way could be reducing the power.Just to be thorough, here's what I have so far: Just in case that it's a mechanical problem: I'll go through every change that's been listed in the thread so far tomorrow at practice and keep track of what works. Well, I'm a big fan of experimental testing.

Also, in our current chassis, the motors are direct driven we are building a new robot but keeping the current one for programming purposes. If you have the resources, it would be a good idea to double all the wheels.We have doubled omniwheels, but I never knew why until now. That's why they're often combined (for example, ). It might also be a traction issue only half of the circumference of an omni-wheel can grip the ground. Is it possible that one of the motors burned out? When was the last time you tested the LabView program?

If you have the resources, it would be a good idea to double all the wheels.ĮDIT: I just reread the topic and found that it worked before with LabView. We don't really have to worry as much about irregular surfaces, since the game is played on a foam mat.įirst of all, I'd check that all the wheels are making even contact with the ground by changing the positioning of the motors. This is the very reason that cars have suspensions, since it's not guaranteed they will be driving over completely flat surfaces.
#Programming in robotc full
If the four axles don't all lie in the same plane, two of the wheels can make full contact with the ground, but the other two can't (think of a table whose legs are not all the same lengths). If you're using a "direct drive" system (if the motor axles support the omni-wheels directly, rather than giving them power via chain or gear), it's possible that the axles are misaligned. With PIDControl and encoders you can tell a motor to run at a speed instead of at a power, and the motor controller will vary the power supplied to each motor to keep them all running at the specified speed even if the robot is not mechanically balanced, if the motors are not equally powerful, or if some other factors are tending to force the different motors to turn at differing speeds. You are just giving them a constant power of 100. The way you currently have things configured with openloop the controller gets no feedback as two how fast each motor is actually spinnning. To make a robot go really straight we use encoders on all 4 wheels and closedloop or PIDControl on all drive motors. Here's a little bit of an explanation of PIDControl.

If it is then go into the configurator and uncheck reversed on that motor. And how your motors might be oriented in relationship to your robot and your direction of travel I would expect that the southeast motor might be going the wrong direction. Are all of the wheels spinning in the direction you expect? Just picturing in my head how your robot might be working mechanically.
#Programming in robotc free
Let's still stick with the configurator and the pragma lines to start with.Ģ.) Try setting your robot up on a box or something so that all the wheels are up in the air and free to spin. We don't know what is causing an identical program in Labview doesn't have the same problem. }Everything works fine, except that the robot veers to the right dramatically, like a foot right for five feet forward. #pragma config(Servo, srvo_S1_C3_6, servo6, tServoNone) #pragma config(Servo, srvo_S1_C3_5, servo5, tServoNone) #pragma config(Servo, srvo_S1_C3_4, servo4, tServoNone) #pragma config(Servo, srvo_S1_C3_3, servo3, tServoNone) #pragma config(Servo, srvo_S1_C3_2, servo2, tServoNone) #pragma config(Servo, srvo_S1_C3_1, autonomous_claw, tServoStandard) #pragma config(Motor, mtr_S1_C4_2, wrist, tmotorTetrix, openLoop) #pragma config(Motor, mtr_S1_C4_1, lift, tmotorTetrix, openLoop) #pragma config(Motor, mtr_S1_C2_2, southwest, tmotorTetrix, openLoop) #pragma config(Motor, mtr_S1_C2_1, southeast, tmotorTetrix, openLoop, reversed) #pragma config(Motor, mtr_S1_C1_2, northwest, tmotorTetrix, openLoop, encoder) #pragma config(Motor, mtr_S1_C1_1, northeast, tmotorTetrix, openLoop) #pragma config(Sensor, S1,, sensorI2CMuxController) #pragma config(Hubs, S1, HTMotor, HTMotor, HTServo, HTMotor)
