8#include <viam/sdk/common/linear_algebra.hpp>
9#include <viam/sdk/common/proto_value.hpp>
10#include <viam/sdk/common/utils.hpp>
11#include <viam/sdk/config/resource.hpp>
12#include <viam/sdk/spatialmath/orientation.hpp>
36 double o_x, o_y, o_z, theta;
47 bool linear_velocity_supported;
48 bool angular_velocity_supported;
49 bool orientation_supported;
50 bool position_supported;
51 bool compass_heading_supported;
52 bool linear_acceleration_supported;
57 inline Vector3 get_linear_velocity() {
58 return get_linear_velocity({});
61 virtual Vector3 get_linear_velocity(
const ProtoStruct& extra) = 0;
63 inline Vector3 get_angular_velocity() {
64 return get_angular_velocity({});
67 virtual Vector3 get_angular_velocity(
const ProtoStruct& extra) = 0;
69 inline compassheading get_compass_heading() {
70 return get_compass_heading({});
73 virtual compassheading get_compass_heading(
const ProtoStruct& extra) = 0;
75 inline orientation get_orientation() {
76 return get_orientation({});
79 virtual orientation get_orientation(
const ProtoStruct& extra) = 0;
82 return get_position({});
85 virtual position get_position(
const ProtoStruct& extra) = 0;
87 inline properties get_properties() {
88 return get_properties({});
91 virtual properties get_properties(
const ProtoStruct& extra) = 0;
93 inline std::unordered_map<std::string, float> get_accuracy() {
94 return get_accuracy({});
97 virtual std::unordered_map<std::string, float> get_accuracy(
const ProtoStruct& extra) = 0;
99 inline Vector3 get_linear_acceleration() {
100 return get_linear_acceleration({});
103 virtual Vector3 get_linear_acceleration(
const ProtoStruct& extra) = 0;
108 virtual ProtoStruct
do_command(
const ProtoStruct& command) = 0;
119 virtual std::vector<GeometryConfig>
get_geometries(
const ProtoStruct& extra) = 0;
Definition resource_api.hpp:21
Definition component.hpp:10
Definition movement_sensor.hpp:24
API api() const override
Returns the API associated with a particular resource.
virtual ProtoStruct do_command(const ProtoStruct &command)=0
Send/receive arbitrary commands to the resource.
virtual std::vector< GeometryConfig > get_geometries(const ProtoStruct &extra)=0
Returns GeometryConfigs associated with the calling movementsensor.
std::vector< GeometryConfig > get_geometries()
Returns GeometryConfigs associated with the calling movementsensor.
Definition movement_sensor.hpp:112
virtual std::string name() const
Return the resource's name.
Current position of the motor relative to its home.
Definition resource_api.hpp:46
Definition movement_sensor.hpp:27
double value
A number from 0-359 where 0 is North, 90 is East, 180 is South, and 270 is West.
Definition movement_sensor.hpp:29
Struct version of viam::common::v1::Orientation. TODO: we already have this in orientation_types....
Definition movement_sensor.hpp:35
Definition movement_sensor.hpp:40
Definition movement_sensor.hpp:46
Definition linear_algebra.hpp:25
Definition geometry.hpp:86