cmvr-es/third_party/AuboSdk/linux/include/aubo/axis_interface.h

382 lines
7.6 KiB
C
Raw Normal View History

2025-11-17 13:48:22 +08:00
/** @file axes.h
* @brief
*/
#ifndef AUBO_SDK_AXIS_INTERFACE_H
#define AUBO_SDK_AXIS_INTERFACE_H
#include <aubo/sync_move.h>
#include <aubo/trace.h>
namespace arcs {
namespace common_interface {
/**
* \~chinese API接口
* \~english External axis API interface
*/
class ARCS_ABI_EXPORT AxisInterface
{
public:
AxisInterface();
virtual ~AxisInterface();
/**
* \~chinese
* \~english Power on
* @return
*/
int poweronExtAxis();
/**
* \~chinese
* \~english Power off
* @return
*/
int poweroffExtAxis();
/**
* \~chinese 使
* \~english Enable
* @return
*/
int enableExtAxis();
/**
* \~chinese 姿()
* \~chinese @param pose
* \~english Set mounting pose of external axis (wrt world frame)
* \~english @param pose
* @return
*/
int setExtAxisMountingPose(const std::vector<double> &pose);
/**
* \chinese
*
* @param pos
* @param v
* @param a
* @param duration
* @return
* \endchinese
*
* \english move to pos, rotation or linear
*
* @param pos
* @param v
* @param a
* @param duration
* @return
* \endenglish
*/
int moveExtJoint(double pos, double v, double a, double duration);
/**
* \chinese
*
*
* @param v
* @param a
* @param duration
* @return
* \endchinese
*
* \english
* Set target speed, acceleration and duration
* @param v
* @param a
* @param duration
* @return
* \endenglish
*/
int speedExtJoint(double v, double a, double duration);
int stopExtJoint(double a);
/**
* \~chinese 0 1
* \~english Get external axis type: 0 for rotation, 1 for linear
* @return
*/
int getExtAxisType();
/**
* \chinese
*
*
* @return
* \endchinese
*
* \english
* Get external axis status
*
* @return Current exteral axis status
* \endenglish
*/
AxisModeType getAxisModeType();
/**
* \chinese
* 姿
*
* @return 姿
* \endchinese
*
* \english
* Get external axis mounting pose
*
* @return External axis pose
* \endenglish
*/
std::vector<double> getExtAxisMountingPose();
/**
* \chinese
* 姿
*
* @return 姿
* \endchinese
*
* \english
* Get pose wrt mounting coordinate system, axis can be positioner or linear rail
*
* @return Pose wrt mounting coordinate system
* \endenglish
*/
std::vector<double> getExtAxisPose();
/**
* \chinese
*
*
* @return
* \endchinese
*
* \english
* Get external axis position
*
* @return External axis position
* \endenglish
*/
double getExtAxisPosition();
/**
* \chinese
*
*
* @return
* \endchinese
*
* \english
* Get external axis speed
*
* @return External axis speed
* \endenglish
*/
double getExtAxisVelocity();
/**
* \chinese
*
*
* @return
* \endchinese
*
* \english
* Get external axis acceleration
*
* @return External axis acceleration
* \endenglish
*/
double getExtAxisAcceleration();
/**
* \chinese
*
*
* @return
* \endchinese
*
* \english
* Get external axis current
*
* @return External axis current
* \endenglish
*/
double getExtAxisCurrent();
/**
* \chinese
*
*
* @return
* \endchinese
*
* \english
* Get external axis temperature
*
* @return External axis temperature
* \endenglish
*/
double getExtAxisTemperature();
/**
* \chinese
*
*
* @return
* \endchinese
*
* \english
* Get external axis voltage
*
* @return External axis voltage
* \endenglish
*/
double getExtAxisBusVoltage();
/**
* \chinese
*
*
* @return
* \endchinese
*
* \english
* Get external axis current
*
* @return external axis current
* \endenglish
*/
double getExtAxisBusCurrent();
/**
* \chinese
*
*
* @return
* \endchinese
*
* \english
* Get external axis max position
*
* @return External axis max position
* \endenglish
*/
double getExtAxisMaxPosition();
/**
* \chinese
*
*
* @return
* \endchinese
*
* \english
* Get external axis min position
*
* @return External axis min position
* \endenglish
*/
double getExtMinPosition();
/**
* \chinese
*
*
* @return
* \endchinese
*
* \english
* Get external axis max speed
*
* @return External axis max speed
* \endenglish
*/
double getExtAxisMaxVelocity();
/**
* \chinese
*
*
* @return
* \endchinese
*
* \english
* Get external axis max acceleration
*
* @return External axis max acceleration
* \endenglish
*/
double getExtAxisMaxAcceleration();
/**
* \chinese
* (使)
*
* @param target_name
* @param phase
* @param err
* @return
* \endchinese
*
* \english
* Follow motion of another external axis not to be used during motion
*
* @param target_name name of target axis
* @param phase phase difference
* @param err max error when following motion
* @return
* \endenglish
*/
int followAnotherAxis(const std::string &target_name, double phase,
double err);
/**
* \~chinese @brief stopFollowAnotherAxis(使)
* \~english @brief stopFollowAnotherAxis(not to be used during motion)
* @return
*/
int stopFollowAnotherAxis();
/**
* \chinese
*
*
* @return
* \endchinese
*
* \english
* Get external axis error code
*
* @return External axis error code
* \endenglish
*/
int getErrorCode();
/**
* \chinese
*
*
* @return
* \endchinese
*
* \english
* Reset axis error
*
* @return
* \endenglish
*/
int clearAxisError();
protected:
void *d_;
};
using AxisInterfacePtr = std::shared_ptr<AxisInterface>;
} // namespace common_interface
} // namespace arcs
#endif // AUBO_SDK_AXIS_INTERFACE_H