controls  3.0.0
Public Types | Public Member Functions | List of all members
PolyTrajectoryFactory Class Reference

Factory that builds polynomial waypoint-following trajectories. More...

#include <PolyTrajectoryFactory.h>

Inheritance diagram for PolyTrajectoryFactory:
TrajectoryFactoryInterface

Public Types

using Request = bb_controls_msgs::srv::SplineTraj::Request
 
using Locomotion = bb_controls_msgs::action::Locomotion
 

Public Member Functions

 PolyTrajectoryFactory (const Request &req, const State &origin, std::shared_ptr< Trajectory6DOFLimits > limits)
 Constructs the factory from a SplineTraj service request. More...
 
 PolyTrajectoryFactory (const Locomotion::Goal &goal, const State &origin, std::shared_ptr< Trajectory6DOFLimits > limits)
 Constructs the factory from a Locomotion action goal. More...
 
PolyTrajectoryFactorywith_origin_twist_threshold (double max_norm)
 Sets the origin twist norm threshold below which the initial twist is zeroed. More...
 
PolyTrajectoryFactorywith_frame_id (const std::string &frame_id)
 Sets the TF world frame ID embedded in visualisation messages. More...
 
PolyTrajectoryFactorywith_angle_unwrapping (bool needs_angle_unwrapping=true)
 Controls whether yaw angles are unwrapped across consecutive waypoints. More...
 
std::unique_ptr< TrajectoryBasebuild () override
 Builds and returns the configured trajectory. More...
 
- Public Member Functions inherited from TrajectoryFactoryInterface
virtual ~TrajectoryFactoryInterface ()=default
 

Detailed Description

Factory that builds polynomial waypoint-following trajectories.

Parses goal waypoints from either a SplineTraj service request or a Locomotion action goal, converts relative goals to absolute world-frame coordinates, optionally inserts intermediate heading-interpolation waypoints, and constructs a PolyTrajectory. Uses a builder pattern to allow optional configuration after construction.

See also
PolyTrajectory

Member Typedef Documentation

◆ Locomotion

using PolyTrajectoryFactory::Locomotion = bb_controls_msgs::action::Locomotion

◆ Request

using PolyTrajectoryFactory::Request = bb_controls_msgs::srv::SplineTraj::Request

Constructor & Destructor Documentation

◆ PolyTrajectoryFactory() [1/2]

PolyTrajectoryFactory::PolyTrajectoryFactory ( const Request req,
const State origin,
std::shared_ptr< Trajectory6DOFLimits limits 
)

Constructs the factory from a SplineTraj service request.

Parameters
req[in] Service request containing goal poses and relative-coordinate flags
origin[in] Starting vehicle state used for relative-to-absolute conversion
limits[in] Per-axis velocity and acceleration limits

◆ PolyTrajectoryFactory() [2/2]

PolyTrajectoryFactory::PolyTrajectoryFactory ( const Locomotion::Goal &  goal,
const State origin,
std::shared_ptr< Trajectory6DOFLimits limits 
)

Constructs the factory from a Locomotion action goal.

Parameters
goal[in] Action goal containing per-axis setpoint arrays and flags
origin[in] Starting vehicle state used for relative-to-absolute conversion
limits[in] Per-axis velocity and acceleration limits

Member Function Documentation

◆ build()

std::unique_ptr< TrajectoryBase > PolyTrajectoryFactory::build ( )
overridevirtual

Builds and returns the configured trajectory.

Returns
Unique pointer to the constructed PolyTrajectory, or nullptr on failure

Implements TrajectoryFactoryInterface.

◆ with_angle_unwrapping()

PolyTrajectoryFactory & PolyTrajectoryFactory::with_angle_unwrapping ( bool  needs_angle_unwrapping = true)

Controls whether yaw angles are unwrapped across consecutive waypoints.

Parameters
needs_angle_unwrapping[in] True to enable yaw unwrapping (default)
Returns
Reference to this factory for method chaining

◆ with_frame_id()

PolyTrajectoryFactory & PolyTrajectoryFactory::with_frame_id ( const std::string &  frame_id)

Sets the TF world frame ID embedded in visualisation messages.

Parameters
frame_id[in] TF frame ID string
Returns
Reference to this factory for method chaining

◆ with_origin_twist_threshold()

PolyTrajectoryFactory & PolyTrajectoryFactory::with_origin_twist_threshold ( double  max_norm)

Sets the origin twist norm threshold below which the initial twist is zeroed.

Parameters
max_norm[in] Threshold on the L2 norm of the origin twist
Returns
Reference to this factory for method chaining

The documentation for this class was generated from the following files: