GLOBAL KNOWLEDGE ARK

Robotics & Mechatronics · First achievement: sense, move, stop and explain

Build a complete sense-move-stop behaviour

A first complete robot behaviour needs a reason to change action. In this task, a valid position observation triggers a stop request while the carriage is moving. You can explain and assess the whole behaviour using a state table and supplied trace.

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

Combine one supplied sensor rule and bounded actuator interface into a complete task, with a local truth table or state chart and equivalent simulation/supplied-data paths.

01

Keep the whole robot connected

The component diagram shows the energy, command, motion and feedback paths used by this task. Follow the sensor return to the controller and the independent observation path before reading the state transitions.

Energy, command, motion and feedback pathsElectrical energy goes from supply to drive to motor, then mechanical motion passes through transmission to carriage. The controller sends commands to the drive. The carriage affects the sensor, which returns timestamped state to the controller. An independent ruler and clock observe the carriage for task acceptance. Losses and stored energy remain inside the relevant component boundaries.powerpowerrotationmotionsensed xstate + timecommandobservationSupplyelectrical energyDrivepower conversionMotorelectromechanicalTransmissionoutput couplingCarriagephysical taskSensorstate acquisitionControllerrule + commandRuler + clockindependent checkSolid: energy / motion · Dashed: commands / observations
Electrical energy goes from supply to drive to motor, then mechanical motion passes through transmission to carriage. The controller sends commands to the drive. The carriage affects the sensor, which returns timestamped state to the controller. An independent ruler and clock observe the carriage for task acceptance. Losses and stored energy remain inside the relevant component boundaries.
02

Define the achievement and its supplied physical model

Start at x=20 mm and move positive at a stipulated 20 mm/s. A valid sensor observation at x≥70 mm triggers a latched normal stop. The supplied drive model applies that request after 0.10 s, then decelerates at a constant 100 mm/s² to zero. The task criterion is final x≤75 mm and fresh state throughout the decision. These are original model inputs, not a protective-distance specification.

A rule answers “under this observed condition, what output follows?” A state remembers which part of the task has been reached. Without memory, a noisy threshold could alternate move and stop. Here STOP_REQUESTED stays latched until a separately authorised new task; moving back below 70 mm does not restart it.

03

Connect the rule to the complete system

The supply energises the drive and actuator, the transmission moves the carriage, and the sensor returns x with acquisition time and validity. The controller tests the threshold and sends the stop request. Independent task evidence includes the resulting position/speed record. A threshold event is not itself proof of stopped motion.

For invalid or stale data, the teaching state machine records FAULT_RESPONSE and follows its declared module response. The response must be tested for the actual configuration. An ordinary software rule is not a certified protective function.

Sense, move and stop transitionsREADY enters MOVE after a valid explicit start. MOVE remains while fresh x is below 70 mm. Fresh x at or above 70 mm enters latched STOP_REQUESTED; observed standstill enters STOPPED. Invalid or stale required data enters FAULT_RESPONSE. STOPPED holds until an explicit new task with current readiness checks returns to READY. Fault recovery requires supported state/reference and explicit new-task acceptance.valid explicit startfresh x ≥ 70 mmobserved stopinvalid / staleinvalid / staleinvalid / staleREADYreference + fresh state knownMOVEotherwise remain MOVESTOP_REQUESTEDnormal stop latchedSTOPPEDhold; no automatic new moveFAULT_RESPONSEdeclared module responseLeft return: explicit new task + current readiness checksRecovery separately gated
READY enters MOVE after a valid explicit start. MOVE remains while fresh x is below 70 mm. Fresh x at or above 70 mm enters latched STOP_REQUESTED; observed standstill enters STOPPED. Invalid or stale required data enters FAULT_RESPONSE. STOPPED holds until an explicit new task with current readiness checks returns to READY. Fault recovery requires supported state/reference and explicit new-task acceptance.
04

Read the transition without writing code

The same table can drive a paper trace or a simulation. Evaluate validity before using the position.

Read the transition without writing code
Current stateInput conditionNext stateOutput
READYValid start; all preconditions trueMOVE+20 mm/s
MOVEFresh valid x<70 mmMOVE+20 mm/s
MOVEFresh valid x≥70 mmSTOP_REQUESTEDNormal stop request latched
Active stateInvalid/stale required stateFAULT_RESPONSEDeclared module fault response
STOP_REQUESTEDObserved stop criterion metSTOPPEDNo new move
STOPPEDNo explicit new taskSTOPPEDRemain in end state
05

Explain a complete supplied run

This is an exact evaluation of the stipulated delay/deceleration model at selected times; no physical run or external simulator execution is claimed.

Explain a complete supplied run
Time / sx / mmv / (mm/s)Event
0.002020Idealised moving segment begins
2.507020Threshold seen; stop requested
2.607220Ramp begins after delay
2.7073.510Decelerating
2.80740Model reaches standstill
06

Produce equivalent evidence in either entry route

On paper, predict the transition, fill the state table and calculate the stopping position before reading the supplied run. In simulation, record the same initial conditions, threshold, delay, ramp and sensor timing; compare actual exported simulation values with the model prediction. A physical version needs the configured hardware’s own accepted bounds and observations.

Retain the connected diagram, prediction, acquisition/command timeline, endpoint test and a short explanation of a changed condition. Completion of this exercise establishes your analysis of a full sense-move-stop behaviour. Hardware qualification remains a separate claim.

Account for motion after the threshold

Delay travel is v×delay=20 mm/s×0.10 s=2.0 mm. Deceleration lasts v/a=20/100=0.20 s. Average speed during this constant ramp is (20+0)/2=10 mm/s, so braking travel is 10×0.20=2.0 mm.

Final position is 70+2+2=74 mm, within the stipulated 75 mm criterion. Total stop response after threshold is 0.10+0.20=0.30 s. The controller must continue observing during that interval; “stop requested” and “stopped” are different states.

If observation/threshold sampling adds further delay, include it separately. This calculation assumes the threshold is observed exactly at 70 mm and the supplied deceleration model holds. It does not bound real stopping distance on an unknown axis.

Try the reasoning

  1. At x=69.9 mm with valid fresh data, which state/output follows from MOVE?

    Show the answer and reasoning

    Remain MOVE with +20 mm/s under this supplied rule.

  2. At x=70.0 mm, does the carriage stop instantly?

    Show the answer and reasoning

    No. The stop is requested; the stipulated delay and ramp still allow 4 mm of motion.

  3. The sensor later reads 69.8 mm after STOP_REQUESTED. Does motion restart?

    Show the answer and reasoning

    No. The stop transition is latched until a separately accepted new task.

  4. What if the 70 mm reading is stale?

    Show the answer and reasoning

    Do not use it as a valid threshold decision. Enter the declared fault-response branch and retain the invalid-data evidence.

  5. Keep delay 0.10 s and deceleration 100 mm/s², but start the stopping calculation at 10 mm/s. Find extra travel.

    Show the answer and reasoning

    Delay travel 1 mm plus ramp travel v²/(2a)=0.5 mm, giving 1.5 mm under the same model assumptions.

What to carry forward

A complete behaviour links a valid observation to a state change, actuator response and independently assessed outcome.

References

Sources supporting this lesson’s explanations and examples.

  1. Gazebo Jetty: SensorsGazebo contributorsOfficial simulation tutorialJetty versioned documentationgazebosim.orgRead source
  2. ros2_control: Hardware Components and hardware interface typesros2_control contributorsOfficial software documentationKilted, displayed October 2026 documentationcontrol.ros.orgRead source
  3. Assembly Performance Metrics and Test MethodsNIST Intelligent Systems DivisionResearch program overviewnist.govRead source