This repo is for driving a differential-drived robot.

Dependencies:   mbed ros_lib_kinetic_1 Encoder

odometry.h

Committer:
r08522622
Date:
2021-03-10
Revision:
0:b21301d612b9

File content as of revision 0:b21301d612b9:

class Odom{
    public:

        Odom();
        // Hardware Parameters
        float radius;
        float width;

        // pose & velocity
        float x;
        float y;
        float th;
        float vx;
        float vy;
        float vth;

        // Calculation Parameters
        float enc_left;
        float enc_right;
        float delta_distance_left;
        float delta_distance_right;

        // functions
        void init();
        void get_vel(float v, float w);
        void get_distance(float new_enc_left, float new_enc_right);
        void odom_calculation();

};