PixhawkInstruction values must be floats. Python is weird, so computed values should be passed through the float() function before being passed to PixhawkInstruction(). i.e.
PixhawkInstruction(
forward=float(0.5),
vertical=float(-0.25),
author=PixhawkInstruction.MANUAL_CONTROL
)
Write instructions to that effect.