2023-Robot
Robot code for 2023 FRC season by Argos, FRC team #1756
Loading...
Searching...
No Matches
keep_out.h
Go to the documentation of this file.
1
4
5#pragma once
6
7#include <units/length.h>
8
9#include <optional>
10#include <vector>
11
12#include "types.h"
13
14namespace path_planning {
15
17
18 Orientation GetOrientation(const ArmPathPoint& point1, const ArmPathPoint& point2, const ArmPathPoint& point3);
19
20 bool OnSegment(const ArmPathPoint& p, const ArmPathPoint& q, const ArmPathPoint& r);
21
22 bool SegmentsIntersect(const LineSegment& segment1, const LineSegment& segment2);
23
24 std::optional<ArmPathPoint> Intersection(const LineSegment& segment1, const LineSegment& segment2);
25
26 std::vector<LineSegment> PolygonSegments(const Polygon& polygon);
27
28 units::inch_t SegmentLength(const LineSegment& segment);
29
30 ArmPath KeepOut(const ArmPath& initialPath, const Polygon& avoidancePolygon);
31} // namespace path_planning
Definition convert_path.h:16
bool SegmentsIntersect(const LineSegment &segment1, const LineSegment &segment2)
Definition keep_out.cpp:34
std::vector< ArmPathPoint > Polygon
Definition types.h:64
Orientation GetOrientation(const ArmPathPoint &point1, const ArmPathPoint &point2, const ArmPathPoint &point3)
Definition keep_out.cpp:18
std::vector< ArmPathPoint > ArmPath
Definition types.h:65
ArmPath KeepOut(const ArmPath &initialPath, const Polygon &avoidancePolygon)
Definition keep_out.cpp:107
units::inch_t SegmentLength(const LineSegment &segment)
Definition keep_out.cpp:103
Orientation
Definition keep_out.h:16
std::optional< ArmPathPoint > Intersection(const LineSegment &segment1, const LineSegment &segment2)
Definition keep_out.cpp:67
std::vector< LineSegment > PolygonSegments(const Polygon &polygon)
Definition keep_out.cpp:84
bool OnSegment(const ArmPathPoint &p, const ArmPathPoint &q, const ArmPathPoint &r)
Definition keep_out.cpp:29