(
    robot_move_target: control.RobotMoveTarget,
    hardware: HardwareControlAPI = Depends(get_hardware),
    motion_lock: ThreadedAsyncLock = Depends(get_motion_lock),
)
Move the robot
Move the robot
Move the robot
async def post_move_robot(
    robot_move_target: control.RobotMoveTarget,
    hardware: HardwareControlAPI = Depends(get_hardware),
    motion_lock: ThreadedAsyncLock = Depends(get_motion_lock),
) -> V1BasicResponse:
    """Move the robot"""
    try:
        async with motion_lock.forbid():
            pos = await _do_move(hardware=hardware, robot_move_target=robot_move_target)
            return V1BasicResponse(message=f"Move complete. New position: {pos}")
    except ThreadedAsyncForbidden as e:
        raise LegacyErrorResponse(message=str(e)).as_error(status.HTTP_403_FORBIDDEN)
async def post_move_robot ( robot_move_target : control . RobotMoveTarget , hardware : HardwareControlAPI = Depends ( get_hardware ) , motion_lock : ThreadedAsyncLock = Depends ( get_motion_lock ) , ) -> V1BasicResponse : try : async with motion_lock . forbid ( ) : pos = await _do_move ( hardware = hardware , robot_move_target = robot_move_target ) return V1BasicResponse ( message = f"Move complete. New position: {pos}" ) except ThreadedAsyncForbidden as e : raise LegacyErrorResponse ( message = str ( e ) ) . as_error ( status . HTTP_403_FORBIDDEN )