Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1061479
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T18:28:44+00:00 2026-05-16T18:28:44+00:00

I have a differential drive robot, using odometery to infer its position. I am

  • 0

I have a differential drive robot, using odometery to infer its position.

I am using the standard equations:

WheelBase = 35.5cm;
WheelRadius = 5cm;
WheelCircumference = (WheelRadius * 2 * Math.PI);
WheelCircumferencePerEncoderClick = WheelCircumference / 360;

DistanceLeft = WheelCircumferencePerEncoderClick * EncoderCountLeft
DistanceRight = WheelCircumferencePerEncoderClick * EncoderCountRight

DistanceTravelled = (DistanceRight + DistanceLeft) / 2
AngleChange (Theta) = (DistanceRight - DistanceLeft) / WheelBase

My (DIY) chassis has as a slight feature, where over the course of the wheel base (35.5cm), the wheels are misaligned, in that the left wheel is 6.39mm (I’m a software person not a hardware person!) more ‘forwards’ than the right wheel. (The wheels are the middle of the robot.)

I’m unsure how to calculate what I must add to my formulas to give me the correct values.. It doesn’t affect the robot much, unless it does on the spot turns, and my values are way off, I think this is causing it.

My first thought was to plot the wheel locations on a grid, and calculate the slope of the line of their positions, and use that to multiply… something.

Am I on the right track? Can someone lend a hand? I’ve looked around for this error, and most people seem to ignore it (since they are using professional chassis).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T18:28:45+00:00Added an answer on May 16, 2026 at 6:28 pm

    The correction must be made to the formula for AngleChanged, as follows:

    Take L and R to be the distances traveled by the left and right wheels, respectively, in one tick.
    Let B denote the length of the nominal wheelbase (not the length of your skewed one).
    Let E represent the left wheel error. That is, the distance the left wheel is offset forward from its ideal position.
    We seek to find θ, the change in the angle of the wheelbase in one tick.

    First, (pre)-calculate the angle between the skewed wheelbase and the ideal wheelbase:

    φ = arctan(E / B).

    Using some elementary geometry (I can post details if you desire), we may calculate theta as follows:

    σ = arctan( ( E+ L – R) / B )
    θ = φ – σ

    Seeing as this reduces to your previous implementation when E=0, and has intuitively understandable results as E -> +inf., our formula seems correct.

    NOTE:
    You probably want to do away with that computationally ugly arctangent in your calculation of σ (sigma). In situations as these, it’s common practice (indeed, you used it in your previous formulas) to use the approximation arctan(x) = x, for small x.
    The problem here is that while the quantity (L-R)/B is likely to be quite small, the error addition E/B may grow unacceptably large. You can try calculating sigma by just doing away with the arctan and using sigma = (E+L-R)/B, but if you want a better approximation you should use the first-order taylor series for arctan(a+x) around 0:

    arctan(a+x) = arctan(a) + x/(1 + a^2)

    Applied to the calculation of sigma, the approximation now looks such:

    σ = arctan(E / B) + (L – R) / (B + E^2 / B)

    Notice that the arctan(E / B) has already been precalculated as φ. This is a much better approximation for sigma, which should yield more exact calculations for theta.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some differential equations that I need to solve using MATLAB's ODE solvers.
Due to DSolve syntax, systems of differential equations have to be given as lists
Have just started using Google Chrome , and noticed in parts of our site,
Have just started using Visual Studio Professional's built-in unit testing features, which as I
I have a differential operator that acts on two functions. To simplify the problem
I have full weekly backups, daily differential backups and hourly transaction log backups. To
I have scheduled backups running through SQL Agent, with Full Backups nightly, and differential
I have gyroscope + accelerometer data at each time period T . Using C++,
I have make Some Differential Backup for a Database, which will take the Backup
I have multiple processes UDP multicasting to each other messages.I am using recvfrom() to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.