vulp  2.3.0
resolution.h
Go to the documentation of this file.
1 // SPDX-License-Identifier: Apache-2.0
2 // Copyright 2022 Stéphane Caron
3 
4 #pragma once
5 
6 #include "vulp/actuation/moteus/PositionResolution.h"
7 #include "vulp/actuation/moteus/QueryCommand.h"
8 
9 namespace vulp::actuation {
10 
18 inline actuation::moteus::QueryCommand get_query_resolution() {
19  using actuation::moteus::Resolution;
20  actuation::moteus::QueryCommand query;
21  query.mode = Resolution::kInt16;
22  query.position = Resolution::kInt32;
23  query.velocity = Resolution::kInt32;
24  query.torque = Resolution::kInt32;
25  query.q_current = Resolution::kIgnore;
26  query.d_current = Resolution::kIgnore;
27  query.rezero_state = Resolution::kIgnore;
28  query.voltage = Resolution::kInt8;
29  query.temperature = Resolution::kInt8;
30  query.fault = Resolution::kInt8;
31  return query;
32 }
33 
41 inline actuation::moteus::PositionResolution get_position_resolution() {
42  using actuation::moteus::Resolution;
43  actuation::moteus::PositionResolution resolution;
44  resolution.position = Resolution::kFloat;
45  resolution.velocity = Resolution::kFloat;
46  resolution.feedforward_torque = Resolution::kIgnore;
47  resolution.kp_scale = Resolution::kFloat;
48  resolution.kd_scale = Resolution::kFloat;
49  resolution.maximum_torque = Resolution::kFloat;
50  resolution.stop_position = Resolution::kIgnore;
51  resolution.watchdog_timeout = Resolution::kIgnore;
52  return resolution;
53 }
54 
55 } // namespace vulp::actuation
Send actions to actuators or simulators.
Definition: bullet_utils.h:13
actuation::moteus::QueryCommand get_query_resolution()
Query resolution settings for all servo commands.
Definition: resolution.h:18
actuation::moteus::PositionResolution get_position_resolution()
Resolution settings for all servo commands.
Definition: resolution.h:41