|
mc_rtc
2.14.0
|
#include <mc_trajectory/BSpline.h>


Public Types | |
| using | bezier_curve_t = ndcurves::bezier_curve< double, double, false, Eigen::Vector3d > |
| using | waypoints_t = std::vector< Eigen::Vector3d > |
Public Member Functions | |
| BSpline (double duration, const Eigen::Vector3d &start, const Eigen::Vector3d &target, const waypoints_t &waypoints={}) | |
| Creates a curve with given waypoints (should includes starting and target position) More... | |
| void | update () override |
| Triggers recreation of the curve. Will only occur if the curve parameters were modified (waypoints, target), or the sampling size has changed. More... | |
| std::vector< Eigen::Vector3d > | splev (double t, unsigned int der=0) |
| Computes the position along the curve at time t, and its derivatives up to the nth order (typically velocity, acceleration) More... | |
| std::vector< Eigen::Vector3d > | sampleTrajectory () |
| Sample positions along the trajectory (for visualization purposes) More... | |
| void | addToGUI (mc_rtc::gui::StateBuilder &gui, const std::vector< std::string > &category) |
| Add GUI elements to control the curve's waypoints and targets. More... | |
Public Member Functions inherited from mc_trajectory::Spline< Eigen::Vector3d, std::vector< Eigen::Vector3d > > | |
| Spline (double duration, const Eigen::Vector3d &start, const Eigen::Vector3d &target, const std::vector< Eigen::Vector3d > &waypoints={}) | |
| void | waypoints (const std::vector< Eigen::Vector3d > &waypoints) |
| Defines waypoints. More... | |
| const std::vector< Eigen::Vector3d > & | waypoints () const |
| Returns waypoints. More... | |
| void | start (const Eigen::Vector3d &start) |
| Starting point for the trajectory at time t=0. More... | |
| const Eigen::Vector3d & | start () const |
| Starting point at time t=0. More... | |
| void | target (const Eigen::Vector3d &target) |
| Sets the spline target. More... | |
| const Eigen::Vector3d & | target () const |
| Gets the spline target position. More... | |
| void | samplingPoints (unsigned s) |
| Number of sampling points for the trajectory visualization. More... | |
| unsigned | samplingPoints () const |
| Gets number of samples. More... | |
Additional Inherited Members | |
Protected Attributes inherited from mc_trajectory::Spline< Eigen::Vector3d, std::vector< Eigen::Vector3d > > | |
| double | duration_ |
| Eigen::Vector3d | start_ |
| Eigen::Vector3d | target_ |
| std::vector< Eigen::Vector3d > | waypoints_ |
| unsigned | samplingPoints_ |
| std::vector< Eigen::Vector3d > | samples_ |
| bool | needsUpdate_ |
| using mc_trajectory::BSpline::bezier_curve_t = ndcurves::bezier_curve<double, double, false, Eigen::Vector3d> |
| using mc_trajectory::BSpline::waypoints_t = std::vector<Eigen::Vector3d> |
| mc_trajectory::BSpline::BSpline | ( | double | duration, |
| const Eigen::Vector3d & | start, | ||
| const Eigen::Vector3d & | target, | ||
| const waypoints_t & | waypoints = {} |
||
| ) |
Creates a curve with given waypoints (should includes starting and target position)
| duration | duration of the curve |
| start | starting position at time t=0 |
| target | target position at time t=duration |
| waypoints | control points for the bezier curve (excluding start and target points) |
| void mc_trajectory::BSpline::addToGUI | ( | mc_rtc::gui::StateBuilder & | gui, |
| const std::vector< std::string > & | category | ||
| ) |
Add GUI elements to control the curve's waypoints and targets.
| gui | GUI to which the task should be added |
| category | category in the GUI to which the curve's control belong to |
| std::vector<Eigen::Vector3d> mc_trajectory::BSpline::sampleTrajectory | ( | ) |
Sample positions along the trajectory (for visualization purposes)
| samples | number of samples along the curve to compute [minimum = 1] |
| std::vector<Eigen::Vector3d> mc_trajectory::BSpline::splev | ( | double | t, |
| unsigned int | der = 0 |
||
| ) |
Computes the position along the curve at time t, and its derivatives up to the nth order (typically velocity, acceleration)
| t | time at which the curve should be evaluated |
| der | derivation order |
|
overridevirtual |
Triggers recreation of the curve. Will only occur if the curve parameters were modified (waypoints, target), or the sampling size has changed.
Implements mc_trajectory::Spline< Eigen::Vector3d, std::vector< Eigen::Vector3d > >.