ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Instead of finding omega_left and omega_right to calculate v_left and v_right, You can calculate v_left and v_right from deltaLeft. ` double DistancePerCount = (2 * 3.14159265 * 0.05) / 1800; // (2PIr)/ppr double lengthBetweenTwoWheels = 0.25;

    deltaLeft = tick_x - _PreviousLeftEncoderCounts;
    deltaRight = tick_y - _PreviousRightEncoderCounts;

    v_left = (deltaLeft * DistancePerCount) / (current_time - last_time).toSec();
    v_right = (deltaRight * DistancePerCount) / (current_time - last_time).toSec();`

Instead of finding omega_left and omega_right to calculate v_left and v_right, You can calculate v_left and v_right from deltaLeft. ` deltaLeft.

 double DistancePerCount = (2 * 3.14159265 * 0.05) / 1800; // (2PIr)/ppr
(2*PI*r)/ppr
        double lengthBetweenTwoWheels = 0.25;

0.25;
     deltaLeft = tick_x - _PreviousLeftEncoderCounts;
     deltaRight = tick_y - _PreviousRightEncoderCounts;

     v_left = (deltaLeft * DistancePerCount) / (current_time - last_time).toSec();
     v_right = (deltaRight * DistancePerCount) / (current_time - last_time).toSec();`

Instead of finding omega_left and omega_right to calculate v_left and v_right, You can calculate v_left and v_right from deltaLeft.

        double DistancePerCount = (2 * 3.14159265 * 0.05) 0.065) / 1800; 2626; // (2*PI*r)/ppr
        double lengthBetweenTwoWheels = 0.25;


        deltaLeft = tick_x - _PreviousLeftEncoderCounts;
        deltaRight = tick_y - _PreviousRightEncoderCounts;

        v_left = (deltaLeft * DistancePerCount) / (current_time - last_time).toSec();
        v_right = (deltaRight * DistancePerCount) / (current_time - last_time).toSec();`