cmvr-head-client/servo_service.erpc
2026-08-05 16:42:59 +08:00

35 lines
866 B
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// servo_service.erpc
// Generator examples:
// .\erpcgen.exe -o .\generated\ -g c .\servo_service.erpc
// .\erpcgen.exe -g py .\servo_service.erpc
// 注意interface 客户端和服务端erpc里面的函数顺序一定要一样
program servo_service
enum RpcMotionMode {
RpcMotionModeImmediate = 0,
RpcMotionModeSCurve = 1,
RpcMotionModeFollow = 2
}
struct ServoCmd {
string id
float angle_rad
}
interface servo_service
{
setConstraints(string id,
float max_velocity_rad,
float max_acceleration_rad,
float max_jerk_rad) -> bool
setPositionGain(string id,
float position_gain) -> bool
setMode(RpcMotionMode mode)->bool
setUpdatePeriodMs(uint32 ms) -> bool
move(list<ServoCmd> cmds) -> int32
moveJ(list<float> angles_rad) -> int32
}