-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
443e8ef
commit efc9bd1
Showing
17 changed files
with
93 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,19 @@ | ||
#ifndef PATHFINDER_FOL_DISTANCE_H_DEF | ||
#define PATHFINDER_FOL_DISTANCE_H_DEF | ||
|
||
typedef struct { | ||
#include "pathfinder/lib.h" | ||
|
||
CAPI typedef struct { | ||
double kp, ki, kd, kv, ka; | ||
} FollowerConfig; | ||
|
||
typedef struct { | ||
CAPI typedef struct { | ||
double last_error, heading, output; | ||
int segment, finished; | ||
} DistanceFollower; | ||
|
||
double pathfinder_follow_distance(FollowerConfig c, DistanceFollower *follower, Segment *trajectory, int trajectory_length, double distance); | ||
CAPI double pathfinder_follow_distance(FollowerConfig c, DistanceFollower *follower, Segment *trajectory, int trajectory_length, double distance); | ||
|
||
double pathfinder_follow_distance2(FollowerConfig c, DistanceFollower *follower, Segment segment, int trajectory_length, double distance); | ||
CAPI double pathfinder_follow_distance2(FollowerConfig c, DistanceFollower *follower, Segment segment, int trajectory_length, double distance); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#ifndef PATHFINDER_LIB_H_DEF | ||
#define PATHFINDER_LIB_H_DEF | ||
|
||
#if defined(WIN32) || defined(_WIN32) || defined(__WIN32) && !defined(__CYGWIN__) | ||
#define CAPI __declspec(dllexport) | ||
#else | ||
#define CAPI | ||
#endif | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
#ifndef PATHFINDER_MOD_SWERVE_H_DEF | ||
#define PATHFINDER_MOD_SWERVE_H_DEF | ||
|
||
typedef enum { | ||
#include "pathfinder/lib.h" | ||
|
||
CAPI typedef enum { | ||
SWERVE_DEFAULT | ||
} SWERVE_MODE; | ||
|
||
void pathfinder_modify_swerve(Segment *original, int length, Segment *front_left, Segment *front_right, | ||
CAPI void pathfinder_modify_swerve(Segment *original, int length, Segment *front_left, Segment *front_right, | ||
Segment *back_left, Segment *back_right, double wheelbase_width, double wheelbase_depth, SWERVE_MODE mode); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
#ifndef PATHFINDER_MOD_TANK_H_DEF | ||
#define PATHFINDER_MOD_TANK_H_DEF | ||
|
||
void pathfinder_modify_tank(Segment *original, int length, Segment *left, Segment *right, double wheelbase_width); | ||
#include "pathfinder/lib.h" | ||
|
||
CAPI void pathfinder_modify_tank(Segment *original, int length, Segment *left, Segment *right, double wheelbase_width); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,18 @@ | ||
#ifndef PATHFINDER_SPLINE_H_DEF | ||
#define PATHFINDER_SPLINE_H_DEF | ||
|
||
#include "pathfinder/lib.h" | ||
|
||
#define PATHFINDER_SAMPLES_FAST (int)1000 | ||
#define PATHFINDER_SAMPLES_LOW (int)PATHFINDER_SAMPLES_FAST*10 | ||
#define PATHFINDER_SAMPLES_HIGH (int)PATHFINDER_SAMPLES_LOW*10 | ||
|
||
Coord pf_spline_coords(Spline s, double percentage); | ||
double pf_spline_deriv(Spline s, double percentage); | ||
double pf_spline_deriv_2(double a, double b, double c, double d, double e, double k, double p); | ||
double pf_spline_angle(Spline s, double percentage); | ||
CAPI Coord pf_spline_coords(Spline s, double percentage); | ||
CAPI double pf_spline_deriv(Spline s, double percentage); | ||
CAPI double pf_spline_deriv_2(double a, double b, double c, double d, double e, double k, double p); | ||
CAPI double pf_spline_angle(Spline s, double percentage); | ||
|
||
double pf_spline_distance(Spline *s, int sample_count); | ||
double pf_spline_progress_for_distance(Spline s, double distance, int sample_count); | ||
CAPI double pf_spline_distance(Spline *s, int sample_count); | ||
CAPI double pf_spline_progress_for_distance(Spline s, double distance, int sample_count); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,17 @@ | ||
#ifndef PATHFINDER_TRAJECTORY_H_DEF | ||
#define PATHFINDER_TRAJECTORY_H_DEF | ||
|
||
int pathfinder_prepare(Waypoint *path, int path_length, void (*fit)(Waypoint,Waypoint,Spline*), int sample_count, double dt, | ||
#include "pathfinder/lib.h" | ||
|
||
CAPI int pathfinder_prepare(Waypoint *path, int path_length, void (*fit)(Waypoint,Waypoint,Spline*), int sample_count, double dt, | ||
double max_velocity, double max_acceleration, double max_jerk, TrajectoryCandidate *cand); | ||
int pathfinder_generate(TrajectoryCandidate *c, Segment *segments); | ||
CAPI int pathfinder_generate(TrajectoryCandidate *c, Segment *segments); | ||
|
||
void pf_trajectory_copy(Segment *src, Segment *dest, int length); | ||
CAPI void pf_trajectory_copy(Segment *src, Segment *dest, int length); | ||
|
||
TrajectoryInfo pf_trajectory_prepare(TrajectoryConfig c); | ||
int pf_trajectory_create(TrajectoryInfo info, TrajectoryConfig c, Segment *seg); | ||
int pf_trajectory_fromSecondOrderFilter(int filter_1_l, int filter_2_l, | ||
CAPI TrajectoryInfo pf_trajectory_prepare(TrajectoryConfig c); | ||
CAPI int pf_trajectory_create(TrajectoryInfo info, TrajectoryConfig c, Segment *seg); | ||
CAPI int pf_trajectory_fromSecondOrderFilter(int filter_1_l, int filter_2_l, | ||
double dt, double u, double v, double impulse, int len, Segment *t); | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+465 Bytes
(100%)
Pathfinder-Java/src/main/resources/Linux/arm/libpathfinderjava.so
Binary file not shown.
Binary file modified
BIN
-124 KB
(54%)
Pathfinder-Java/src/main/resources/Win/amd64/pathfinderjava.dll
Binary file not shown.
Binary file not shown.
Binary file modified
BIN
-73.4 KB
(64%)
Pathfinder-Java/src/main/resources/Win/x86/pathfinderjava.dll
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters