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 chapterAfter 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.
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.
Define the achievement and its supplied physical model
Start at x=
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.
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.
Read the transition without writing code
The same table can drive a paper trace or a simulation. Evaluate validity before using the position.
| Current state | Input condition | Next state | Output |
|---|---|---|---|
| READY | Valid start; all preconditions true | MOVE | +20 mm/s |
| MOVE | Fresh valid x<70 mm | MOVE | +20 mm/s |
| MOVE | Fresh valid x≥70 mm | STOP_REQUESTED | Normal stop request latched |
| Active state | Invalid/stale required state | FAULT_RESPONSE | Declared module fault response |
| STOP_REQUESTED | Observed stop criterion met | STOPPED | No new move |
| STOPPED | No explicit new task | STOPPED | Remain in end state |
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.
| Time / s | x / mm | v / (mm/s) | Event |
|---|---|---|---|
| 0.00 | 20 | 20 | Idealised moving segment begins |
| 2.50 | 70 | 20 | Threshold seen; stop requested |
| 2.60 | 72 | 20 | Ramp begins after delay |
| 2.70 | 73.5 | 10 | Decelerating |
| 2.80 | 74 | 0 | Model reaches standstill |
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×
Final position is 70+2+2=
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
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.
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.
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.
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.
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.
- Gazebo Jetty: SensorsGazebo contributorsOfficial simulation tutorialJetty versioned documentation
- ros2_control: Hardware Components and hardware interface typesros2_control contributorsOfficial software documentationKilted, displayed October 2026 documentation
- Assembly Performance Metrics and Test MethodsNIST Intelligent Systems DivisionResearch program overview