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

#include <trajopt/constraint/point_at_constraint.hpp>

Public Member Functions

 PointAtConstraint (Translation2d field_point, double heading_tolerance, bool flip=false)
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

Point-at constraint.

Specifies a point on the field at which the robot should point.

Constructor & Destructor Documentation

◆ PointAtConstraint()

trajopt::PointAtConstraint::PointAtConstraint ( Translation2d field_point,
double heading_tolerance,
bool flip = false )
inlineexplicit

Constructs a PointAtConstraint.

Parameters
field_pointField point.
heading_toleranceThe allowed robot heading tolerance (radians). Must be nonnegative.
flipWhether to point away from the field point.

Member Function Documentation

◆ apply()

void trajopt::PointAtConstraint::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: