Can't zoom in Gazebo

Hello i have a small problem about Gazebo and PX4.

When I launch the simulation via : make px4_sitl gazebo_typhoon_h480 (it’s an example it does the same with other drones) everything works but I can’t use the zoom with the scrolling button of my mouse.
It is replaced by a rotation move I don’t understand why.
I have recently clone the git repos I don’t know if there is a modification on this side.
I post the topic here because when I run Gazebo alone : gazebo I have no issue.
The zoom works “correctly” (like what I’m used to find).
I use Gazebo 11.3.

Does somebody have the same issue?

I am having the same issue. Very interested in finding a solution to this!

It could be that you are in Follow mode. Next time you start the simulation, press Escape and try to zoom again.

Sorry for the late answer,

I tried your solution @McKayW but it doesn’t work.

Hello, I’ve just installed PX4 and gazebo on a new computer, and I’m having the same issue with the impossibility to move the camera correctly, that I didn’t have previously.

I tried the “press Esc” solution suggested by @McKayW , but it indeed didn’t work as @Kreace pointed. Any chance someone found a solution ?

Same here, pretty annoying - even on the base Iris model

To resolve this you can go to the sitl_run.sh and add or remove the line at <HERE!>

    # Disable follow mode
    if [[ "$PX4_NO_FOLLOW_MODE" != "1" ]]; then
        follow_mode="<HERE!>"
    else
        follow_mode="--gui-client-plugin libgazebo_user_camera_plugin.so"
    fi

Also if you want to change the distance to the UAV on the follower zoom, you can add user_camera->SetHFOV(VALUE); in the if(user_camera && !model_name_.empty()) condition in the gazebo_user_camera_plugin.cpp.

2 Likes

Don’t know if you got your answer but it’s easy to change. In Gazebo, go to World/GUI and change the min and max distance. You’ll be able to zoom closer or further regarding to the distance you’ll enter.

1 Like

I love you with all my soul, you light-being!