Skip to content

❤️ (VCS/VTC+VCC) VitalPulse Message Timestamp in float type #13

@OppaAI

Description

@OppaAI

⚠️ Issue:

Non-Deterministic Temporal Reference (System Clock Coupling)
The use of float64 type in the Vital Pulse message

🎯 Location:

/robot/vp/VitalPulse.msg (timestamp field)
/server/vp/VitalPulse.msg (timestamp field)
/robot/vtc (Duration and RTT calculations)

🦠 Symptoms:

  • Loss Track of Time: If using unit of time (eg. second, nano-second) for storing timestamp, the other date time information (year, month, day, hour, minute) are not being recorded.

  • Inconsistent Units: .nanoseconds returns a float, whereas get_clock().now() or get_clock().now().to_msg() uses an integer-based Time object, leading to type-mismatch errors during RTT calculations.

  • Logic Failure: self.last_feedback_time = now logic in the monitor was failing to detect timeouts accurately because of unit confusion (seconds vs nanoseconds).

🩺 Diagnosis:

The use of time units instead of the actual time as timestamp created a Temporal Disconnect:

  • Standardization: float64 is not a standard ROS time format. It lacks compatibility with metadata tools and global clock synchronization.

  • Clock Drift: System time is susceptible to NTP updates and OS-level adjustments, which can cause negative RTT or "teleporting" timestamps.

💡 Proposal:

Refactor VitalPulse.msg to use builtin_interfaces/Time. Replace all instances of .nanoseconds with self.get_clock().now() and to_msg() to ensure the node respects ROS 2 time-scaling and simulation parameters.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

Status

Todo

Relationships

None yet

Development

No branches or pull requests

Issue actions