Gazebo | Ignition | Community
Ask Your Question

change view of world in Gazebo

asked 2019-10-02 08:15:50 -0500

PeterHer gravatar image

Is there a way to change the view of the world in Gazebo in a world plugin like I can do with the GUI-camera-pose-yaw in the left menu?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2019-10-02 08:49:06 -0500

kumpakri gravatar image

You can do it in WORLD file.

      <camera name='gzclient_camera'>
        <pose>-13.0 -9.0 8.0 0 0.4 1.3</pose>

There is a method of UserCamera object in Gazebo 9 API called MoveToPosition. Maybe that would work for you but I haven't try this myself.

edit flag offensive delete link more


I had these lines in my world plugin code but didn't work I just cannot access the camera

    // Get a pointer to the active user camera
    this->userCam = gui::get_active_camera();

    if (this->userCam != NULL)
PeterHer gravatar imagePeterHer ( 2019-10-02 13:17:55 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower


Asked: 2019-10-02 08:15:50 -0500

Seen: 350 times

Last updated: Oct 02 '19