TrajoptLib
Library for generating time-optimal trajectories for FRC robots.
Loading...
Searching...
No Matches
trajopt::LaneConstraint Class Reference

#include <trajopt/constraint/lane_constraint.hpp>

Public Member Functions

 LaneConstraint (Translation2d center_line_start, Translation2d center_line_end, double tolerance)
void apply (slp::Problem< double > &problem, const Pose2v< double > &pose, const Translation2v< double > &linear_velocity, const slp::Variable< double > &angular_velocity, const Translation2v< double > &linear_acceleration, const slp::Variable< double > &angular_acceleration)

Detailed Description

Lane Constraint.

Specifies the robot must stay between two lines.

Constructor & Destructor Documentation

◆ LaneConstraint()

trajopt::LaneConstraint::LaneConstraint ( Translation2d center_line_start,
Translation2d center_line_end,
double tolerance )
inline

Constructs a LaneConstraint.

Parameters
center_line_startStart point of the center line.
center_line_endEnd point of the center line.
toleranceDistance from center line to lane edge. Passing zero creates a line constraint.

Member Function Documentation

◆ apply()

void trajopt::LaneConstraint::apply ( slp::Problem< double > & problem,
const Pose2v< double > & pose,
const Translation2v< double > & linear_velocity,
const slp::Variable< double > & angular_velocity,
const Translation2v< double > & linear_acceleration,
const slp::Variable< double > & angular_acceleration )
inline

Applies this constraint to the given problem.

Parameters
problemThe optimization problem.
poseThe robot's pose.
linear_velocityThe robot's linear velocity.
angular_velocityThe robot's angular velocity.
linear_accelerationThe robot's linear acceleration.
angular_accelerationThe robot's angular acceleration.

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