Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Is there a way to modify the default camera position in the world file?

I would like to move the camera position to something other than what it defaults to. How would I go about this in the world file? There is some documentation but it is vague.

Is there a way to modify the default camera position in the world file?

I would like to move the camera position to something other than what it defaults to. How would I go about this in the world file? There is some documentation but it is vague.

Here is the code I am using changing the camera pose does nothing. I needed to put a name in for the camera, because it would not parse otherwise:

<?xml version="1.0" ?>
<sdf version="1.3">
    <world name="default">
   <gui>
      <camera name="user_default">
            <pose>-1 0 -2 0 -5 0</pose>
      </camera>
    </gui>    
<scene>
<shadows>false</shadows>
</scene>    


        <include>
            <uri>model://ground_plane</uri>
        </include>
        <include>
            <uri>model://sun</uri>
        </include>
        <include>
            <uri>model://robopede</uri>
        <name>robot</name>
            <pose>-2.5 0 0 0 0 0</pose>
        </include>
        <include>
            <uri>model://wall</uri>
            <name>wall_0</name>
            <pose>-3 0.22 0 0 0 0</pose>
        </include>
    <include>
            <uri>model://wall</uri>
            <name>wall_1</name>
            <pose>-3 -0.22 0 0 0 0</pose>
        </include>
               <include>
            <uri>model://wall</uri>
            <name>wall_2</name>
            <pose>-2 0.22 0 0 0 .5</pose>
        </include>
    <include>
            <uri>model://wall</uri>
            <name>wall_4</name>
            <pose>-2 -0.22 0 0 0 .5</pose>
        </include>

    </world>
</sdf>