|
| 1 | +#pragma once |
| 2 | + |
| 3 | +#include <string> |
| 4 | + |
| 5 | +#include <viam/api/common/v1/common.pb.h> |
| 6 | +#include <viam/sdk/common/proto_convert.hpp> |
| 7 | +#include <viam/sdk/common/proto_value.hpp> |
| 8 | + |
| 9 | +namespace viam { |
| 10 | +namespace sdk { |
| 11 | + |
| 12 | +/// @defgroup Kinematics Classes related to Kinematics configuration |
| 13 | + |
| 14 | +/// @enum KinematicsType |
| 15 | +/// @brief Defines the type of kinematics configuration. |
| 16 | +/// @ingroup Kinematics |
| 17 | +enum class KinematicsType { |
| 18 | + KINEMATICS_TYPE_UNSPECIFIED = 0, |
| 19 | + KINEMATICS_TYPE_SIX_AXIS_ARM = 1, |
| 20 | + KINEMATICS_TYPE_GANTRY = 2, |
| 21 | + KINEMATICS_TYPE_CARTESIAN = 3, |
| 22 | + KINEMATICS_TYPE_CUSTOM = 4 |
| 23 | +}; |
| 24 | + |
| 25 | +/// @struct KinematicsFileConfig |
| 26 | +/// @brief Defines the kinematics configuration of a component. |
| 27 | +/// @ingroup Kinematics |
| 28 | +struct KinematicsFileConfig { |
| 29 | + /// @brief The type of kinematics configuration. |
| 30 | + KinematicsType kinematics_type; |
| 31 | + /// @brief Additional arguments to the method. |
| 32 | + ProtoStruct extra; |
| 33 | + |
| 34 | + /// @brief Equality operator for `KinematicsFileConfig`. |
| 35 | + bool operator==(const KinematicsFileConfig& other) const; |
| 36 | +}; |
| 37 | + |
| 38 | +/// @brief Convert an SDK `KinematicsFileConfig` to its corresponding API proto type. |
| 39 | +/// @param kinematics The SDK `KinematicsFileConfig` to convert. |
| 40 | +/// @return The API proto `viam::common::v1::KinematicsFileConfig`. |
| 41 | +viam::common::v1::KinematicsFileConfig to_proto(const KinematicsFileConfig& kinematics); |
| 42 | + |
| 43 | +/// @brief Convert an API proto `viam::common::v1::KinematicsFileConfig` to its corresponding SDK type. |
| 44 | +/// @param proto The API proto `viam::common::v1::KinematicsFileConfig` to convert. |
| 45 | +/// @return The SDK `KinematicsFileConfig`. |
| 46 | +KinematicsFileConfig from_proto(const viam::common::v1::KinematicsFileConfig& proto); |
| 47 | + |
| 48 | +} // namespace sdk |
| 49 | +} // namespace viam |
0 commit comments