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