Fixed bug in is_valid and cleaned up a bit.
Fixed bug in is_valid and cleaned up a bit.

In is_valid, the rpy_check array needed to be initialized to the
correct size to be indexed appropriately.

I also did some minor rearranging and commenting of code in there,
nothing that changes functionality though.

Stefanos19/prpy,personalrobotics/prpy