Loading [MathJax]/extensions/tex2jax.js
CTRE Phoenix 6 C++ 25.4.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
DynamicMotionMagicDutyCycle.hpp
Go to the documentation of this file.
1/*
2 * Copyright (C) Cross The Road Electronics.  All rights reserved.
3 * License information can be found in CTRE_LICENSE.txt
4 * For support and suggestions contact support@ctr-electronics.com or file
5 * an issue tracker at https://github.com/CrossTheRoadElec/Phoenix-Releases
6 */
7#pragma once
8
11#include <sstream>
12
13#include <units/frequency.h>
14#include <units/time.h>
15#include <units/angle.h>
16#include <units/angular_velocity.h>
17#include <units/angular_acceleration.h>
18#include <units/angular_jerk.h>
19#include <units/dimensionless.h>
20
21namespace ctre {
22namespace phoenix6 {
23namespace controls {
24
25/**
26 * Requires Phoenix Pro and CANivore;
27 * Requests Motion Magic® to target a final position using a motion profile.
28 * This dynamic request allows runtime changes to Cruise Velocity, Acceleration,
29 * and Jerk. Users can optionally provide a duty cycle feedforward. This
30 * control requires use of a CANivore.
31 *
32 * Motion Magic® produces a motion profile in real-time while attempting to honor the specified Cruise
33 * Velocity, Acceleration, and (optional) Jerk. This control mode does not use the Expo_kV or Expo_kA
34 * configs.
35 *
36 * Target position can be changed on-the-fly and Motion Magic® will do its best to adjust the profile. This
37 * control mode is duty cycle based, so relevant closed-loop gains will use fractional duty cycle for the
38 * numerator: +1.0 represents full forward output.
39 */
41{
42 ctre::phoenix::StatusCode SendRequest(const char *network, uint32_t deviceHash, std::shared_ptr<ControlRequest> &req) const override
43 {
44 if (req.get() != this)
45 {
46 auto const reqCast = dynamic_cast<DynamicMotionMagicDutyCycle *>(req.get());
47 if (reqCast != nullptr)
48 {
49 *reqCast = *this;
50 }
51 else
52 {
53 req = std::make_shared<DynamicMotionMagicDutyCycle>(*this);
54 }
55 }
56
58 }
59
60public:
61 /**
62 * \brief Position to drive toward in rotations.
63 *
64 * - Units: rotations
65 *
66 */
67 units::angle::turn_t Position;
68 /**
69 * \brief Cruise velocity for profiling. The signage does not matter as the
70 * device will use the absolute value for profile generation.
71 *
72 * - Units: rotations per second
73 *
74 */
75 units::angular_velocity::turns_per_second_t Velocity;
76 /**
77 * \brief Acceleration for profiling. The signage does not matter as the device
78 * will use the absolute value for profile generation
79 *
80 * - Units: rotations per second²
81 *
82 */
83 units::angular_acceleration::turns_per_second_squared_t Acceleration;
84 /**
85 * \brief Jerk for profiling. The signage does not matter as the device will
86 * use the absolute value for profile generation.
87 *
88 * Jerk is optional; if this is set to zero, then Motion Magic® will not apply a
89 * Jerk limit.
90 *
91 * - Units: rotations per second³
92 *
93 */
94 units::angular_jerk::turns_per_second_cubed_t Jerk;
95 /**
96 * \brief Set to true to use FOC commutation (requires Phoenix Pro), which
97 * increases peak power by ~15% on supported devices (see
98 * hardware#traits#SupportsFOC). Set to false to use trapezoidal commutation.
99 *
100 * FOC improves motor performance by leveraging torque (current) control.
101 * However, this may be inconvenient for applications that require specifying
102 * duty cycle or voltage. CTR-Electronics has developed a hybrid method that
103 * combines the performances gains of FOC while still allowing applications to
104 * provide duty cycle or voltage demand. This not to be confused with simple
105 * sinusoidal control or phase voltage control which lacks the performance
106 * gains.
107 */
108 bool EnableFOC = true;
109 /**
110 * \brief Feedforward to apply in fractional units between -1 and +1.
111 *
112 * - Units: fractional
113 *
114 */
115 units::dimensionless::scalar_t FeedForward = 0.0;
116 /**
117 * \brief Select which gains are applied by selecting the slot. Use the
118 * configuration api to set the gain values for the selected slot before
119 * enabling this feature. Slot must be within [0,2].
120 */
121 int Slot = 0;
122 /**
123 * \brief Set to true to static-brake the rotor when output is zero (or within
124 * deadband). Set to false to use the NeutralMode configuration setting
125 * (default). This flag exists to provide the fundamental behavior of this
126 * control when output is zero, which is to provide 0V to the motor.
127 */
129 /**
130 * \brief Set to true to force forward limiting. This allows users to use other
131 * limit switch sensors connected to robot controller. This also allows use of
132 * active sensors that require external power.
133 */
134 bool LimitForwardMotion = false;
135 /**
136 * \brief Set to true to force reverse limiting. This allows users to use other
137 * limit switch sensors connected to robot controller. This also allows use of
138 * active sensors that require external power.
139 */
140 bool LimitReverseMotion = false;
141 /**
142 * \brief Set to true to ignore hardware limit switches and the
143 * LimitForwardMotion and LimitReverseMotion parameters, instead allowing
144 * motion.
145 *
146 * This can be useful on mechanisms such as an intake/feeder, where a limit
147 * switch stops motion while intaking but should be ignored when feeding to a
148 * shooter.
149 *
150 * The hardware limit faults and Forward/ReverseLimit signals will still report
151 * the values of the limit switches regardless of this parameter.
152 */
154 /**
155 * \brief Set to true to delay applying this control request until a timesync
156 * boundary (requires Phoenix Pro and CANivore). This eliminates the impact of
157 * nondeterministic network delays in exchange for a larger but deterministic
158 * control latency.
159 *
160 * This requires setting the ControlTimesyncFreqHz config in MotorOutputConfigs.
161 * Additionally, when this is enabled, the UpdateFreqHz of this request should
162 * be set to 0 Hz.
163 */
164 bool UseTimesync = false;
165
166 /**
167 * \brief The period at which this control will update at.
168 * This is designated in Hertz, with a minimum of 20 Hz
169 * (every 50 ms) and a maximum of 1000 Hz (every 1 ms).
170 *
171 * If this field is set to 0 Hz, the control request will
172 * be sent immediately as a one-shot frame. This may be useful
173 * for advanced applications that require outputs to be
174 * synchronized with data acquisition. In this case, we
175 * recommend not exceeding 50 ms between control calls.
176 */
177 units::frequency::hertz_t UpdateFreqHz{100_Hz};
178
179 /**
180 * \brief Requires Phoenix Pro and CANivore;
181 * Requests Motion Magic® to target a final position using a motion
182 * profile. This dynamic request allows runtime changes to Cruise
183 * Velocity, Acceleration, and Jerk. Users can optionally provide a duty
184 * cycle feedforward. This control requires use of a CANivore.
185 *
186 * \details Motion Magic® produces a motion profile in real-time while
187 * attempting to honor the specified Cruise Velocity, Acceleration, and
188 * (optional) Jerk. This control mode does not use the Expo_kV or
189 * Expo_kA configs.
190 *
191 * Target position can be changed on-the-fly and Motion Magic® will do
192 * its best to adjust the profile. This control mode is duty cycle
193 * based, so relevant closed-loop gains will use fractional duty cycle
194 * for the numerator: +1.0 represents full forward output.
195 *
196 * \param Position Position to drive toward in rotations.
197 * \param Velocity Cruise velocity for profiling. The signage does not
198 * matter as the device will use the absolute value for
199 * profile generation.
200 * \param Acceleration Acceleration for profiling. The signage does not
201 * matter as the device will use the absolute value for
202 * profile generation
203 * \param Jerk Jerk for profiling. The signage does not matter as the device
204 * will use the absolute value for profile generation.
205 *
206 * Jerk is optional; if this is set to zero, then Motion Magic®
207 * will not apply a Jerk limit.
208 */
209 DynamicMotionMagicDutyCycle(units::angle::turn_t Position, units::angular_velocity::turns_per_second_t Velocity, units::angular_acceleration::turns_per_second_squared_t Acceleration, units::angular_jerk::turns_per_second_cubed_t Jerk) : ControlRequest{"DynamicMotionMagicDutyCycle"},
210 Position{std::move(Position)},
211 Velocity{std::move(Velocity)},
213 Jerk{std::move(Jerk)}
214 {}
215
216 /**
217 * \brief Modifies this Control Request's Position parameter and returns itself for
218 * method-chaining and easier to use request API.
219 *
220 * Position to drive toward in rotations.
221 *
222 * - Units: rotations
223 *
224 *
225 * \param newPosition Parameter to modify
226 * \returns Itself
227 */
228 DynamicMotionMagicDutyCycle &WithPosition(units::angle::turn_t newPosition)
229 {
230 Position = std::move(newPosition);
231 return *this;
232 }
233
234 /**
235 * \brief Modifies this Control Request's Velocity parameter and returns itself for
236 * method-chaining and easier to use request API.
237 *
238 * Cruise velocity for profiling. The signage does not matter as the device
239 * will use the absolute value for profile generation.
240 *
241 * - Units: rotations per second
242 *
243 *
244 * \param newVelocity Parameter to modify
245 * \returns Itself
246 */
247 DynamicMotionMagicDutyCycle &WithVelocity(units::angular_velocity::turns_per_second_t newVelocity)
248 {
249 Velocity = std::move(newVelocity);
250 return *this;
251 }
252
253 /**
254 * \brief Modifies this Control Request's Acceleration parameter and returns itself for
255 * method-chaining and easier to use request API.
256 *
257 * Acceleration for profiling. The signage does not matter as the device will
258 * use the absolute value for profile generation
259 *
260 * - Units: rotations per second²
261 *
262 *
263 * \param newAcceleration Parameter to modify
264 * \returns Itself
265 */
266 DynamicMotionMagicDutyCycle &WithAcceleration(units::angular_acceleration::turns_per_second_squared_t newAcceleration)
267 {
268 Acceleration = std::move(newAcceleration);
269 return *this;
270 }
271
272 /**
273 * \brief Modifies this Control Request's Jerk parameter and returns itself for
274 * method-chaining and easier to use request API.
275 *
276 * Jerk for profiling. The signage does not matter as the device will use the
277 * absolute value for profile generation.
278 *
279 * Jerk is optional; if this is set to zero, then Motion Magic® will not apply a
280 * Jerk limit.
281 *
282 * - Units: rotations per second³
283 *
284 *
285 * \param newJerk Parameter to modify
286 * \returns Itself
287 */
288 DynamicMotionMagicDutyCycle &WithJerk(units::angular_jerk::turns_per_second_cubed_t newJerk)
289 {
290 Jerk = std::move(newJerk);
291 return *this;
292 }
293
294 /**
295 * \brief Modifies this Control Request's EnableFOC parameter and returns itself for
296 * method-chaining and easier to use request API.
297 *
298 * Set to true to use FOC commutation (requires Phoenix Pro), which increases
299 * peak power by ~15% on supported devices (see hardware#traits#SupportsFOC).
300 * Set to false to use trapezoidal commutation.
301 *
302 * FOC improves motor performance by leveraging torque (current) control.
303 * However, this may be inconvenient for applications that require specifying
304 * duty cycle or voltage. CTR-Electronics has developed a hybrid method that
305 * combines the performances gains of FOC while still allowing applications to
306 * provide duty cycle or voltage demand. This not to be confused with simple
307 * sinusoidal control or phase voltage control which lacks the performance
308 * gains.
309 *
310 * \param newEnableFOC Parameter to modify
311 * \returns Itself
312 */
314 {
315 EnableFOC = std::move(newEnableFOC);
316 return *this;
317 }
318
319 /**
320 * \brief Modifies this Control Request's FeedForward parameter and returns itself for
321 * method-chaining and easier to use request API.
322 *
323 * Feedforward to apply in fractional units between -1 and +1.
324 *
325 * - Units: fractional
326 *
327 *
328 * \param newFeedForward Parameter to modify
329 * \returns Itself
330 */
331 DynamicMotionMagicDutyCycle &WithFeedForward(units::dimensionless::scalar_t newFeedForward)
332 {
333 FeedForward = std::move(newFeedForward);
334 return *this;
335 }
336
337 /**
338 * \brief Modifies this Control Request's Slot parameter and returns itself for
339 * method-chaining and easier to use request API.
340 *
341 * Select which gains are applied by selecting the slot. Use the configuration
342 * api to set the gain values for the selected slot before enabling this
343 * feature. Slot must be within [0,2].
344 *
345 * \param newSlot Parameter to modify
346 * \returns Itself
347 */
349 {
350 Slot = std::move(newSlot);
351 return *this;
352 }
353
354 /**
355 * \brief Modifies this Control Request's OverrideBrakeDurNeutral parameter and returns itself for
356 * method-chaining and easier to use request API.
357 *
358 * Set to true to static-brake the rotor when output is zero (or within
359 * deadband). Set to false to use the NeutralMode configuration setting
360 * (default). This flag exists to provide the fundamental behavior of this
361 * control when output is zero, which is to provide 0V to the motor.
362 *
363 * \param newOverrideBrakeDurNeutral Parameter to modify
364 * \returns Itself
365 */
367 {
368 OverrideBrakeDurNeutral = std::move(newOverrideBrakeDurNeutral);
369 return *this;
370 }
371
372 /**
373 * \brief Modifies this Control Request's LimitForwardMotion parameter and returns itself for
374 * method-chaining and easier to use request API.
375 *
376 * Set to true to force forward limiting. This allows users to use other limit
377 * switch sensors connected to robot controller. This also allows use of active
378 * sensors that require external power.
379 *
380 * \param newLimitForwardMotion Parameter to modify
381 * \returns Itself
382 */
384 {
385 LimitForwardMotion = std::move(newLimitForwardMotion);
386 return *this;
387 }
388
389 /**
390 * \brief Modifies this Control Request's LimitReverseMotion parameter and returns itself for
391 * method-chaining and easier to use request API.
392 *
393 * Set to true to force reverse limiting. This allows users to use other limit
394 * switch sensors connected to robot controller. This also allows use of active
395 * sensors that require external power.
396 *
397 * \param newLimitReverseMotion Parameter to modify
398 * \returns Itself
399 */
401 {
402 LimitReverseMotion = std::move(newLimitReverseMotion);
403 return *this;
404 }
405
406 /**
407 * \brief Modifies this Control Request's IgnoreHardwareLimits parameter and returns itself for
408 * method-chaining and easier to use request API.
409 *
410 * Set to true to ignore hardware limit switches and the LimitForwardMotion and
411 * LimitReverseMotion parameters, instead allowing motion.
412 *
413 * This can be useful on mechanisms such as an intake/feeder, where a limit
414 * switch stops motion while intaking but should be ignored when feeding to a
415 * shooter.
416 *
417 * The hardware limit faults and Forward/ReverseLimit signals will still report
418 * the values of the limit switches regardless of this parameter.
419 *
420 * \param newIgnoreHardwareLimits Parameter to modify
421 * \returns Itself
422 */
424 {
425 IgnoreHardwareLimits = std::move(newIgnoreHardwareLimits);
426 return *this;
427 }
428
429 /**
430 * \brief Modifies this Control Request's UseTimesync parameter and returns itself for
431 * method-chaining and easier to use request API.
432 *
433 * Set to true to delay applying this control request until a timesync boundary
434 * (requires Phoenix Pro and CANivore). This eliminates the impact of
435 * nondeterministic network delays in exchange for a larger but deterministic
436 * control latency.
437 *
438 * This requires setting the ControlTimesyncFreqHz config in MotorOutputConfigs.
439 * Additionally, when this is enabled, the UpdateFreqHz of this request should
440 * be set to 0 Hz.
441 *
442 * \param newUseTimesync Parameter to modify
443 * \returns Itself
444 */
446 {
447 UseTimesync = std::move(newUseTimesync);
448 return *this;
449 }
450 /**
451 * \brief Sets the period at which this control will update at.
452 * This is designated in Hertz, with a minimum of 20 Hz
453 * (every 50 ms) and a maximum of 1000 Hz (every 1 ms).
454 *
455 * If this field is set to 0 Hz, the control request will
456 * be sent immediately as a one-shot frame. This may be useful
457 * for advanced applications that require outputs to be
458 * synchronized with data acquisition. In this case, we
459 * recommend not exceeding 50 ms between control calls.
460 *
461 * \param newUpdateFreqHz Parameter to modify
462 * \returns Itself
463 */
464 DynamicMotionMagicDutyCycle &WithUpdateFreqHz(units::frequency::hertz_t newUpdateFreqHz)
465 {
466 UpdateFreqHz = newUpdateFreqHz;
467 return *this;
468 }
469 /**
470 * \brief Returns a string representation of the object.
471 *
472 * \returns a string representation of the object.
473 */
474 std::string ToString() const override
475 {
476 std::stringstream ss;
477 ss << "Control: DynamicMotionMagicDutyCycle" << std::endl;
478 ss << " Position: " << Position.to<double>() << " rotations" << std::endl;
479 ss << " Velocity: " << Velocity.to<double>() << " rotations per second" << std::endl;
480 ss << " Acceleration: " << Acceleration.to<double>() << " rotations per second²" << std::endl;
481 ss << " Jerk: " << Jerk.to<double>() << " rotations per second³" << std::endl;
482 ss << " EnableFOC: " << EnableFOC << std::endl;
483 ss << " FeedForward: " << FeedForward.to<double>() << " fractional" << std::endl;
484 ss << " Slot: " << Slot << std::endl;
485 ss << " OverrideBrakeDurNeutral: " << OverrideBrakeDurNeutral << std::endl;
486 ss << " LimitForwardMotion: " << LimitForwardMotion << std::endl;
487 ss << " LimitReverseMotion: " << LimitReverseMotion << std::endl;
488 ss << " IgnoreHardwareLimits: " << IgnoreHardwareLimits << std::endl;
489 ss << " UseTimesync: " << UseTimesync << std::endl;
490 return ss.str();
491 }
492
493 /**
494 * \brief Gets information about this control request.
495 *
496 * \returns Map of control parameter names and corresponding applied values
497 */
498 std::map<std::string, std::string> GetControlInfo() const override
499 {
500 std::map<std::string, std::string> controlInfo;
501 std::stringstream ss;
502 controlInfo["Name"] = GetName();
503 ss << Position.to<double>(); controlInfo["Position"] = ss.str(); ss.str(std::string{});
504 ss << Velocity.to<double>(); controlInfo["Velocity"] = ss.str(); ss.str(std::string{});
505 ss << Acceleration.to<double>(); controlInfo["Acceleration"] = ss.str(); ss.str(std::string{});
506 ss << Jerk.to<double>(); controlInfo["Jerk"] = ss.str(); ss.str(std::string{});
507 ss << EnableFOC; controlInfo["EnableFOC"] = ss.str(); ss.str(std::string{});
508 ss << FeedForward.to<double>(); controlInfo["FeedForward"] = ss.str(); ss.str(std::string{});
509 ss << Slot; controlInfo["Slot"] = ss.str(); ss.str(std::string{});
510 ss << OverrideBrakeDurNeutral; controlInfo["OverrideBrakeDurNeutral"] = ss.str(); ss.str(std::string{});
511 ss << LimitForwardMotion; controlInfo["LimitForwardMotion"] = ss.str(); ss.str(std::string{});
512 ss << LimitReverseMotion; controlInfo["LimitReverseMotion"] = ss.str(); ss.str(std::string{});
513 ss << IgnoreHardwareLimits; controlInfo["IgnoreHardwareLimits"] = ss.str(); ss.str(std::string{});
514 ss << UseTimesync; controlInfo["UseTimesync"] = ss.str(); ss.str(std::string{});
515 return controlInfo;
516 }
517};
518
519}
520}
521}
522
CTREXPORT int c_ctre_phoenix6_RequestControlDynamicMotionMagicDutyCycle(const char *canbus, uint32_t ecuEncoding, double updateFrequency, double Position, double Velocity, double Acceleration, double Jerk, bool EnableFOC, double FeedForward, int Slot, bool OverrideBrakeDurNeutral, bool LimitForwardMotion, bool LimitReverseMotion, bool IgnoreHardwareLimits, bool UseTimesync)
Abstract Control Request class that other control requests extend for use.
Definition ControlRequest.hpp:30
std::string const & GetName() const
Definition ControlRequest.hpp:53
Requires Phoenix Pro and CANivore; Requests Motion Magic® to target a final position using a motion p...
Definition DynamicMotionMagicDutyCycle.hpp:41
std::string ToString() const override
Returns a string representation of the object.
Definition DynamicMotionMagicDutyCycle.hpp:474
DynamicMotionMagicDutyCycle & WithUseTimesync(bool newUseTimesync)
Modifies this Control Request's UseTimesync parameter and returns itself for method-chaining and easi...
Definition DynamicMotionMagicDutyCycle.hpp:445
units::angular_velocity::turns_per_second_t Velocity
Cruise velocity for profiling.
Definition DynamicMotionMagicDutyCycle.hpp:75
units::angular_acceleration::turns_per_second_squared_t Acceleration
Acceleration for profiling.
Definition DynamicMotionMagicDutyCycle.hpp:83
bool OverrideBrakeDurNeutral
Set to true to static-brake the rotor when output is zero (or within deadband).
Definition DynamicMotionMagicDutyCycle.hpp:128
units::frequency::hertz_t UpdateFreqHz
The period at which this control will update at.
Definition DynamicMotionMagicDutyCycle.hpp:177
DynamicMotionMagicDutyCycle(units::angle::turn_t Position, units::angular_velocity::turns_per_second_t Velocity, units::angular_acceleration::turns_per_second_squared_t Acceleration, units::angular_jerk::turns_per_second_cubed_t Jerk)
Requires Phoenix Pro and CANivore; Requests Motion Magic® to target a final position using a motion p...
Definition DynamicMotionMagicDutyCycle.hpp:209
bool EnableFOC
Set to true to use FOC commutation (requires Phoenix Pro), which increases peak power by ~15% on supp...
Definition DynamicMotionMagicDutyCycle.hpp:108
DynamicMotionMagicDutyCycle & WithVelocity(units::angular_velocity::turns_per_second_t newVelocity)
Modifies this Control Request's Velocity parameter and returns itself for method-chaining and easier ...
Definition DynamicMotionMagicDutyCycle.hpp:247
units::angular_jerk::turns_per_second_cubed_t Jerk
Jerk for profiling.
Definition DynamicMotionMagicDutyCycle.hpp:94
DynamicMotionMagicDutyCycle & WithSlot(int newSlot)
Modifies this Control Request's Slot parameter and returns itself for method-chaining and easier to u...
Definition DynamicMotionMagicDutyCycle.hpp:348
DynamicMotionMagicDutyCycle & WithAcceleration(units::angular_acceleration::turns_per_second_squared_t newAcceleration)
Modifies this Control Request's Acceleration parameter and returns itself for method-chaining and eas...
Definition DynamicMotionMagicDutyCycle.hpp:266
bool LimitForwardMotion
Set to true to force forward limiting.
Definition DynamicMotionMagicDutyCycle.hpp:134
DynamicMotionMagicDutyCycle & WithLimitForwardMotion(bool newLimitForwardMotion)
Modifies this Control Request's LimitForwardMotion parameter and returns itself for method-chaining a...
Definition DynamicMotionMagicDutyCycle.hpp:383
DynamicMotionMagicDutyCycle & WithUpdateFreqHz(units::frequency::hertz_t newUpdateFreqHz)
Sets the period at which this control will update at.
Definition DynamicMotionMagicDutyCycle.hpp:464
bool IgnoreHardwareLimits
Set to true to ignore hardware limit switches and the LimitForwardMotion and LimitReverseMotion param...
Definition DynamicMotionMagicDutyCycle.hpp:153
bool LimitReverseMotion
Set to true to force reverse limiting.
Definition DynamicMotionMagicDutyCycle.hpp:140
DynamicMotionMagicDutyCycle & WithOverrideBrakeDurNeutral(bool newOverrideBrakeDurNeutral)
Modifies this Control Request's OverrideBrakeDurNeutral parameter and returns itself for method-chain...
Definition DynamicMotionMagicDutyCycle.hpp:366
DynamicMotionMagicDutyCycle & WithIgnoreHardwareLimits(bool newIgnoreHardwareLimits)
Modifies this Control Request's IgnoreHardwareLimits parameter and returns itself for method-chaining...
Definition DynamicMotionMagicDutyCycle.hpp:423
DynamicMotionMagicDutyCycle & WithEnableFOC(bool newEnableFOC)
Modifies this Control Request's EnableFOC parameter and returns itself for method-chaining and easier...
Definition DynamicMotionMagicDutyCycle.hpp:313
DynamicMotionMagicDutyCycle & WithJerk(units::angular_jerk::turns_per_second_cubed_t newJerk)
Modifies this Control Request's Jerk parameter and returns itself for method-chaining and easier to u...
Definition DynamicMotionMagicDutyCycle.hpp:288
std::map< std::string, std::string > GetControlInfo() const override
Gets information about this control request.
Definition DynamicMotionMagicDutyCycle.hpp:498
DynamicMotionMagicDutyCycle & WithFeedForward(units::dimensionless::scalar_t newFeedForward)
Modifies this Control Request's FeedForward parameter and returns itself for method-chaining and easi...
Definition DynamicMotionMagicDutyCycle.hpp:331
DynamicMotionMagicDutyCycle & WithLimitReverseMotion(bool newLimitReverseMotion)
Modifies this Control Request's LimitReverseMotion parameter and returns itself for method-chaining a...
Definition DynamicMotionMagicDutyCycle.hpp:400
units::angle::turn_t Position
Position to drive toward in rotations.
Definition DynamicMotionMagicDutyCycle.hpp:67
int Slot
Select which gains are applied by selecting the slot.
Definition DynamicMotionMagicDutyCycle.hpp:121
DynamicMotionMagicDutyCycle & WithPosition(units::angle::turn_t newPosition)
Modifies this Control Request's Position parameter and returns itself for method-chaining and easier ...
Definition DynamicMotionMagicDutyCycle.hpp:228
bool UseTimesync
Set to true to delay applying this control request until a timesync boundary (requires Phoenix Pro an...
Definition DynamicMotionMagicDutyCycle.hpp:164
units::dimensionless::scalar_t FeedForward
Feedforward to apply in fractional units between -1 and +1.
Definition DynamicMotionMagicDutyCycle.hpp:115
Status codes reported by APIs, including OK, warnings, and errors.
Definition StatusCodes.h:27
Definition Diff_PositionDutyCycle_Position.hpp:15
Definition span.hpp:401