I am working on a robot project in which I use an arduino mega as the main processing unit, L298N h bridge module as the motor driver and motors like these in a differential drive configuration. I have a problem dealing with this robot which is simply that the open loop behavior is not consistent. For example, if I give the left and right motors the same PWM input, making sure that both motors have the same effective input (measured by a voltmeter), sometimes the robot goes straight ahead, and sometimes veers to the right.
This is a problem for me because I am trying to build a model for the robot's behavior (knowing the trajectory given the motor input voltages) and at some point I have to estimate the robot parameters (motor constants, robot inertia and other properties) using the parameter estimation toolbox in simulink. Having inconsistent behavior like this causes the estimated parameters to be strange and unrealistic.
Has anybody faced such a problem? what may be the potential causes? non reliable hardware? battery problems? terrain problems (or interaction with the ground)?
Thanks in advance.