|
LightLib
PROS library for VEX V5: EKF/MCL localization, RAMSETE path following, high-level chassis API
|
#include <asyncMotionProfileControllerBuilder.hpp>
Public Member Functions | |
| AsyncMotionProfileControllerBuilder (const std::shared_ptr< Logger > &ilogger=Logger::getDefaultLogger()) | |
| A builder that creates async motion profile controllers. | |
| AsyncMotionProfileControllerBuilder & | withOutput (const Motor &ioutput, const QLength &idiameter, const AbstractMotor::GearsetRatioPair &ipair) |
| Sets the output. | |
| AsyncMotionProfileControllerBuilder & | withOutput (const MotorGroup &ioutput, const QLength &idiameter, const AbstractMotor::GearsetRatioPair &ipair) |
| Sets the output. | |
| AsyncMotionProfileControllerBuilder & | withOutput (const std::shared_ptr< ControllerOutput< double > > &ioutput, const QLength &idiameter, const AbstractMotor::GearsetRatioPair &ipair) |
| Sets the output. | |
| AsyncMotionProfileControllerBuilder & | withOutput (ChassisController &icontroller) |
| 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. | |
| AsyncMotionProfileControllerBuilder & | withLimits (const PathfinderLimits &ilimits) |
| Sets the limits. | |
| AsyncMotionProfileControllerBuilder & | withTimeUtilFactory (const TimeUtilFactory &itimeUtilFactory) |
| Sets the TimeUtilFactory used when building the controller. | |
| 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 once the current task is deleted. | |
| AsyncMotionProfileControllerBuilder & | notParentedToCurrentTask () |
| Prevents parenting the internal tasks started by this builder to the current task, meaning they will not be deleted once the current task is deleted. | |
| std::shared_ptr< AsyncLinearMotionProfileController > | buildLinearMotionProfileController () |
| Builds the AsyncLinearMotionProfileController. | |
| std::shared_ptr< AsyncMotionProfileController > | buildMotionProfileController () |
| Builds the AsyncMotionProfileController. | |
Definition at line 17 of file asyncMotionProfileControllerBuilder.hpp.
|
explicit |
A builder that creates async motion profile controllers.
Use this to build an AsyncMotionProfileController or an AsyncLinearMotionProfileController.
| ilogger | The logger this instance will log to. |
| std::shared_ptr< AsyncLinearMotionProfileController > okapi::AsyncMotionProfileControllerBuilder::buildLinearMotionProfileController | ( | ) |
Builds the AsyncLinearMotionProfileController.
| std::shared_ptr< AsyncMotionProfileController > okapi::AsyncMotionProfileControllerBuilder::buildMotionProfileController | ( | ) |
Builds the AsyncMotionProfileController.
| AsyncMotionProfileControllerBuilder & okapi::AsyncMotionProfileControllerBuilder::notParentedToCurrentTask | ( | ) |
Prevents parenting the internal tasks started by this builder to the current task, meaning they will not be deleted once the current task is deleted.
This can cause runaway tasks, but is sometimes the desired behavior (e.x., if you want to use this builder once in autonomous and then again in opcontrol).
Read more about this in the [builders and tasks tutorial] (docs/tutorials/concepts/builders-and-tasks.md).
| AsyncMotionProfileControllerBuilder & okapi::AsyncMotionProfileControllerBuilder::parentedToCurrentTask | ( | ) |
Parents the internal tasks started by this builder to the current task, meaning they will be deleted once the current task is deleted.
The initialize and competition_initialize tasks are never parented to. This is the default behavior.
Read more about this in the [builders and tasks tutorial] (docs/tutorials/concepts/builders-and-tasks.md).
| AsyncMotionProfileControllerBuilder & okapi::AsyncMotionProfileControllerBuilder::withLimits | ( | const PathfinderLimits & | ilimits | ) |
Sets the limits.
| ilimits | The limits. |
| AsyncMotionProfileControllerBuilder & okapi::AsyncMotionProfileControllerBuilder::withLogger | ( | const std::shared_ptr< Logger > & | ilogger | ) |
Sets the logger.
| ilogger | The logger. |
| AsyncMotionProfileControllerBuilder & okapi::AsyncMotionProfileControllerBuilder::withOutput | ( | ChassisController & | icontroller | ) |
Sets the output.
This must be used with buildMotionProfileController().
| icontroller | The chassis controller to use. |
| AsyncMotionProfileControllerBuilder & okapi::AsyncMotionProfileControllerBuilder::withOutput | ( | const Motor & | ioutput, |
| const QLength & | idiameter, | ||
| const AbstractMotor::GearsetRatioPair & | ipair | ||
| ) |
Sets the output.
This must be used with buildLinearMotionProfileController().
| ioutput | The output. |
| idiameter | The diameter of the mechanical part the motor spins. |
| ipair | The gearset. |
| AsyncMotionProfileControllerBuilder & okapi::AsyncMotionProfileControllerBuilder::withOutput | ( | const MotorGroup & | ioutput, |
| const QLength & | idiameter, | ||
| const AbstractMotor::GearsetRatioPair & | ipair | ||
| ) |
Sets the output.
This must be used with buildLinearMotionProfileController().
| ioutput | The output. |
| idiameter | The diameter of the mechanical part the motor spins. |
| ipair | The gearset. |
| AsyncMotionProfileControllerBuilder & okapi::AsyncMotionProfileControllerBuilder::withOutput | ( | const std::shared_ptr< ChassisController > & | icontroller | ) |
Sets the output.
This must be used with buildMotionProfileController().
| icontroller | The chassis controller to use. |
| AsyncMotionProfileControllerBuilder & okapi::AsyncMotionProfileControllerBuilder::withOutput | ( | const std::shared_ptr< ChassisModel > & | imodel, |
| const ChassisScales & | iscales, | ||
| const AbstractMotor::GearsetRatioPair & | ipair | ||
| ) |
Sets the output.
This must be used with buildMotionProfileController().
| imodel | The chassis model to use. |
| iscales | The chassis dimensions. |
| ipair | The gearset. |
| AsyncMotionProfileControllerBuilder & okapi::AsyncMotionProfileControllerBuilder::withOutput | ( | const std::shared_ptr< ControllerOutput< double > > & | ioutput, |
| const QLength & | idiameter, | ||
| const AbstractMotor::GearsetRatioPair & | ipair | ||
| ) |
Sets the output.
This must be used with buildLinearMotionProfileController().
| ioutput | The output. |
| idiameter | The diameter of the mechanical part the motor spins. |
| ipair | The gearset. |
| AsyncMotionProfileControllerBuilder & okapi::AsyncMotionProfileControllerBuilder::withTimeUtilFactory | ( | const TimeUtilFactory & | itimeUtilFactory | ) |
Sets the TimeUtilFactory used when building the controller.
The default is the static TimeUtilFactory.
| itimeUtilFactory | The TimeUtilFactory. |