Class gazebo::physics::World’ has no member named ‘GetModel’; did you mean ‘Models’?

Hi All,

I am very new to Gazebo and ROS. I have the following code snippet in my Ros World Plugin:

    void Load(physics::WorldPtr _world, sdf::ElementPtr _sdf)
    {
        physics::ModelPtr ballmodel;
        ballmodel = _world->GetModel("ball");

Any idea why I always get a error like class gazebo::physics::World’ has no member named ‘GetModel’; did you mean ‘Models’?

I am using Ubuntu 18, Melodic and Gazebo 9.

Any idea? Thanks in advance, Peter

Hi @PeterHer. Technical help questions, such as this, should be asked on answers.gazebosim.org . This forum is meant for general discussions, community organization, news, and other topics.

I will be happy to answer your question on the other website, just @ mention me.