37 const QLength &idiameter,
49 const QLength &idiameter,
62 const QLength &idiameter,
80 withOutput(
const std::shared_ptr<ChassisController> &icontroller);
159 std::shared_ptr<Logger> logger;
161 bool hasLimits{
false};
164 bool hasOutput{
false};
165 std::shared_ptr<ControllerOutput<double>> output;
168 bool hasModel{
false};
169 std::shared_ptr<ChassisModel> model;
172 TimeUtilFactory timeUtilFactory = TimeUtilFactory();
175 bool isParentedToCurrentTask{
true};
AsyncMotionProfileControllerBuilder & withOutput(const std::shared_ptr< ControllerOutput< double > > &ioutput, const QLength &idiameter, const AbstractMotor::GearsetRatioPair &ipair)
Sets the output.
AsyncMotionProfileControllerBuilder & withOutput(const std::shared_ptr< ChassisController > &icontroller)
Sets the output.
AsyncMotionProfileControllerBuilder & withOutput(const std::shared_ptr< ChassisModel > &imodel, const ChassisScales &iscales, const AbstractMotor::GearsetRatioPair &ipair)
Sets the output.
std::shared_ptr< AsyncMotionProfileController > buildMotionProfileController()
Builds the AsyncMotionProfileController.
AsyncMotionProfileControllerBuilder & withLimits(const PathfinderLimits &ilimits)
Sets the limits.
AsyncMotionProfileControllerBuilder & withOutput(const MotorGroup &ioutput, const QLength &idiameter, const AbstractMotor::GearsetRatioPair &ipair)
Sets the output.
AsyncMotionProfileControllerBuilder & withOutput(ChassisController &icontroller)
Sets the output.
AsyncMotionProfileControllerBuilder & withOutput(const Motor &ioutput, const QLength &idiameter, const AbstractMotor::GearsetRatioPair &ipair)
Sets the output.
std::shared_ptr< AsyncLinearMotionProfileController > buildLinearMotionProfileController()
Builds the AsyncLinearMotionProfileController.
AsyncMotionProfileControllerBuilder(const std::shared_ptr< Logger > &ilogger=Logger::getDefaultLogger())
A builder that creates async motion profile controllers.
AsyncMotionProfileControllerBuilder & notParentedToCurrentTask()
Prevents parenting the internal tasks started by this builder to the current task,...
AsyncMotionProfileControllerBuilder & withLogger(const std::shared_ptr< Logger > &ilogger)
Sets the logger.
AsyncMotionProfileControllerBuilder & parentedToCurrentTask()
Parents the internal tasks started by this builder to the current task, meaning they will be deleted ...
AsyncMotionProfileControllerBuilder & withTimeUtilFactory(const TimeUtilFactory &itimeUtilFactory)
Sets the TimeUtilFactory used when building the controller.
static std::shared_ptr< Logger > getDefaultLogger()
static constexpr std::int32_t imev5GreenTPR
The ticks per rotation of the V5 motor with a green gearset.
A simple structure representing the full ratio between motor and wheel.