8#include <boost/optional/optional.hpp>
9#include <boost/variant/variant.hpp>
11#include <viam/sdk/common/pose.hpp>
12#include <viam/sdk/resource/stoppable.hpp>
13#include <viam/sdk/spatialmath/geometry.hpp>
33 raw_bytes() =
default;
34 raw_bytes(std::vector<unsigned char> b) : bytes(std::move(b)) {}
36 std::vector<unsigned char> bytes{};
40 template <
class DataType>
42 inline friend bool operator==(
const DataType& lhs,
const DataType& rhs) {
43 return lhs.bytes == rhs.bytes;
49 EqCompare<KinematicsDataUnspecified> {};
60 boost::variant<KinematicsDataUnspecified, KinematicsDataSVA, KinematicsDataURDF>;
64 boost::optional<double> max_vel_degs_per_sec;
65 boost::optional<double> max_acc_degs_per_sec2;
106 const ProtoStruct& extra) = 0;
122 const ProtoStruct& extra) = 0;
130 virtual ProtoStruct
do_command(
const ProtoStruct& command) = 0;
152 virtual std::vector<GeometryConfig>
get_geometries(
const ProtoStruct& extra) = 0;
157 explicit Arm(std::string
name);
Extends APIType to additionally define a resource's subtype (e.g., camera).
Definition resource_api.hpp:33
An Arm represents a physical robot arm that exists in three-dimensional space.
Definition arm.hpp:26
virtual bool is_moving()=0
Reports if the arm is in motion.
virtual void move_through_joint_positions(const std::vector< std::vector< double > > &positions, const MoveOptions &options, const ProtoStruct &extra)=0
Move each joint on the arm through the positions specified in.
virtual void move_to_position(const pose &pose, const ProtoStruct &extra)=0
Move the end of the arm to.
virtual std::vector< double > get_joint_positions(const ProtoStruct &extra)=0
Lists the joint positions in degrees of every joint on a robot arm.
KinematicsData get_kinematics()
Get the kinematics data associated with the arm.
Definition arm.hpp:141
std::vector< double > get_joint_positions()
Lists the joint positions in degrees of every joint on a robot arm.
Definition arm.hpp:90
virtual ProtoStruct do_command(const ProtoStruct &command)=0
Send/receive arbitrary commands to the resource.
void move_to_joint_positions(const std::vector< double > &positions)
Move each joint on the arm to the corresponding angle specified in.
Definition arm.hpp:99
virtual KinematicsData get_kinematics(const ProtoStruct &extra)=0
Get the kinematics data associated with the arm.
std::vector< GeometryConfig > get_geometries()
Returns GeometryConfigs associated with the calling arm.
Definition arm.hpp:146
boost::variant< KinematicsDataUnspecified, KinematicsDataSVA, KinematicsDataURDF > KinematicsData
The kinematics of the component.
Definition arm.hpp:59
virtual void move_to_joint_positions(const std::vector< double > &positions, const ProtoStruct &extra)=0
Move each joint on the arm to the corresponding angle specified in.
void move_through_joint_positions(const std::vector< std::vector< double > > &positions, const MoveOptions &options)
Move each joint on the arm through the positions specified in.
Definition arm.hpp:112
pose get_end_position()
Get the current position of the end of the arm.
Definition arm.hpp:70
void move_to_position(const pose &pose)
Move the end of the arm to.
Definition arm.hpp:80
virtual std::vector< GeometryConfig > get_geometries(const ProtoStruct &extra)=0
Returns GeometryConfigs associated with the calling arm.
virtual pose get_end_position(const ProtoStruct &extra)=0
Get the current position of the end of the arm.
API api() const override
Returns the API associated with a particular resource.
Definition component.hpp:10
virtual std::string name() const
Return the resource's name.
Definition stoppable.hpp:8
Definition resource_api.hpp:50
Movement specifications for move_through_join_positions.
Definition arm.hpp:63