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

Factory that builds circular arc (encircle) trajectories. More...

#include <EncircleTrajectoryFactory.h>

Inheritance diagram for EncircleTrajectoryFactory:
TrajectoryFactoryInterface

Public Types

using Request = bb_controls_msgs::srv::EncircleTraj::Request
 

Public Member Functions

 EncircleTrajectoryFactory (const Request &req, const State &origin, std::shared_ptr< Trajectory6DOFLimits > limits)
 Constructs the factory from an EncircleTraj service request. More...
 
EncircleTrajectoryFactorywith_origin_twist_threshold (double max_norm)
 Sets the origin twist norm threshold below which the initial twist is zeroed. More...
 
EncircleTrajectoryFactorywith_frame_id (const std::string &frame_id)
 Sets the TF world frame ID embedded in visualisation messages. More...
 
std::unique_ptr< TrajectoryBasebuild () override
 Builds and returns the configured encircle trajectory. More...
 
- Public Member Functions inherited from TrajectoryFactoryInterface
virtual ~TrajectoryFactoryInterface ()=default
 

Detailed Description

Factory that builds circular arc (encircle) trajectories.

Parses and validates encircle parameters from an EncircleTraj service request and constructs an EncircleTrajectory. Uses a builder pattern to allow optional configuration after construction.

See also
EncircleTrajectory

Member Typedef Documentation

◆ Request

using EncircleTrajectoryFactory::Request = bb_controls_msgs::srv::EncircleTraj::Request

Constructor & Destructor Documentation

◆ EncircleTrajectoryFactory()

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

Constructs the factory from an EncircleTraj service request.

Validates that radius is positive, turn angle is non-zero, and spiral_proportion is in [0, 1].

Parameters
req[in] Service request with radius, turn_angle, tangent_offset, and spiral_proportion
origin[in] Starting vehicle state
limits[in] Per-axis velocity and acceleration limits

Member Function Documentation

◆ build()

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

Builds and returns the configured encircle trajectory.

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

Implements TrajectoryFactoryInterface.

◆ with_frame_id()

EncircleTrajectoryFactory & EncircleTrajectoryFactory::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()

EncircleTrajectoryFactory & EncircleTrajectoryFactory::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: