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

#include <trajopt/constraint/point_line_region_constraint.hpp>

Public Member Functions

 PointLineRegionConstraint (Translation2d robot_point, Translation2d field_line_start, Translation2d field_line_end, Side side)
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-line region constraint.

Specifies that a point on the robot must be on one side of a line defined by two points on the field

Constructor & Destructor Documentation

◆ PointLineRegionConstraint()

trajopt::PointLineRegionConstraint::PointLineRegionConstraint ( Translation2d robot_point,
Translation2d field_line_start,
Translation2d field_line_end,
Side side )
inlineexplicit

Constructs a PointLineRegionConstraint.

Parameters
robot_pointRobot point.
field_line_startField line start.
field_line_endField line end.
sideThe side to constrain the robot to.

Member Function Documentation

◆ apply()

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