Unit 02 · overview
Bridge Review: Typed Sensor Evidence and Units
This route no longer reteaches Java primitive types from scratch. java-programming is the prerequisite for declarations, numeric types, strings, expressions, and basic methods.
The bridge question is narrower:
When Java state and a ROS 2 message describe related sensor information, what evidence belongs to each layer and what claim can safely cross the boundary?
Use the robot case to verify prerequisite knowledge, then focus on:
- unit-bearing Java state such as
frontRangeMeters; - source and timestamp/context of a reading;
- ROS message type and field meaning;
- conversion or range assumptions;
- the difference between a valid value and a safe physical conclusion.
A Java double containing 0.42 is JVM evidence. A ROS message reporting range: 0.42 is ROS runtime/message evidence. Matching values do not prove that one produced the other, and neither one alone proves the robot is safe to move.
Required artifact
Produce a compact Sensor Evidence Record containing the Java representation, unit, ROS interface/field, one observed or supplied message value, one validation rule, and one explicitly unsupported physical claim.
If Java type mechanics are the hard part, return to java-programming before continuing. This bridge assumes those mechanics are already active.