Changed parameter of waitForCommand trajectory callback to be a reference rather than a copy. Leaving it as a copy was crashing the code because it was a different type than what was being published on the topic.