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