I first had to source the environment of the xacro urdf I was loading in. I’m not sure why this would be a problem but it worked for me.