Viam C++ SDK current
Loading...
Searching...
No Matches
movement_sensor_client.hpp
Go to the documentation of this file.
1
4#pragma once
5
6#include <grpcpp/channel.h>
7
8#include <viam/api/component/movementsensor/v1/movementsensor.grpc.pb.h>
9
10#include <viam/sdk/common/linear_algebra.hpp>
13#include <viam/sdk/config/resource.hpp>
15
16namespace viam {
17namespace sdk {
18namespace impl {
19
24 public:
26 MovementSensorClient(std::string name, std::shared_ptr<grpc::Channel> channel);
27 Vector3 get_linear_velocity(const AttributeMap& extra) override;
28 Vector3 get_angular_velocity(const AttributeMap& extra) override;
29 compassheading get_compass_heading(const AttributeMap& extra) override;
30 orientation get_orientation(const AttributeMap& extra) override;
31 position get_position(const AttributeMap& extra) override;
32 properties get_properties(const AttributeMap& extra) override;
33 std::unordered_map<std::string, float> get_accuracy(const AttributeMap& extra) override;
34 Vector3 get_linear_acceleration(const AttributeMap& extra) override;
35 AttributeMap do_command(const AttributeMap& command) override;
36 std::vector<GeometryConfig> get_geometries(const AttributeMap& extra) override;
37
38 using MovementSensor::get_accuracy;
39 using MovementSensor::get_angular_velocity;
40 using MovementSensor::get_compass_heading;
42 using MovementSensor::get_linear_acceleration;
43 using MovementSensor::get_linear_velocity;
44 using MovementSensor::get_orientation;
45 using MovementSensor::get_position;
46 using MovementSensor::get_properties;
47
48 private:
49 using StubType = viam::component::movementsensor::v1::MovementSensorService::StubInterface;
50 std::unique_ptr<StubType> stub_;
51 std::shared_ptr<grpc::Channel> channel_;
52};
53
54} // namespace impl
55} // namespace sdk
56} // namespace viam
Definition movement_sensor.hpp:26
std::vector< GeometryConfig > get_geometries()
Returns GeometryConfigs associated with the calling movementsensor.
Definition movement_sensor.hpp:143
virtual std::string name() const
Return the resource's name.
Definition linear_algebra.hpp:15
gRPC client implementation of a MovementSensor component.
Definition movement_sensor_client.hpp:23
std::vector< GeometryConfig > get_geometries(const AttributeMap &extra) override
Returns GeometryConfigs associated with the calling movementsensor.
AttributeMap do_command(const AttributeMap &command) override
Send/receive arbitrary commands to the resource.
gRPC client implementation for a robot.
Defines a MovementSensor component.
Implements a gRPC server for the MovementSensor component.
Definition movement_sensor.hpp:29
Struct version of viam::common::v1::Orientation.
Definition movement_sensor.hpp:36
Definition movement_sensor.hpp:41
Definition movement_sensor.hpp:47