Gazebo | Ignition | Community
Ask Your Question
0

‘class gazebo::physics::World’ has no member named ‘Name’

asked 2020-07-07 01:01:31 -0500

doubleJ gravatar image

updated 2020-07-07 01:42:48 -0500

Hello.

I'm following this tutorial: http://gazebosim.org/tutorials?tut=pl....

When I doing 'compile' part, I got the following error message:

jjy@jjy-desktop:~/gazebo_plugin_tutorial/build$ make
[ 33%] Built target model_push
[ 66%] Built target hello_world
[ 83%] Building CXX object CMakeFiles/factory.dir/factory.cc.o
/home/jjy/gazebo_plugin_tutorial/factory.cc: In member function ‘virtual void gazebo::Factory::Load(gazebo::physics::WorldPtr, sdf::ElementPtr)’:
/home/jjy/gazebo_plugin_tutorial/factory.cc:49:27: error: ‘class gazebo::physics::World’ has no member named ‘Name’
   node->Init(_parent->Name());

What caused this error and how can I fix it?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2020-07-07 04:17:51 -0500

kumpakri gravatar image

It is GetName()in gazebo 7. You need to follow the documentation for the right gazebo version. http://osrf-distributions.s3.amazonaw...

edit flag offensive delete link more

Comments

Thank you very much for your answer. Can I ask you one more question? After fixing the problem and following the tutorial, I tried 'Run Gazebo' part, but gazebo suddenly closed with following message:

Warning [parser.cc:438] Converting a deprecated SDF source[data-string]

What caused this error and how can I fix it?

doubleJ gravatar imagedoubleJ ( 2020-07-07 04:52:52 -0500 )edit

I don't know. Try to put a debug prints throughout your code to atleast narrow down where the problem occurs. In Gazebo plugin you can use gazebo message output stream

gzmsg << "your message\n";
kumpakri gravatar imagekumpakri ( 2020-07-07 08:22:57 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2020-07-07 01:01:31 -0500

Seen: 12,037 times

Last updated: Jul 07 '20