GLOBAL KNOWLEDGE ARK

Robotics & Mechatronics · Commission one observed axis

Give one axis a direction, zero and unit

“Move positive” is incomplete until you know which direction is positive, where zero is and which unit the interface accepts. Establish these conventions with a small, inspectable one-axis record before interpreting any independent command.

All numerical tables, scenarios and records are original constructed teaching data unless a specific external dataset is named. No physical experiment is claimed. A worked simulation model is distinguished from an executed simulator.

Lesson preparation and course links

Use the local explanations and supplied units, diagrams, tables and examples; advanced chapters build on the named local chapters. External links are point-of-need depth, not a requirement to finish an entire map.

Back to the Robotics chapter

After reading, you can

Use an operational position convention to label the local axis and distinguish command units, sensor counts and observed motion; introduce the needed number-line and scale reasoning locally.

01

Put the rail on a number line

Stand at the declared observation side. In convention A1, positive x points to the right along the rail; zero is a fixed reference mark on the rail; positions are in millimetres. A carriage left of the zero can have a negative coordinate. The sign describes its location relative to the reference, not whether it is moving.

Displacement is final position minus initial position: Δx=x_final−x_initial. Moving from −5 mm to +7 mm gives +12 mm. Moving from +7 mm to −5 mm gives −12 mm. Distance travelled is nonnegative and can exceed the magnitude of net displacement if the axis reverses.

02

Convert a raw indication using a declared scale

For this constructed axis, reference count c0=1000 corresponds to x0=0 mm. The stipulated calibration is x=(c−1000)×0.050 mm/count. Subtracting the reference count gives a signed count difference; multiplying converts it to millimetres. The unit “count” helps track the conversion although counts themselves are discrete numbers.

At c=1600, x=600×0.050=30.0 mm. At c=1400, x=400×0.050=20.0 mm. Their displacement is −10.0 mm. The graph is a supplied calibration relationship; its straight line is not a claim that every real encoder installation has perfect linearity or zero uncertainty.

A declared count-to-position relationshipA1 convention: (600, -20); (1000, 0); (1400, 20); (1800, 40). Horizontal axis Raw encoder count / count; vertical axis Position x / mm. Straight segments join supplied samples; values between samples are not additional observations.600-20900-5120010150025180040Raw encoder count / countPosition x / mmA1 convention
A1 convention: (600, -20); (1000, 0); (1400, 20); (1800, 40). Horizontal axis Raw encoder count / count; vertical axis Position x / mm. Straight segments join supplied samples; values between samples are not additional observations.
03

Keep raw state separate from command units

The destination interface in this example accepts metres, while the human task and ruler use millimetres. An explicit conversion prevents a thousandfold mistake.

Keep raw state separate from command units
FieldExampleMeaning
Destination command0.030 mRequested 30 mm coordinate
Raw encoder1600 countIndication before calibration
Calibrated state30.0 mmPosition inferred with A1 scale and reference
Independent ruler29.8±0.3 mmSeparate constructed observation, not the command
Reference identityA1, c0=1000Convention and zero used for this interpretation
04

Use a reversal check to expose convention errors

A supplied small rightward displacement produces counts 1000→1100. Under A1, inferred displacement is +5.0 mm, agreeing with rightward positive. Returning to count 1000 gives −5.0 mm from the second point and returns to the original coordinate. This checks sign and return consistency in the supplied record; it does not measure absolute accuracy across the whole range.

If rightward motion instead produces 1000→900, raw count direction is opposite A1. The calibration needs a negative scale, x=−(c−1000)×0.050 mm/count, or a documented encoder-direction configuration change. Change one declared convention at a time, retain the old record and repeat the check. Do not reverse controller feedback casually: a sign error can make an active loop reinforce an error.

05

A new zero is a changed interpretation

A startup count of zero does not prove the carriage is physically at the rail zero. Relative encoders and counters can lose a previous reference after reset. A reference procedure relates an installed observation to the chosen physical datum; a software offset merely changes numbers until that relationship is established.

The count increment corresponds to 0.050 mm in the supplied model. That is scale resolution, not ±0.050 mm accuracy. Reference uncertainty, alignment, transmission behaviour and the measurement method remain. Later calibration lessons investigate these effects; the beginner requirement is to record rather than hide them.

Predict a reversal and convert the command

Initial count is 1500, so x_initial=(1500−1000)×0.050=25.0 mm. The requested destination is 10.0 mm, which must be sent as 0.010 m to this declared interface. The requested displacement is 10−25=−15 mm, or leftward under A1.

The expected final count for the stipulated calibration is 1000+10/0.050=1200. A supplied final count of 1210 implies x=10.5 mm, so the inferred endpoint error is +0.5 mm relative to the request. Neither the requested count nor the accepted destination establishes the actual endpoint.

If the carriage makes the same physical move but software changes the coordinate zero to the starting point, the coordinates become 0 and −14.5 mm for the supplied final indication; displacement remains −14.5 mm. A consistent translation of zero changes positions, not their difference.

Try the reasoning

  1. Counts change from 800 to 1300 under A1. Find both positions and displacement.

    Show the answer and reasoning

    Initial x=−10.0 mm, final x=15.0 mm, and Δx=+25.0 mm.

  2. A 40 mm destination is sent to an interface in metres as the number 40. What went wrong?

    Show the answer and reasoning

    The required number is 0.040 m. Sending 40 means 40 m, a factor of 1000 larger; the interface must reject out-of-range requests.

  3. Rightward ruler motion coincides with decreasing counts. Must the ruler be wrong?

    Show the answer and reasoning

    No. The raw encoder direction may be opposite the declared axis. Establish the sign relationship and reference before changing a control loop.

  4. A reset reports count 0 while the carriage has not moved. Has physical position become zero?

    Show the answer and reasoning

    No. The counter/reference state changed. Position relative to the rail datum needs re-established or retained reference evidence.

  5. The axis moves +5 mm and then −5 mm. Give distance and net displacement.

    Show the answer and reasoning

    Distance is 10 mm; net displacement is 0 mm. Return to the same indication does not alone prove absolute reference accuracy.

What to carry forward

Declare positive direction, physical zero, unit and raw-to-state conversion together. Check them by predicting a small signed change and its reversal.

References

Sources supporting this lesson’s explanations and examples.

  1. Robotic Manipulation, Chapter 2: Let's get you a robotRuss TedrakeUniversity course working notes2020–2026 working notesmanipulation.mit.eduRead source
  2. ros2_control: Hardware Components and hardware interface typesros2_control contributorsOfficial software documentationKilted, displayed October 2026 documentationcontrol.ros.orgRead source