curves::helpers Namespace Reference

Classes

class  effector_spline_rotation
 Represents a trajectory for and end effector. More...
 
class  rotation_spline
 

Typedefs

typedef double Numeric
 
typedef double Time
 
typedef Eigen::Matrix< Numeric, Eigen::Dynamic, 1 > Point
 
typedef std::vector< Point, Eigen::aligned_allocator< Point > > T_Point
 
typedef std::pair< double, PointWaypoint
 
typedef std::vector< WaypointT_Waypoint
 
typedef exact_cubic< Time, Numeric, true, Point, T_Pointexact_cubic_t
 
typedef exact_cubic_t::spline_constraints spline_constraints_t
 
typedef exact_cubic_t::t_spline_t t_spline_t
 
typedef exact_cubic_t::spline_t spline_t
 
typedef Eigen::Matrix< Numeric, 4, 1 > quat_t
 
typedef Eigen::Ref< quat_tquat_ref_t
 
typedef const Eigen::Ref< const quat_tquat_ref_const_t
 
typedef Eigen::Matrix< Numeric, 7, 1 > config_t
 
typedef curve_abc< Time, Numeric, false, quat_tcurve_abc_quat_t
 
typedef std::pair< Numeric, quat_twaypoint_quat_t
 
typedef std::vector< waypoint_quat_tt_waypoint_quat_t
 
typedef Eigen::Matrix< Numeric, 1, 1 > point_one_dim_t
 
typedef exact_cubic< Numeric, Numeric, false, point_one_dim_texact_cubic_constraint_one_dim
 
typedef std::pair< Numeric, point_one_dim_twaypoint_one_dim_t
 
typedef std::vector< waypoint_one_dim_tt_waypoint_one_dim_t
 
typedef exact_cubic< Time, Numeric, false, quat_t, std::vector< quat_t, Eigen::aligned_allocator< quat_t > >, rotation_splineexact_cubic_quat_t
 

Functions

Waypoint compute_offset (const Waypoint &source, const Point &normal, const Numeric offset, const Time time_offset)
 Compute time such that the equation from source to offsetpoint is necessarily a line. More...
 
spline_t make_end_spline (const Point &normal, const Point &from, const Numeric offset, const Time init_time, const Time time_offset)
 Compute spline from land way point to end point. More...
 
spline_constraints_t compute_required_offset_velocity_acceleration (const spline_t &end_spline, const Time)
 Compute end velocity : along landing normal and respecting time. More...
 
template<typename In >
exact_cubic_teffector_spline (In wayPointsBegin, In wayPointsEnd, const Point &lift_normal=Eigen::Vector3d::UnitZ(), const Point &land_normal=Eigen::Vector3d::UnitZ(), const Numeric lift_offset=0.02, const Numeric land_offset=0.02, const Time lift_offset_duration=0.02, const Time land_offset_duration=0.02)
 Helper method to create a spline typically used to guide the 3d trajectory of a robot end effector. More...
 

Typedef Documentation

◆ config_t

typedef Eigen::Matrix<Numeric, 7, 1> curves::helpers::config_t

◆ curve_abc_quat_t

◆ exact_cubic_constraint_one_dim

◆ exact_cubic_quat_t

typedef exact_cubic<Time, Numeric, false, quat_t, std::vector<quat_t, Eigen::aligned_allocator<quat_t> >, rotation_spline> curves::helpers::exact_cubic_quat_t

◆ exact_cubic_t

◆ Numeric

typedef double curves::helpers::Numeric

◆ Point

typedef Eigen::Matrix<Numeric, Eigen::Dynamic, 1> curves::helpers::Point

◆ point_one_dim_t

typedef Eigen::Matrix<Numeric, 1, 1> curves::helpers::point_one_dim_t

◆ quat_ref_const_t

typedef const Eigen::Ref<const quat_t> curves::helpers::quat_ref_const_t

◆ quat_ref_t

typedef Eigen::Ref<quat_t> curves::helpers::quat_ref_t

◆ quat_t

typedef Eigen::Matrix<Numeric, 4, 1> curves::helpers::quat_t

◆ spline_constraints_t

◆ spline_t

◆ T_Point

typedef std::vector<Point, Eigen::aligned_allocator<Point> > curves::helpers::T_Point

◆ t_spline_t

◆ T_Waypoint

typedef std::vector<Waypoint> curves::helpers::T_Waypoint

◆ t_waypoint_one_dim_t

◆ t_waypoint_quat_t

◆ Time

typedef double curves::helpers::Time

◆ Waypoint

typedef std::pair<double, Point> curves::helpers::Waypoint

◆ waypoint_one_dim_t

◆ waypoint_quat_t

Function Documentation

◆ compute_offset()

Waypoint curves::helpers::compute_offset ( const Waypoint source,
const Point normal,
const Numeric  offset,
const Time  time_offset 
)

Compute time such that the equation from source to offsetpoint is necessarily a line.

Referenced by effector_spline().

◆ compute_required_offset_velocity_acceleration()

spline_constraints_t curves::helpers::compute_required_offset_velocity_acceleration ( const spline_t end_spline,
const Time   
)

Compute end velocity : along landing normal and respecting time.

References curves::curve_constraints< Point >::end_acc.

Referenced by effector_spline().

◆ effector_spline()

template<typename In >
exact_cubic_t* curves::helpers::effector_spline ( In  wayPointsBegin,
In  wayPointsEnd,
const Point lift_normal = Eigen::Vector3d::UnitZ(),
const Point land_normal = Eigen::Vector3d::UnitZ(),
const Numeric  lift_offset = 0.02,
const Numeric  land_offset = 0.02,
const Time  lift_offset_duration = 0.02,
const Time  land_offset_duration = 0.02 
)

Helper method to create a spline typically used to guide the 3d trajectory of a robot end effector.

Given a set of waypoints, and the normal vector of the start and ending positions, automatically create the spline such that: + init and end velocities / accelerations are 0. + the effector lifts and lands exactly in the direction of the specified normals.

Parameters
wayPointsBegin: an iterator pointing to the first element of a waypoint container.
wayPointsEnd: an iterator pointing to the last element of a waypoint container.
lift_normal: normal to be followed by end effector at take-off.
land_normal: normal to be followed by end effector at landing.
lift_offset: length of the straight line along normal at take-off.
land_offset: length of the straight line along normal at landing.
lift_offset_duration: time travelled along straight line at take-off.
land_offset_duration: time travelled along straight line at landing.

References compute_offset(), compute_required_offset_velocity_acceleration(), and make_end_spline().

◆ make_end_spline()

spline_t curves::helpers::make_end_spline ( const Point normal,
const Point from,
const Numeric  offset,
const Time  init_time,
const Time  time_offset 
)

Compute spline from land way point to end point.

Constraints are null velocity and acceleration.

Referenced by effector_spline().