示例#1
0
文件: mkz.py 项目: swb19/clap
def to_mkz_steering(cmd, map_command, map_actuator):
    assert type(cmd) == ControlCommand

    new_cmd = SteeringCmd()
    new_cmd.enable = True
    new_cmd.steering_wheel_angle_cmd = np.interp(cmd.steer, map_command,
                                                 map_actuator)
    new_cmd.cmd_type = SteeringCmd.CMD_ANGLE
    return new_cmd