Skip to content
This repository has been archived by the owner on Jul 8, 2024. It is now read-only.

Commit

Permalink
WIP refactor spline guess
Browse files Browse the repository at this point in the history
  • Loading branch information
bruingineer committed Jun 29, 2024
1 parent 5fb02f0 commit 8366504
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion include/trajopt/util/GenerateSplineInitialGuess.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@

namespace trajopt {

// TODO make control interval fn that is the first part of the below function
/// TODO: make a better way to pass control intervals to choreo
/// TODO: refactor this file. add inline? possible to template?
std::vector<frc::Trajectory> GenerateWaypointSplineTrajectories(
const trajopt::SwervePath path,
const std::vector<std::vector<Pose2d>> initialGuessPoints) {
Expand Down Expand Up @@ -243,6 +244,7 @@ SwerveSolution CalculateSplineInitialGuessWithKinematicsAndConstraints(

SwerveSolution initialGuess;
for (const auto& traj : trajectoriesSamples) {
/// FIXME: first segment is always 1 point long so always 0.1s to second sample
auto dt = 0.1_s;
if (traj.size() > 1) {
dt = traj.at(1).t - traj.front().t;
Expand Down

0 comments on commit 8366504

Please sign in to comment.