コンテンツにスキップ

cpp_robotics::SplinePathBase

More...

#include <spline_path.hpp>

Inherited by cpp_robotics::CatumullRomSplinePath< VectorType >, cpp_robotics::CubicSplinePath< VectorType >

Protected Classes

Name
struct segment_info_t
struct segment_t

Public Types

Name
using VectorType Vector

Protected Types

Name
using eigen_spline_api< VectorType > spline_api

Public Functions

Name
SplinePathBase() =default
SplinePathBase(const std::vector< Vector > & waypoints)
virtual void set_path(const std::vector< Vector > & waypoints) =0
bool is_empty() const
size_t waypoints_size() const
double length() const
double nearest_position(const Vector pos, double now_length =-1, double search_range =-1)
Vector position(double length) const
Vector direction(double length) const

Protected Functions

Name
segment_info_t get_segmet_idx(const double t) const
segment_info_t get_segmet_idx_length(double length) const

Protected Attributes

Name
std::vector< Vector > waypoints_
std::vector< double > length_
double total_length_
std::vector< segment_t > spline_segments_

Detailed Description

template <class VectorType >
class cpp_robotics::SplinePathBase;

Public Types Documentation

using Vector

using cpp_robotics::SplinePathBase< VectorType >::Vector =  VectorType;

Protected Types Documentation

using spline_api

using cpp_robotics::SplinePathBase< VectorType >::spline_api =  eigen_spline_api<VectorType>;

Public Functions Documentation

function SplinePathBase

SplinePathBase() =default

function SplinePathBase

inline SplinePathBase(
    const std::vector< Vector > & waypoints
)

function set_path

virtual void set_path(
    const std::vector< Vector > & waypoints
) =0

Reimplemented by: cpp_robotics::CatumullRomSplinePath::set_path, cpp_robotics::CubicSplinePath::set_path

function is_empty

inline bool is_empty() const

function waypoints_size

inline size_t waypoints_size() const

function length

inline double length() const

function nearest_position

inline double nearest_position(
    const Vector pos,
    double now_length =-1,
    double search_range =-1
)

function position

inline Vector position(
    double length
) const

function direction

inline Vector direction(
    double length
) const

Protected Functions Documentation

function get_segmet_idx

inline segment_info_t get_segmet_idx(
    const double t
) const

function get_segmet_idx_length

inline segment_info_t get_segmet_idx_length(
    double length
) const

Protected Attributes Documentation

variable waypoints_

std::vector< Vector > waypoints_;

variable length_

std::vector< double > length_;

variable total_length_

double total_length_ = 0;

variable spline_segments_

std::vector< segment_t > spline_segments_;

Updated on 2024-05-28 at 06:55:40 +0000