View unanswered posts | View active topics It is currently Sun Sep 23, 2018 1:47 pm






Reply to topic  [ 3 posts ] 
Robot will not go straight 
Author Message
Rookie

Joined: Wed Apr 01, 2015 9:11 am
Posts: 2
Post Robot will not go straight
Hello, all.
While I was programming my robot, I realised that the forward movements the robot was making were curving. I have a simple forward, turn, then forward again program. I am using 2 driving motors, 1 arm motor, 1 claw motor, and a GyroSensor.
My platform is VEX IQ.

Code:
Code:
   
  resetMotorEncoder(leftMotor);
  resetMotorEncoder(rightMotor);
  forward(375, degrees, 127);
  //Forward
 
  resetGyro(gyroSensor);
  repeatUntil(getGyroDegrees(gyroSensor) > 90)
  {   
     setMotor(leftMotor, -50);
     setMotor(rightMotor, 50);
  }
  //Use Gyro to make a 90 Degree turn
 
  resetMotorEncoder(leftMotor);
  resetMotorEncoder(rightMotor);
  forward(2000, degrees, 127);
  //Forward
 
 
}


Wed Apr 01, 2015 9:25 am
Profile
Site Admin
Site Admin

Joined: Thu May 24, 2012 12:15 pm
Posts: 722
Post Re: Robot will not go straight
Try running just the forward movement, but at a slower speed:

Code:
forward(1000, degrees, 50);


While I was not able to replicate the curving movement with the forward command, the robot did tend to jerk to one side or the other when it started its movement. This is because the robot is starting at a dead stop and is immediately accelerating to full speed (power level 100).

To resolve this, try running at a slightly slower speed as this should help eliminate any unintended movements caused by the high motor speeds.

_________________
Check out our Blog! And our Facebook page!
Need help? Take a look at our updated help documentation and the ROBOTC Forums.


Wed Apr 01, 2015 10:27 am
Profile
Rookie

Joined: Wed Apr 01, 2015 9:11 am
Posts: 2
Post Re: Robot will not go straight
Thanks for the reply.
I figured out that my problem was with the build of the robot, which I got fixed.
Thanks.


Thu Apr 02, 2015 2:17 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 3 posts ] 

Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  



Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.