ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
2

Initial view after gazebo starts

asked 2011-09-11 21:42:28 -0500

Markus Bader gravatar image

updated 2011-09-13 04:55:44 -0500

kwc gravatar image

Hi

I am not happy with the view on my scene after I start gazebo using rosrun with gazebo and my world file.

How can I set the initial view on my scene for the gazebo simulator.

Thanks and Greetings Max

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
5

answered 2011-09-11 22:52:38 -0500

Lorenz gravatar image

The world file contains settings for the user camera. Open your world file and search for:

  <rendering:gui>
    <type>fltk</type>
    <size>480 320</size>
    <pos>0 0</pos>
    <frames>
      <row height="100%">
        <camera width="100%">
          <xyz>0.3 0 3</xyz>
          <rpy>0 90 90</rpy>
        </camera>
      </row>
    </frames>
  </rendering:gui>

As you can see, the camera tag contains settings for position and orientation of the camera.

edit flag offensive delete link more

Comments

Thank you Lorenz, it worked! I had a wrong syntax, your syntax if working perfect
Markus Bader gravatar image Markus Bader  ( 2011-09-13 20:03:08 -0500 )edit

I using Gazebo 9.0 and launching the empty.world. It has only 2 models sun and ground_plane. It does not have any camera settings. How do I configure the camera settings now?

Subodh Malgonde gravatar image Subodh Malgonde  ( 2018-08-20 01:31:48 -0500 )edit

What about switching to orthographic view? Is this possible?

hbaqueiro gravatar image hbaqueiro  ( 2021-01-05 05:57:37 -0500 )edit
flood gravatar image flood  ( 2021-06-21 08:16:45 -0500 )edit
2

answered 2020-04-30 08:07:58 -0500

artifactz gravatar image

In Gazebo 9 you do:

<world>
  <gui>
    <camera name="user_camera">
      <pose>x y z roll pitch yaw</pose>
    </camera>
  </gui>
</world>

Angles are in radians.

edit flag offensive delete link more
1

answered 2023-03-03 03:10:58 -0500

ATRobotics gravatar image

updated 2023-03-11 07:02:37 -0500

Markus Bader gravatar image

<gui fullscreen="0"> <camera name="user_camera"> <pose>x y z roll pitch yaw</pose> <view_controller>ortho</view_controller> <projection_type>orthographic</projection_type> </camera> </gui>

This snippet is used to add orthographic view. (Angles are in radians)

edit flag offensive delete link more

Comments

It worked for me! Thankyou

Atreya gravatar image Atreya  ( 2023-03-07 02:26:17 -0500 )edit

Question Tools

Stats

Asked: 2011-09-11 21:42:28 -0500

Seen: 2,480 times

Last updated: Mar 11 '23