Robot Navigation

Introductary session

23th August 2019

Swapnil Kalhapure

Things we gonna learn..!

  • Basics of mobile navigation 
  • Pre-requisites 
  • Localization
  • Mapping
  • Path planning
  • Navigation techniques
  • References

Basics First

What is the fuss about!

Purpose

  • The ability to navigate in its environment, avoiding dangerous situations such as collisions and unsafe conditions (temperature, radiation, exposure to weather, etc.).

  • If the robot has a purpose that relates to specific places in the robot environment, it must find it.

Purpose

  • Robot navigation means the robot's ability to determine its own position in its frame of reference and then to plan a path towards some goal location.

  • In order to navigate in its environment, the robot or any other mobility device requires representation, i.e. a map of the environment and the ability to interpret that representation.

Basic blocks

Key Idea :

  1. Understanding
  2. Deciding
  3. Go for it

Objective of robot navigation

  • Perception - mapping
  • Localization  - finding its place
  • Cognition - planning
  • Motion Control - executing the plan

Pre-requisites

Somethings we all need to understand.

Navigation pre-requisites

  • Robot construction
  • Robot locomotion
  • Robot motion model
  • Sensing technology
  • Sensor Fusion  
  • Actuation technology
  • State Management

Robot Construction

Robot's mechanical specifications

  • URDF: Unified Robot description format.

  • SRDF: Semantic robot description format.

  • kdl_parser: a kinematic and dynamic model from a urdf robot description.

  • convex_decomposition: A tool to auto-generate convex decomposed meshes for collision and visualization of robot links.

  • collada_urdf: A package to convert urdf files into collada files.

6

Robot Construction

URDF :

  • Specifies only kinematic and dynamic model of the robot.
  • Properties of a single robot in isolation.
  • Can specify Visual-Collision-Interial-Joint properties

SRDF :

  • Specifies everything from the world level to the robot level properties.
  • Plug and play dynamics engines.
  • Can specify real-world physical properties like friction, joint loops etc.

Robot Locomotion

Robot's drive mechanism specifications :

  • How does the robot move.? or Locomotion
  • Holonomic or Non-Holonomic drive.
  • Holonomic constraints reduce the configuration space.
  • Holonomic drives use Omni-wheels sort of drives. Example : Synchronous Drive.
  • Non-holonomic constraints reduce the
    control space with respect to the current
    configuration.
  • Non-holonomic example : Differential drive and Ackerman steering
6

Holonomic drive

Motion Models

Robot's motion specifications :

  • Robot motion is inherently uncertain! How can we model this uncertainty? a.k.a. probabilistic kinematics model.

  • Often finds two types of motion models:

    • Odometry-based.

    •  Velocity-based.

  • ​Odometry-based models are used when systems are equipped with position feedback sensors.

  •  Velocity-based models have to be applied to calculate the new pose based on the velocities and the time elapsed.

6

Motion Model

Odometry based motion model :

  • Technically, odometry is sensor measurements, not controls.
  • Odometry is only available after executing a motion command.
  • Most commercial robots do not execute velocity commands with the level of accuracy that can be obtained by measuring the revolution of the robot's wheels.
  • No estimate for uncertainty.
 

Velocity-based motion model :

  • Dead Reckoning - Derived from “deduced reckoning.”
  • Achieved by calculating the current pose of the vehicle based on its velocities and the time elapsed.
  • commercial mobile robots are actuated by independent translational and rotational velocities or are best thought of being actuated in this way.

Sensing technologies

Robot's sensor devices specifications

  • Helps is discretizing real-world physical quantities.

  • Sensing is proximation only, will always be noisy.

  • Sensor data is usually subjected to post-processing, as in image processing, signal processing, etc.

  •  3D vision, Lidar, Radars, Wheel encoders, IMU, monocular cameras, bump switch, etc.

6

Sensor Fusion

Robot's sensory data fusion

  • Combining of sensory data or data derived from disparate sources such that the resulting information has less uncertainty than would be possible when these sources were used individually.

  • Uncertainty reduction.

  • Direct fusion is the fusion of sensor data from a set of heterogeneous or homogeneous sensors, soft sensors.

  • Indirect fusion uses information sources like a priori knowledge about the environment and human input.

 
3
6

Sensor Fusion

  • Sensor fusion is the art of combining multiple physical sensors to produce accurate "ground truth", even though each sensor might be unreliable on its own

  • Blind spots get smaller the more sensors you have

  • But the math gets harder in order to deal with the resulting fuzziness

  • Modern algorithms for doing sensor fusion are “Belief Propagation” systems—the Kalman filter being the classic example

6

Actuation technology

  •  An electromechanical device which converts energy into mechanical work.
  • Hydraulic, pneumatic, electrical, electromechanical, thermal, magnetic, soft actuator.
  • Electromechanical devices that can achieve the accurate rotational or linear transformation of two bodies.
  • Materials that go physical transformation through interaction with electrical or mechanical input like piezoelectric, shape-memory alloy.
6

State Managment

  • States represent all the possible outcomes of a robot interacting in an environment.
  • Usually, in an ideal situation, all the robot states can be mapped.
  • But, though we have certain fixed states of robot behavior, the environment it interacts within always uncertain.
  • States treated as equal alternatives.
  • State is discrete, but control signal is continuous.
6

Localization

Understand where you are!

Localization  

  • Where am I?

 

  • Robo-centrically, where am I, keeping in mind that "here" is relative to some landmark.

 

  •  Prior knowledge of the robot itself.

 

  • most fundamental competencies required by an autonomous robot.

Pre-requisites for localization

  • Robot model
    • Mathematical models describing the behavior of the robot.
  • Sensor model
    • Mathematical models describing the sensor mounts of the robot and their behavior.
  • Environmental model (Optional)
    • Terrain information before localization.

Challenges for localization

  • Sensor Noise
    • A limitation on the consistency of sensor readings in the same environmental state.
  • Sensor Aliasing
    • The non-uniqueness of sensors readings, or sensor aliasing, is the norm and not the exception.
  • Effector Noise
    •  a single action taken by a mobile robot may have several different possible results, even though from the robot’s point of view the initial state before the action was taken is well-known.
2
 Advanced issues found
 

Knowledge-based localization

  • Probabilistic map-based localization.
    • Markov localization
    • Kalman filter localization

 

  • Landmark/feature based localization technique.

 

Behaviour-based localization 

  • Marker/feature based localization.

 

  • Ad-hoc relative localization techniques.

 

  • Proprioceptive localization techniques.
General schematic for mobile robot localization

Probabilistic map-based localization

Markov 

  • Tracks the robot’s belief state using an arbitrary probability density function to represent the robot’s position.
  • Belief representation by first tessellating the robot configuration space into a finite, discrete number of possible robot poses in the map.
  • The entire perception is used to update each possible robot position in the belief state individually.
  • Heavy computation required. Ideal only for recovery behaviors and kidnap problem scenarios.

Kalman filter

  •  Application of the Kalman filter to localization requires posing the robot localization problem as a sensor fusion problem.
  • Perception update using a Kalman filter is a multi-step process.
  • The Kalman filter is used to fuse the distance estimate from each feature to a matching object in the map.
  • Won't work when there is a drastic change in the map/environment.
  • Less computation compared and faster results.

Landmark-based navigation

  • Generally defined passive objects in the environment that provide a high degree of localization accuracy when they are within the robot’s field of view.
  • Mobile robots that make use of landmarks for localization generally use artificial markers to make localization easy.
  • Consists of two discrete phases.
    • landmark is in view, the robot localizes frequently and accurately
    • the robot is in no landmark "zone" , the robot accumulates position uncertainty until the next landmark
6

Positioning Beacon systems

  • One of the most reliable solutions to the localization problem is to design and deploy an active beacon system specifically for the target environment.
  • This is the preferred technique used by both industry and military applications as a way of ensuring the highest possible reliablility of localization.
  • The GPS system can be considered as just such a system.
  • advantage of such beacon-based systems is usually extremely high engineered reliability.
6

AMCL - ROS

  • Probabilistic localization system for a robot moving in 2D
  • adaptive Monte Carlo localization approach, which uses a particle filter to track the pose of a robot against a known map
6

Mapping

Learn how the world looks

Robot Mapping

  • Concerned with developing techniques that enable a mobile robot to construct and maintain a model of its environment based on spatial information gathered over time.
  • The spatial information stems from directly perceiving the environment through external sensors. In addition, internal sensors like odometry provide information about the change of location within the environment
  • Most approaches to robot mapping are incremental, in the sense

            Localization step -> data association step - > position update 

 
6

Robot Mapping

  • A challenging problem because of the uncertainty inherent in the available spatial information and in the model itself, which always is an approximation of the real world.
  • Representation approach falls into one of three main classes: occupancy grids, geometric maps, or landmark-based maps
  • Comparing different approaches to mapping problem on a theoretical level is a rather difficult, for the huge variety of ways in which space can be represented without clear criteria for what makes a good or even optimal representation
6

Robot Mapping

  •  Three fundamental tasks for future mobile robot applications: the tasks of
    • navigation,
      • localization
      • path planning
    • systematic exploration,
    • communication about space
  • Correctness, Consistency, and Criteria for Evaluating Spatial Representations
    •  Extractability and Maintainability
    • Information Adequacy
    • Efficiency and Scalability
 

Occupancy grids

  • Represent occupied and free parts of space equitably by decomposing space into cells and storing for each cell whather it is (at least partially) occupied or (entirely) free.
  • The decomposition is independent of the distribution of objects in space and uniform in the sense that all cells have the same shape and size.
  • Dominant decomposition approach employed in robot mapping is the grid map, in which (in the 2D case) a square-shaped raster is used and which allows a simple mapping of locations in the world given in the form of coordinates
6

Geometric Representation

  • use parameterized primitive geometric objects, i.e., points, lines, curves, planes, etc.
  • geometric representations can represent arbitrary environments as long as geometric primitives are employed that allow us to approximate the shapes of object boundaries sufficiently well.
  • Example :  Robot HILARE.The line segments are extracted from sonar range data while the robot moves around. Every time a line segment has been detected, it is matched to the model. If a suitable match is found, its parameters are updated accordingly. Otherwise a new line segment is added to the model
6

Landmark Representations

  • Represent the world as a set of salient objects (the landmarks) extracted from the sensor data
  • a.k.a. feature-based representations
  • Find simple point-like landmarks that are easy to extract from camera data or range data, or artificial beacons often with a unique ID allowing for unambiguous identification.
  • Purely artificial landmarks are used like markers
6

ROS Mapping techniques

Gmapping :

  • ROS wrapper for OpenSlam's Gmapping
  • Localization and mapping
  • Can create a 2-D occupancy grid map (like a building floorplan) from laser and pose (odometry) data collected by a mobile robot
  • http://wiki.ros.org/gmapping

Hector :

  • Can be used without odometry as well as on platforms that exhibit roll/pitch motion (of the sensor, the platform or both) for 2D maps
  • Does not provide explicit loop closing ability
  • http://wiki.ros.org/hector_mapping

Cartographer :

  • real-time simultaneous localization and mapping (SLAM) in 2D and 3D across multiple platforms and  sensor configurations.
  • ROS wrapper, originally written in lua script.
  • http://wiki.ros.org/cartographer

Map stores

  • Map_server provides the map_server ROS Node, which offers map data as a ROS Service.
  • It also provides the map_saver command-line utility, which allows dynamically generated maps to be saved to file.
  • Occupany grid store for 2D maps
  • Generates a equivalent 2D image
6

Navigation Planning

Let's search a path to the goal!

Planning strategies

  • Configuration Space
  • Global planning strategies
  • Combinatorial Planning
  • Sampling-Based Planning
  • A*, Any-Angle A*, D*/D* Lite
  • Local planning
  • Dynamic-Window Approach (DWA)
  • Markov Decision Processes (MDP)

Problem of Motion planning

The problem of motion planning can be

stated as follows. Given:

  • A start pose of the robot
  • The desired goal pose
  • A geometric description of the robot
  • A geometric description of the world

 

Find a path that moves the robot

gradually from start to goal while
never touching any obstacle

2
6

Configuration Space 

  • A robot configuration q is a specification of the positions of all robot points relative to a fixed coordinate system.
  • Usually a configuration is expressed as a vector of positions (translation) and orientations.
  • Position X-Y-Z
  • Orientation R-P-Y or X-Y-Z-W
  • Velocities X-Y-Z
  • Acceleration X-Y-Z-R-P-Y 
6

C-Space Discretizations 

Combinatorial planning :

  • Characterizes C-free explicitely by capturing the connectivity of C-free into a graph and finds
    solutions using search
  • Generally graph based approch
    • Visibility graphs
    • Voronoi diagrams
    • Approximate cell decomposition ​

Sampling-based planning :

  • Leave the algorithm in the dark when exploring C-free
  • The only light is provided by a collision-detection algorithm, that probes C to see whether some configuration lies in C-free.
    • Probabilistic road maps
    • Rapidly exploring random trees

Combinatorial planning

C- Planning :

  • Combinatorial planning techniques are
    elegant and complete
  • they find a
    solution if it exists, report failure otherwise.
  • But: become quickly intractable when
    C-space dimensionality increases.

Visibility graph methods

Voronoi Diagram methods

Sampling-Based Planning

Probabilistic Road Maps

  • Take random samples from C,
    declare them as vertices if in C-free, try to
    connect nearby vertices with local planner

  • The local planner checks if line-of-sight is
    collision-free (powerful or simple methods)

  • Options for nearby: k-nearest neighbors
    or all neighbors within specified radius

  • Configurations and connections are added
    to graph until roadmap is dense enough

  • Do not construct C-space Do not work well for some problems, narrow passages

6

Rapidly Exploring Random Trees (RRT) :

  • Idea: aggressively probe and explore the C-space by expanding incrementally from an initial configuration q-0
  • The explored territory is marked by a
    tree rooted at q0

  • Most modern-day planners use it, computational efficient.

  • planners are more efficient in most practical problems but offer weaker guarantees

  • They are probabilistically complete: the probability tends to 1 that a solution is found if one exists (otherwise it may still run forever) 

6

Sampling-Based Planning

Global Path search

Uninformed search

  • besides the problem
    definition, no further information about the
    domain ("blind search").
  • The only thing one can do is to expand nodes differently .
  • Example algorithms: breadth-first, uniform-cost, depth-first,etc.

Informed search :

  •  further information about the domain through heuristics
  • Capability to say that a node is "more promising" than another node
  • Example algorithms: greedy best-first search, A*, many variants of A*, D*, etc. 

The problem of search: finding a sequence of actions (a path) that leads to desirable states (a goal)

Cost maps 

  • Takes in sensor data from the world, builds a 2D or 3D occupancy grid of the data (depending on whether a voxel-based implementation is used)
  • Inflates costs in a 2D cost map based on the occupancy grid and a user-specified inflation radius.
  • Provides a configurable structure that maintains information about where the robot should navigate in the form of an occupancy grid.
  • each cell in the costmap can have one of 255 different cost values representing only three states : Occupied, Free, and Unknown Space
6

ROS Global Path Planner

ROS Carrot Global Path Planner

Plan Execution

Let's reach the goal!

Final stage controllers

  • Local planner / trajectory controller
  • Obstacle detection
  • Static obstacle avoidance
  • Dynamic obstacle avoidance
  • Control signal generation

Local Planner

  • local robot navigation on a plane
  • Given a plan to follow and a costmap, the controller produces velocity commands to send to a mobile base
  • Serves to connect the path planner to the robot
  • Along the way locally around the robot generate a value function, represented as a grid map,which encodes the costs of traversing through the grid cells.
  • Most used approaches :
    • Trajectory Rollout
    • Dynamic Window approaches
 
6

DWA Local planner

Idea:

  • Discretely sample in the robot's control space (dx,dy,dtheta)
  • For each sampled velocity, perform forward simulation from the robot's current state to predict for some time.
  • Evaluate (score) each trajectory resulting from the forward simulation,
  • Using a metric that incorporates characteristics such as: proximity to obstacles, proximity to the goal, proximity to the global path, and speed.
  • Pick the highest-scoring trajectory
  • Rinse and repeat.

ROS Local Planners

base_local_planner 

  • A generalized local planner with API's.
  • Comes with some builtin features like Oscillation Suppression, TrajectorySampleGenerator.
  • Most stable C++ and ROS API's

dwa_local_planner:

  • DWA implementation for local planner.
  • DWAROSPlanner API.
  • Can specify real-world physical properties like friction, joint loops etc.

teb_local_planner :

  • underlying method called Timed Elastic Band locally optimizes the robot's trajectory with respect to trajectory execution time.
  • Planner with dynamic obstacle avoidance.

asr_ftc_local_planner:

  • Follow the carrot planner.
  • parameters for this planner are also dynamically reconfigurable

eband_local_planner:

  • Planner supports holonimic drive controller.
  • Implements Elastic Band method

Collision Avoidance 

This can be handled by techniques called
collision avoidance (obstacle avoidance)

  • An approximate global planner computes paths ignoring the kinematic and dynamic vehicle constraints
  • Accurate local planner accounts for the constraints and generates (sets of) feasible local trajectories ("collision avoidance")
  • A well researched subject, different approaches exist:
    • Dynamic Window Approaches
    • Nearness Diagram Navigation
    • Vector-Field-Histogram
    • Extended Potential Fields
1
6

Collision avoidance

DWA approach :

  •  Two main components,
    • First generating a valid search space,
    • Second selecting an optimal solution in the search space.
  • The optimization goal is to select a heading and velocity that brings the robot to the goal with the maximum clearance from any obstacle.
1

Nearest diagram approach  :

  • Defined by the state of Set of Situations and divided by set of Criterions.

Collision avoidance

Vector Field Histogram:

  •  Also known as Virtual Field Force.
  • Each active cell exerts a virtual repulsive force toward the robot.
1

Extended potential Fields  :

  •  Force vector field F computed as the negative gradient of the potential field

Navigation Strategies

We need a plan!

Techniques

  • ROS Nav stack
  • Navigation Strategies
  • SLAM

ROS NavStack

  • Implementation of an action that, given a goal in the world, will attempt to reach it with a mobile base.
  •  links together a global and local planner to accomplish its global navigation task
  • Supports plug and play planners, map stores,controllers and fusion techniques
6

Strategies for navigation

Modules integration for navigation

  • SPLAM - integrated approach of mapping, localization, obstacle avoidance, and path planning.
  • Exploration - Mapping and path planning
  • Active Localization - Localization in a pre-built map
  • SLAM - Only localization and mapping.
6

Navigation strategies

frontier_exploration :

  • The frontier_exploration package provides a costmap_2d layer plugin BoundedExploreLayer, and actionlib client/server nodes explore_client and explore_server

amcl :

  • Mapping first and localizing later approach.
  • AMCL is a probabilistic localization system for a robot moving in 2D.

explore_lite:

  • Provides greedy frontier-based exploration. When node is running, robot will greedily explore its environment until no frontiers could be found

slam :

  • A laser-based SLAM (Simultaneous Localization and Mapping).
  • Flexibility to use SPLAM with move base.

Happy Navigating ..!

ROS-navigation

By Swapnil Kalhapure

ROS-navigation

Introduction to robot navigation

  • 1,285