Closed THRYLLR closed 1 year ago
Could you share the code for your project? Are you using the 2023 beta?
I'm using the latest version of the app available on the Microsoft Store (v2022.2.1 I believe), and I'm using the latest version of pathplannerlib at the URL , which is in fact the 2023.0.1 beta. I'm not sure why the vendordep for a beta version is located at this URL which is present in the docs for a stable version.
This is part of our GetAutonomousCommand
:
frc2::Command* RobotContainer::GetAutonomousCommand() {
pathplanner::PathPlannerTrajectory autoTrajectory = pathplanner::PathPlanner::loadPath(TRAJECTORY_NAME, DriveConstants::kMaxAutoSpeed, DriveConstants::kMaxAutoAccel);
frc::Trajectory WPItrajectory = autoTrajectory.asWPILibTrajectory();
m_drivetrain.ResetOdometry(WPItrajectory.InitialPose(), WPItrajectory.InitialPose().Rotation());
frc2::RamseteCommand followTrajectory {
autoTrajectory.asWPILibTrajectory(),
...
I meant WPILib beta. If you're still using 2022 WPILib this is likely the problem.
Oh right, I am not using the WPILib beta right now; I'm using the latest 2022 release. That must be the issue. In any case, would it be possible to put a different, stable vendor dependency URL on the wiki alongside the beta one to avoid potential confusion?
I suppose, but the only time there is ever a "beta" release is the pre-season. After kickoff there will be no beta releases at all, everything will be a "stable" version. Since the wiki is always updated for the latest version, this "stable" version of the vendor dep could lead to some confusion for others in the pre-season if a vendordep URL is provided on a wiki describing some feature that isn't actually present in that version. I think its most likely better to just have the single URL, as anyone using pathplanner in the offseason is likely at an offseason event, and not updating pplib, or trying the beta release. Sure, there's a few people doing neither of those things, but its such a small number it doesn't really make sense to spend the time maintaining separate documentation and maven releases.
As there is no native mechanism I am aware of to DOWNgrade vendor dependencies, I accomplished this by copying the vendordep .json file for 2022.2.1 from an older project into this one and rebuilding.
For future note, you can manually downgrade just by editing the version number in the .json file of the dependency (located in the vendordeps folder). This is best done with a control-H to replace all references of the 'new' version (in this case 2023.0.1) with the 'old' version (2022.1.1). This also works for manual upgrading.
EDIT: In this case, it doesn't work, because pathplannerlib added support for binaryPlatforms windowsx86-64
and linuxx86-64
, which do not exist in old versions. Remove those two entries, and it should build fine.
I have implemented a WPILib Ramsete command in C++, and I used pathplannerlib's
PathPlanner::LoadPath
to retrieve the trajectory we designed in PathPlanner. Upon building this code, I get a large linker error which causes the build to fail:I highly doubt that this is due to an error with my code as I can fix this error and have a successful build by downgrading to version 2022.2.1. As there is no native mechanism I am aware of to DOWNgrade vendor dependencies, I accomplished this by copying the vendordep .json file for 2022.2.1 from an older project into this one and rebuilding.