|
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/sdk/common/pose.hpp> |
@@ -58,6 +59,12 @@ class Arm : public Component, public Stoppable { |
58 | 59 | using KinematicsData = |
59 | 60 | boost::variant<KinematicsDataUnspecified, KinematicsDataSVA, KinematicsDataURDF>; |
60 | 61 |
|
| 62 | + /// @brief Movement specifications for move_through_join_positions. |
| 63 | + struct MoveOptions { |
| 64 | + boost::optional<double> max_vel_degs_per_sec; |
| 65 | + boost::optional<double> max_acc_degs_per_sec2; |
| 66 | + }; |
| 67 | + |
61 | 68 | /// @brief Get the current position of the end of the arm. |
62 | 69 | /// @return The `pose` representing the end position of the arm. |
63 | 70 | inline pose get_end_position() { |
@@ -98,6 +105,22 @@ class Arm : public Component, public Stoppable { |
98 | 105 | virtual void move_to_joint_positions(const std::vector<double>& positions, |
99 | 106 | const ProtoStruct& extra) = 0; |
100 | 107 |
|
| 108 | + /// @brief Move each joint on the arm through the positions specified in @param positions |
| 109 | + /// @param options optional specifications to be obeyed during the motion. |
| 110 | + /// TODO consider replacing vector vector with xtensor array, and also if it may be |
| 111 | + /// possible to specify or constrain dimensionality of the array in advance. |
| 112 | + inline void move_through_joint_positions(const std::vector<std::vector<double>>& positions, |
| 113 | + const MoveOptions& options) { |
| 114 | + return move_through_joint_positions(positions, options, {}); |
| 115 | + } |
| 116 | + |
| 117 | + /// @brief Move each joint on the arm through the positions specified in @param positions |
| 118 | + /// @param options optional specifications to be obeyed during the motion. |
| 119 | + /// @param extra Any additional arguments to the method. |
| 120 | + virtual void move_through_joint_positions(const std::vector<std::vector<double>>& positions, |
| 121 | + const MoveOptions& options, |
| 122 | + const ProtoStruct& extra) = 0; |
| 123 | + |
101 | 124 | /// @brief Reports if the arm is in motion. |
102 | 125 | virtual bool is_moving() = 0; |
103 | 126 |
|
|
0 commit comments