AUTONOMOUS SYSTEMS /// MODULE 1 /// SENSE THINK ACT CYCLE /// ROBOTICS /// AUTONOMOUS SYSTEMS /// MODULE 1 /// SENSE THINK ACT CYCLE ///

Sense-Think-Act

The core architectural loop of every autonomous agent. Learn how hardware and algorithms unite to create artificial motion.

robot_core.py
Seq 1 / 11
12345
🤖

System:Every autonomous robot, from Roombas to Self-Driving Cars, relies on a fundamental loop to interact with the world: The Sense-Think-Act cycle.


Architecture Matrix

UNLOCK MODULES BY MASTERING THE CYCLE.

Subsystem: Sense

Gathering physical data using hardware like cameras, LiDAR, and IMUs, and converting it to digital arrays.

Diagnostic Check

Which sensor is primarily used to measure the robot's own acceleration and orientation?


Operator Network

Robotics Fleet Control

ONLINE

Stuck on inverse kinematics? Built a cool pathfinder algorithm? Connect with other engineers.

The Sense-Think-Act Cycle:
The Robot Brain

Author

Pascual Vila

Robotics Instructor // Code Syllabus

Intelligence in a machine isn't magic. It is a rapid, continuous execution of three simple steps: Perceiving the environment, deciding what to do about it, and making a physical change.

1. Sense (Perception)

A robot is blind and deaf until it reads data from its sensors. This phase bridges the physical world to the digital one. Sensors measure physical properties and convert them into electrical signals (usually voltages or I2C/SPI data).

Hardware: Cameras (Vision), LiDAR (Lasers for 3D mapping), Encoders (Measuring wheel rotation), IMUs (Accelerometers & Gyroscopes).

2. Think (Processing & Planning)

Data alone is useless without processing. The 'Think' phase cleans the sensor data (removing noise), updates the robot's internal map, and runs algorithms to figure out the next best action.

This is where Artificial Intelligence, Path Planning (like A* or Dijkstra), and Control Theory live. The brain calculates the exact speeds needed for the left and right wheels to dodge a moving object.

3. Act (Execution)

Once a decision is made, the robot must affect the real world. Microcontrollers send signals (like PWM - Pulse Width Modulation) to motor drivers, which in turn send high-voltage power to the actuators.

  • Locomotion: Wheels, tracks, or legs moving the robot.
  • Manipulation: Robotic arms grasping objects.

⚙️ Core Diagnostics (FAQ)

What happens if a robot skips the "Think" phase?

A system that skips the "Think" phase is not a robot; it is a simple reactive mechanism (like a light-activated switch or a basic thermostat). The "Think" phase allows for complex decision-making, planning, and adapting to unforeseen obstacles.

How fast does the Sense-Think-Act cycle run?

It varies heavily based on the application. A slow rover might run at 10Hz (10 times a second), while a drone stabilizing itself mid-air might run its control loops at 500Hz to 1000Hz to prevent crashing. The rate must be fast enough to react to environmental changes before they cause a failure.

Are PID Controllers part of Sense, Think, or Act?

PID (Proportional-Integral-Derivative) controllers strictly belong to the Think phase. They take the error (difference between desired state and actual sensed state) and calculate the mathematical output needed. That calculated output is then sent to the Act phase.

Robotics Databank

Actuator
A mechanical device that moves or controls a mechanism or system (e.g., Motors, Servos).
lib_ref.py
motor_left.set_speed(150)
LiDAR
Light Detection and Ranging. A sensor that uses lasers to create high-resolution 3D maps of the environment.
lib_ref.py
point_cloud = lidar.scan()
PWM
Pulse Width Modulation. A technique to simulate analog output using digital signals, heavily used to control motor speeds.
lib_ref.py
pwm.set_duty_cycle(75%)
Kinematics
The study of motion without considering forces. How wheels turning translates to X/Y movement in space.
lib_ref.py
x = velocity * cos(theta)
Sensor Fusion
Combining data from multiple sensors (e.g., GPS + Accelerometer) to get a more accurate estimate of state.
lib_ref.py
state = kalman_filter(gps, imu)
Control Loop
The continuous execution of Sense-Think-Act to maintain a desired state or trajectory.
lib_ref.py
while True: cycle()