Skip to content

A Model Predictive Control based local_planner for ROS, wrapper around surajRathi/mpc_lib to integrate it with the ROS NavStack.

Notifications You must be signed in to change notification settings

surajRathi/mpc_local_planner

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mpc_local_planner

This package is a Model Predictive Control based Local Planner for ROS Melodic. It is a plugin to base_local_planner of the 2D ROS Navigation stack. It wraps the library surajRathi/mpc_lib.

Forked from project-TARIV/mpc_local_planner to add documentation.

Dependencies:

The package should be built within a catkin workspace. Dependencies are defined in package.xml.

Working

The package has two steps of note.

  1. Converting ROS global path and costmap structures to polynomials in the local frame suitable for MPC.
  2. Invoking the mpc_lib MPC formulation.

Configuration

  • frequency: Frequency at which points are sampled in the vehicles predicted trajectory, int
  • reference/velocity : The target velocity for the vehicle, float
  • limits/vel/low : Hard limit on velocity, float
  • limits/vel/high : Hard limit on velocity, float
  • limits/acc/low : Hard limit on acceleration, float
  • limits/acc/high : Hard limit on acceleration, float
  • weights/cte : Cross track error weight, float
  • weights/etheta : Yaw error weight, float
  • weights/vel : Linear velocity error weight, float
  • weights/omega : Angular velocity error weight, float
  • weights/acc : Acceleration minimizing weight, float
  • weights/obs : Obstacle distance weight, float

Converting the Costmap to a set of Polynomials:

Modified (bending) recursive shadow casting to get useful obstacle boundaries in the correct order.

38 outline points.
'@' is the robot.
'.' is empty space.
'=' is obstacle in the map.
'#' is an outline point.
. . . . . . . . . . = = = = = = = = = .
. . . . . . . . . V = = = = = = = = = .
. . . . . . . . . U = = = = = = = = = .
. . . . . . . . . T = = = = = = = = = .
. . . . . . . . . . S R Q = = = = = = .
. . . . . . . . . . . . P O N = = = . .
. . . . . . . . . . . . . . M L = . . .
. . . . . . . . . . . . . . . K J . . .
. . . . . . . . . . . . . . . . . . . .
. . . W X . . . . . . . . . . . . . . .
. . = = Y Z . . . . @ . . . . I = = . .
. . = = = [ . . . . . . . . . H = = = .
. . = = = \ . . . . . . . . F G = = . .
. . = = = ] . . . . . . . . E = = = . .
. . . = ^ . . . . . . . . . . D = . . .
. . . . . . . ` a . . . . . . . . . . .
. . . . . . _ = b . . . . . . . . . . .
. . . . . . = = c . f A B . . . . . . .
. . . . . . . . . . e = C . . . . . . .
. . . . . . . . . . d = = . . . . . . .

An example of the path and obstacle boundaries represented as polynomials.

Path and obstacle poly example

About

A Model Predictive Control based local_planner for ROS, wrapper around surajRathi/mpc_lib to integrate it with the ROS NavStack.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 86.2%
  • CMake 13.8%