0%

Real-time System

1. Definition

From ROS2 Design

  • Determinism
  • Deadline
  • Quality of Service

Real-time software guarantees correct computation at the correct time.

It needs 2 parts

  • Real time system
  • Real time code

KEY: DEADLINE Ref

  • Just finish the job before or after deadline

Real-time constraints in robotics 3/3

2. Coding

Low level code:

  • almost everything should be in real-time

Decision algorithm:

  • important to implement in some Key decision, like when to stop

Synchronization between devices

  • start the motor at the same time

3. Implementation Consideration

  • Using Deterministic algorithm
  • fixed-point arithmetic, state machines, and lookup tables.
  • Prioritize task
  • Tasks with lower priority can be preempted or delayed if necessary to allow high-priority tasks to be executed
  • This is typically achieved through the use of priority-based scheduling algorithms.
  • Use interrupts