Skip to content

Commit

Permalink
Adjust control interval guess scalar for VTS, and fix assignment of C…
Browse files Browse the repository at this point in the history
…ontrolIntervalCounts vector
  • Loading branch information
camearle20 committed Feb 19, 2024
1 parent dcefeb9 commit 3cdfa03
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions trajectory_native/src/trajectory_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ namespace vts = org::littletonrobotics::vehicletrajectoryservice;

// Scales the Choreo algorithm's estimate of initial guess points, since we've found it to sometimes underestimate.
// We take the tradeoff of increased computation time since we cache paths anyway.
static const double CONTROL_INTERVAL_GUESS_SCALAR = 1.5;
static const double CONTROL_INTERVAL_GUESS_SCALAR = 1.75;

trajopt::SwerveDrivetrain create_drivetrain(const vts::VehicleModel &model) {
trajopt::SwerveDrivetrain drivetrain{
Expand Down Expand Up @@ -184,9 +184,9 @@ void apply_waypoint_constraints(trajopt::SwervePathBuilder &builder, const std::
fmt::print("Adding sample count {} between waypoints {}-{}\n", sample_count, i - 1, i);
control_intervals.push_back(sample_count);
}

builder.ControlIntervalCounts(std::move(control_intervals));
}

builder.ControlIntervalCounts(std::move(control_intervals));
}

void apply_segment_constraints(trajopt::SwervePathBuilder &builder, const vts::PathRequest &request) {
Expand Down

0 comments on commit 3cdfa03

Please sign in to comment.