Class RobotMotion

Class Documentation

class RobotMotion

This class supports that user can control robot.

Public Functions

RobotMotion()

Constructor to initialize an object of this class. This constructor is a default constructor, So user do not use default constructor.

RobotMotion(WMX3Api *f)

Constructor to initialize an object of this class. The device created by the WMX3Api object passed to this constructor is used to execute api functions. See also in ‘Devices’ Section in WMX3 User Manual.

~RobotMotion()

Destructor for this class.

bool IsDeviceValid()

A device is required to execute most functions in this class. If this function returns FALSE, a device can be created by calling the ‘CreateDevice’ function from the ‘WMX3Api’ object that was passed to the constructor of this class.

Returns:

TRUE if this class object has access to a device, and FALSE otherwise.

int UpdateRobotStatus(const int robotId, RobotStatus &status)

Update all the state including command state, feedback state, motion state and motion error code of the robot from the WMX3 engine.

Update all the state including command state, feedback state, motion state and motion error code of the robot from the WMX3 engine to the class.

Remark

Call 4 update apis (UpdateStateCMD, UpdateStateFB, UpdateMotionState, UpdateMotionErrorCode).

Parameters:
  • robotId[in] Robot ID

  • status[out] Status structure of the robot

Returns:

0 if success, otherwise return error code.

int UpdateRobotStatus(const int robotId, RobotStatus &status, int (&errorCode)[RobotStatus::ErrorBit::ERROR_BIT_SIZE])

Update all the state including command state, feedback state, motion state and motion error code of the robot from the WMX3 engine.

Update all the state including command state, feedback state, motion state and motion error code of the robot from the WMX3 engine to the class.

Remark

Call 4 update apis (UpdateStateCMD, UpdateStateFB, UpdateMotionState, UpdateMotionErrorCode).

Parameters:
  • robotId[in] Robot ID

  • status[out] Status structure of the robot

  • errorCode[out] Motion error code of the robot

Returns:

0 if success, otherwise return error code.

Public Members

RobotConfig &mRobotConfig
kinematics::Kinematics &mKinematics
coordinate::Coordinate &mCoordinate
CoreMotion &mCoreMotion