|
5 | 5 |
|
6 | 6 | #include <string>
|
7 | 7 |
|
| 8 | +#include <boost/optional/optional.hpp> |
8 | 9 | #include <boost/variant/variant.hpp>
|
9 | 10 |
|
10 | 11 | #include <viam/api/common/v1/common.pb.h>
|
11 |
| -#include <viam/api/component/arm/v1/arm.pb.h> |
12 | 12 |
|
13 | 13 | #include <viam/sdk/common/pose.hpp>
|
14 | 14 | #include <viam/sdk/resource/stoppable.hpp>
|
@@ -61,6 +61,12 @@ class Arm : public Component, public Stoppable {
|
61 | 61 | using KinematicsData =
|
62 | 62 | boost::variant<KinematicsDataUnspecified, KinematicsDataSVA, KinematicsDataURDF>;
|
63 | 63 |
|
| 64 | + /// @brief Movement specifications for move_through_join_positions. |
| 65 | + struct MoveOptions { |
| 66 | + boost::optional<double> max_vel_degs_per_sec; |
| 67 | + boost::optional<double> max_acc_degs_per_sec2; |
| 68 | + }; |
| 69 | + |
64 | 70 | static KinematicsData from_proto(const viam::common::v1::GetKinematicsResponse& proto);
|
65 | 71 |
|
66 | 72 | /// @brief Get the current position of the end of the arm.
|
@@ -103,6 +109,22 @@ class Arm : public Component, public Stoppable {
|
103 | 109 | virtual void move_to_joint_positions(const std::vector<double>& positions,
|
104 | 110 | const ProtoStruct& extra) = 0;
|
105 | 111 |
|
| 112 | + /// @brief Move each joint on the arm through the positions specified in @param positions |
| 113 | + /// @param options optional specifications to be obeyed during the motion. |
| 114 | + /// TODO consider replacing vector vector with xtensor array, and also if it may be |
| 115 | + /// possible to specify or constrain dimensionality of the array in advance. |
| 116 | + inline void move_through_joint_positions(const std::vector<std::vector<double>>& positions, |
| 117 | + const MoveOptions& options) { |
| 118 | + return move_through_joint_positions(positions, options, {}); |
| 119 | + } |
| 120 | + |
| 121 | + /// @brief Move each joint on the arm through the positions specified in @param positions |
| 122 | + /// @param options optional specifications to be obeyed during the motion. |
| 123 | + /// @param extra Any additional arguments to the method. |
| 124 | + virtual void move_through_joint_positions(const std::vector<std::vector<double>>& positions, |
| 125 | + const MoveOptions& options, |
| 126 | + const ProtoStruct& extra) = 0; |
| 127 | + |
106 | 128 | /// @brief Reports if the arm is in motion.
|
107 | 129 | virtual bool is_moving() = 0;
|
108 | 130 |
|
|
0 commit comments