smarts.core.bezier_motion_planner module

class smarts.core.bezier_motion_planner.BezierMotionPlanner(extend=0.9, extend_bias=0.5, speed_calculation_resolution=5)[source]

A bezier trajectory builder.

trajectory(current_pose, target_pose_at_t, n, dt)[source]

Generate a bezier trajectory to a target pose.

trajectory_batched(current_poses, target_poses_at_t, n, dt) ndarray[source]

Generate a batch of trajectories

Parameters:
  • current_posesnp.array([[x, y, heading]])

  • target_poses_at_tnp.array([[x, y, heading, seconds_into_future]] pose we would like to have this many seconds into the future

  • n – number of trajectory points to return

  • dt – time delta between trajectory points

Returns:

A stacked np.array of the form

np.array([[x], [y], [heading], [desired_speed]])