YP_get_joint_ang, YP_get_joint_vel, YP_get_joint_torque
double YP_get_joint_ang(int id, double *a);
double YP_get_joint_vel(int id, double *v);
double YP_get_joint_torque(int id, double *t);
Get current joint state.
- id: joint (motor) id
- *a: pointer to store angle of the joint [rad]
- *v: pointer to store angular velocity of the joint [rad/s]
- *t: pointer to store torque of the joint [Nm]
On success, timestamp (unix time) of the data is returned. On error, -1 is returned.
YP_set_joint_vel, YP_set_joint_accel
int YP_set_joint_vel(int id, double v);
int YP_set_joint_accel(int id, double a);
Set maximum angular velocity and acceleration of the joint.
- id: joint (motor) id
- a: angular acceleration of the joint [rad/ss]
- v: angular velocity of the joint [rad/s]
On success, 1 is returned. On error, -1 is returned.
YP_joint_ang, YP_joint_vel, YP_joint_torque, YP_joint_ang_vel
int YP_joint_ang(int id, double a);
int YP_joint_vel(int id, double v);
int YP_joint_torque(int id, double t);
int YP_joint_ang_vel(int id, double a, double v);
Control joint angle, velocity, and torque.
YP_joint_ang_vel
controls both angle and velocity simultaneously to make velocity desired at the desired angle.
- id: joint (motor) id
- a: angular position of the joint [rad]
- v: angular velocity of the joint [rad/s]
- t: torque of the joint [Nm]
On success, 1 is returned. On error, -1 is returned.