How are you spawning your robot? You mentioned xacro, so I assume you're using ROS? Possibly the spawn_model script? In that case, you might want to check out this tutorial. You can specify the initial x, y, z coordinates of your model as arguments to the script, for example:
<node name="spawn_urdf" pkg="gazebo_ros" type="spawn_model" args="-file \$(find robot_description)/urdf/robot.urdf -urdf -x 1 -y 1 -z 10 -model robot" />