shasta.primitives.path_planning#

Module Contents#

Classes#

PathPlanning

Path planner based on the skeleton of the image.

class PathPlanning(env_map)[source]#

Bases: object

Path planner based on the skeleton of the image. Generates a spline path

linear_refine_implicit(x, n)[source]#

Given a 2D ndarray (npt, m) of npt coordinates in m dimension, insert 2**(n-1) additional points on each trajectory segment Returns an (npt*2**(n-1), m) ndarray

Parameters:
  • x (array) – A 2D input array

  • n (int) – Number of intermediate points to insert between two consecutive points in x

Returns:

An array with interploated points

Return type:

array

Raises:
  • NotImplementedError – The functions is not implemented for 3D or higher dimensions

  • ValueError – Number of intermediate points should be greated than zero

find_path(start, end, n_splits=1)[source]#

Finds a path between start and end using path graph

Parameters:
  • start (array) – A cartesian co-ordinate specifying the start position

  • end (array) – A node ID specifying the end position

  • n_splits (int, optional) – Number of splits in refining the path points, by default 1

Returns:

path_points – A refined path points in pybullet cartesian co-ordinate system

Return type:

array

abstract execute()[source]#