rktl_planner
Helper modules for the local planner package.
- License:
BSD 3-Clause License Copyright (c) 2023, Autonomous Robotics Club of Purdue (Purdue ARC) All rights reserved.
Submodules
Package Contents
Classes
A class representing a Bezier Curve and a duration. If order and control_points are given in |
- class rktl_planner.BezierCurve(*args, **kwargs)
A class representing a Bezier Curve and a duration. If order and control_points are given in kwargs, then it is used to initialize the instance. Otherwise, args is used to initialize the instance. When not using kwargs, 4 options exist. Either a list of control points (geometry_msgs.msg.Points), the order of the bezier curve, both the order and the list of control points, or the control points as indiviudal arguments can be given.
For example, All examples below give an instance of a BezierCurve of order 3. When points are specified, they are the control points used for the curve.
`python curve = BezierCurve(3) curve = BezierCurve(3, [Point(0, 0, 0), Point(1, 2, 3), Point(3, 2, 1), Point(4, 2, 0)]) curve = BezierCurve([Point(0, 0, 0), Point(1, 2, 3), Point(3, 2, 1), Point(4, 2, 0)])) curve = BezierCurve(Point(0, 0, 0), Point(1, 2, 3), Point(3, 2, 1), Point(4, 2, 0))) curve = BezierCurve(order=3, control_points=[Point(0, 0, 0), Point(1, 2, 3), Point(3, 2, 1), Point(4, 2, 0)])) curve = BezierCurve(control_points=[Point(0, 0, 0), Point(1, 2, 3), Point(3, 2, 1), Point(4, 2, 0)]))`
- _coefficients = [[1]]
Table used internally to generate the coefficients of the bezier curve faster
- __repr__()
Returns a string representation of the instance.
- __str__()
Returns a string representation of the instance.
- calc_coefficients()
Calculates and returns the list of binomial coefficients for a given n.
- at(t)
Returns a Point object representing the location of the curve at the given parameter value t.
- hodograph()
Returns a BezierCurve object representing the hodograph (derivative) of the curve.
- deriv(t)
Returns a geometry_msgs/Point object representing the derivative of the curve at the given parameter value t.
- de_casteljau(t)
Splits this curve into 2 curves at the the point specified by t. Returns the two new BezierCurve objects.