Mr. Phil, Thanks so much for putting up these videos. I'm trying to run it and I get some weird behavior. No matter the drive setting, the drive wheels go full speed. Even if the drive motor powers sent by telemetry show at 0.02 they all go full power. Seen this before? Any idea what's going on? Thanks, Gary Lindner
Hi. Yes. It sounds like you have not connected the motor encoder cables, or you have them crossed over and pluged into the wrong encoder inputs (not matching the motor they are connected to). The tutorial code puts the drive motors into RUN_USING_ENCODER mode which provieds better speed control. But it requires the encoders to be plugged in. If the encoders are not connected correctly, the software tries to drive the motor slowly, but because the Control Hub does not see the appropriate encoder counts, it ramps up the motor power. It will very quickly max out at full power. Also, if say, the left and right encoders are swapped, then the encoders will run in the wrong direction (because the left and right motor directions are flipped) so, once again the CH will correct by rampng up the speed. The alternative is to switch the motors to RUN_WITHOUT_ENCODER in the setupDriverMotor() method.
@@GEARSinc Hi Phil. Thanks for your response. I suspected this from previous experiences with runaway motors. However, I have carefully checked the wiring to verify the configuration, and it is correct. To make sure the encoder data was coming through for each correct motor, I put some telemetry sending the encoder values. They all were consistent. To make sure, I commented out three of the motors leaving only one operating and the motion and encoders matched. Could it be caused by a defect in a motor? One of them seems out of step occasionally, but I forget to note which one or I would have just swapped it out. What else could I try? I've propped the robot up so the wheels spin freely and they go fast. If I roll the axial encoder wheel an appropriate amount it stops, or even reverses to get back to the set value. But when I put it on the ground it just goes straight at full speed. I really appreciate your help. Thanks again, Gary
Mr. Phil, Thanks so much for putting up these videos. I'm trying to run it and I get some weird behavior. No matter the drive setting, the drive wheels go full speed. Even if the drive motor powers sent by telemetry show at 0.02 they all go full power. Seen this before? Any idea what's going on? Thanks, Gary Lindner
Hi. Yes. It sounds like you have not connected the motor encoder cables, or you have them crossed over and pluged into the wrong encoder inputs (not matching the motor they are connected to). The tutorial code puts the drive motors into RUN_USING_ENCODER mode which provieds better speed control. But it requires the encoders to be plugged in. If the encoders are not connected correctly, the software tries to drive the motor slowly, but because the Control Hub does not see the appropriate encoder counts, it ramps up the motor power. It will very quickly max out at full power. Also, if say, the left and right encoders are swapped, then the encoders will run in the wrong direction (because the left and right motor directions are flipped) so, once again the CH will correct by rampng up the speed. The alternative is to switch the motors to RUN_WITHOUT_ENCODER in the setupDriverMotor() method.
@@GEARSinc Hi Phil. Thanks for your response. I suspected this from previous experiences with runaway motors. However, I have carefully checked the wiring to verify the configuration, and it is correct. To make sure the encoder data was coming through for each correct motor, I put some telemetry sending the encoder values. They all were consistent. To make sure, I commented out three of the motors leaving only one operating and the motion and encoders matched. Could it be caused by a defect in a motor? One of them seems out of step occasionally, but I forget to note which one or I would have just swapped it out. What else could I try? I've propped the robot up so the wheels spin freely and they go fast. If I roll the axial encoder wheel an appropriate amount it stops, or even reverses to get back to the set value. But when I put it on the ground it just goes straight at full speed.
I really appreciate your help. Thanks again, Gary