HoloLib
High-performance holonomic (X-Drive) control library for VEX V5
Loading...
Searching...
No Matches
path.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <string>
4
#include <vector>
5
6
/**
7
* @brief Represents a single point along an autonomous path.
8
*/
9
struct
PathPoint
{
10
float
x
= 0;
/**< Target X coordinate */
11
float
y
= 0;
/**< Target Y coordinate */
12
float
theta
= 0;
/**< Target heading at this point */
13
};
14
15
/**
16
* @brief Specifies the heading behavior during path following.
17
*/
18
enum class
HeadingMode
{
FollowPath
,
HoldAngle
,
CustomAngles
};
19
20
/**
21
* @brief Parses path point data from a file or string.
22
*
23
* @param input_source The source identifier (e.g. filename).
24
* @param convertFromMeters True to scale the values from meters to inches.
25
* @return std::vector<PathPoint> The parsed vector of path points.
26
*/
27
std::vector<PathPoint>
parsePathData
(
const
std::string &input_source,
28
bool
convertFromMeters =
false
);
HeadingMode
HeadingMode
Specifies the heading behavior during path following.
Definition
path.h:18
HeadingMode::HoldAngle
@ HoldAngle
HeadingMode::CustomAngles
@ CustomAngles
HeadingMode::FollowPath
@ FollowPath
parsePathData
std::vector< PathPoint > parsePathData(const std::string &input_source, bool convertFromMeters=false)
Parses path point data from a file or string.
PathPoint
Represents a single point along an autonomous path.
Definition
path.h:9
PathPoint::x
float x
Target X coordinate.
Definition
path.h:10
PathPoint::theta
float theta
Target heading at this point.
Definition
path.h:12
PathPoint::y
float y
Target Y coordinate.
Definition
path.h:11
include
hololib
path.h
Generated by
1.9.8