exploration of environment
position estimation using robot pose
sensor values interpret (LIDAR, sonar, vision, etc.)
integration of sensor values into map (based on distance from robot and pose estimation of robot)
Simultaneous Localization and Mapping (SLAM)
which came first: the egg or the chicken?
robot wants to go from point A to point B: but it does not know what the world looks like?
so it needs a map
but what if there is no map?
try to build a map when there is no map!


wheels -> odometry
if humanoid robot then joints
IMU inertial measurement unit
odometry: key to robotics platforms
odometry assumption: robot should know where is origin (0,0,0)
for vacuum cleaner, it is charging point. can self localize from there
all sensor input goes to build occupancy map
🤔 ❓ what is the problem?
relying too much on odomtery
can be slippage, etc
self localizing due to odometry can be problematic
every rotation adds up
map can be erroneous
dead reckoning (early days of flight)
v = d/t has a clock, how much distance travelled in a time period
look for a particular direction on compass
and then look for a landmark
LondonEye is a landmark for flights
correct for drift
greater the distance between landmarks, the greater the drift
can miss landmark

static
vacuum robot : not move chairs
distinct landmarks and unique locations (QR codes, colours)
database of landmarks with locations
weights landmark more than odometry and then update location
equations

🤔 ❓ imagine you have been asked to design a vacuum robot that will work in an office with glass doors. what problems will you face?
problem with laser: can shine through, narrow beam
glass may refract
with glass room, use ultrasound
design issues in industry: vacuum robot in glass offices, but office may have glass
combinations of sensors
landmarks may look similar
building a robotic tour guide (in Legoland)
landmarks locations known and do not move


particles generated
Initialization: The robot starts with no prior knowledge, so it scatters potential positions (particles) uniformly across the map.
Prediction: As the robot moves, it uses its motion model, combined with added random noise to account for uncertainty, to propagate all particles.
Correction: The robot takes sensor measurements (e.g., via Lidar). Each particle predicts what it would measure. Particles whose predictions closely match the actual measurements are given a high “importance weight.”
Resampling: A new set of particles is formed, favouring those with high weights. This effectively eliminates unlikely hypotheses and duplicates the most plausible ones
Convergence: The process repeats, and over multiple cycles, the cloud of particles converges on the robot’s actual pose.


🤔 ❓do you have a particle filter in your brain?
you are in a room and you lose the power and lights. how would you navigate?
you generate hypotheses, you start feeling, probing, feel the edge of the bed
generate hypotheses, get data and test these hypotheses
geometry of the environment becomes features that the particle filter will use
NAVIGATION2LIDAR node also created
🤔 ❓what if there is a featureless environment (marine/ocean)?
clock (sun), compass, weather, underwater features, celestial navigation
underwater autonomous mapping, drill through ice, collect data on ecosystems
how do you solve this problem?
rely on IMU
sonic/acoustic signals localize underwater


AR codes
Detect features like corners
Look at same object from different frames and infer
motion of object (while tracking AR code)
similar to augmented reality where you are (say) visualizing a dinosaur from different directions as you move around the room
monocular SLAM (one camera system)
with binocular system, you can use disparity between two images to get depth of objects
IR camera
An IR time-of-flight (ToF) camera emits infrared light and measures how long it takes for the light to travel to an object and back to the sensor. Since light travels at a known speed, the measured travel time gives the distance:
Depth = (speed of light × round-trip time) / 2
The camera therefore produces a depth map, where each pixel contains the distance to the corresponding point in the scene. In visual SLAM, this depth information helps the robot estimate 3D structure and its own position without relying solely on stereo correspondence or monocular scale estimation.

these are called RGBD cameras (D for depth)
IMU has accelerometer and gyroscope
by combining them you can have visual inertial SLAM or visual inertial odometry
distance between two cameras in binocular must be known
opencv
initialization step known target
smooth motion model
feature tracking
direct method use all information from frame to infer which direction camera is moving and infer odometry


there are different kinds of SLAM that uses direct or indirect method
Recap: visual SLAM builds a map using visual features and self-localizes in the map
by moving the camera, we can detect the depth of objects
you can then project things into the environment (Pokemon)