Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update depricated api's #2

Merged
merged 1 commit into from
Dec 8, 2021
Merged

update depricated api's #2

merged 1 commit into from
Dec 8, 2021

Conversation

dwijaybane
Copy link

catkin_make fails with following error msg:

/notebooks/catkin_ws_kinetic/src/pgm_map_creator/src/collision_map_creator.cc: In m
ember function ‘virtual void gazebo::CollisionMapCreator::Load(gazebo::physics::Wor
ldPtr, sdf::ElementPtr)’:
/notebooks/catkin_ws_kinetic/src/pgm_map_creator/src/collision_map_creator.cc:35:23
: error: ‘class gazebo::physics::World’ has no member named ‘GetName’
     node->Init(world->GetName());
                       ^
/notebooks/catkin_ws_kinetic/src/pgm_map_creator/src/collision_map_creator.cc: In m
ember function ‘void gazebo::CollisionMapCreator::create(gazebo::CollisionMapReques
tPtr&)’:
/notebooks/catkin_ws_kinetic/src/pgm_map_creator/src/collision_map_creator.cc:91:55
: error: ‘class gazebo::physics::World’ has no member named ‘GetPhysicsEngine’
     gazebo::physics::PhysicsEnginePtr engine = world->GetPhysicsEngine();

Two Changes:

  • Instead of physics::PhysicsEnginePtr engine = world->GetPhysicsEngine();
    use physics::PhysicsEnginePtr engine = world->Physics();
    ref forum

  • Instead of node->Init(_parent->GetName());
    use node->Init(_parent->Name());
    ref forum

ValerioMagnago pushed a commit to ValerioMagnago/pgm_map_creator that referenced this pull request Jun 22, 2020
@abhiojha8 abhiojha8 self-assigned this Dec 8, 2021
@abhiojha8 abhiojha8 added the bug Something isn't working label Dec 8, 2021
@abhiojha8 abhiojha8 merged commit 3589bbd into udacity:master Dec 8, 2021
@lalten
Copy link

lalten commented Dec 21, 2021

I'm using this in a container based off osrf/ros:kinetic (because Udacity's RoboND stuff is so old that it really doesn't work on anything newer than kinetic 🤦). Anyways, with this merged, I'm running into:

Scanning dependencies of target collision_map_creator
[ 62%] Building CXX object pgm_map_creator/CMakeFiles/collision_map_creator.dir/src/collision_map_creator.cc.o
/catkin_ws/src/pgm_map_creator/src/collision_map_creator.cc: In member function ‘virtual void gazebo::CollisionMapCreator::Load(gazebo::physics::WorldPtr, sdf::ElementPtr)’:
/catkin_ws/src/pgm_map_creator/src/collision_map_creator.cc:35:23: error: ‘class gazebo::physics::World’ has no member named ‘Name’
     node->Init(world->Name());
                       ^
/catkin_ws/src/pgm_map_creator/src/collision_map_creator.cc: In member function ‘void gazebo::CollisionMapCreator::create(gazebo::CollisionMapRequestPtr&)’:
/catkin_ws/src/pgm_map_creator/src/collision_map_creator.cc:91:55: error: ‘class gazebo::physics::World’ has no member named ‘Physics’
     gazebo::physics::PhysicsEnginePtr engine = world->Physics();
                                                       ^
pgm_map_creator/CMakeFiles/collision_map_creator.dir/build.make:62: recipe for target 'pgm_map_creator/CMakeFiles/collision_map_creator.dir/src/collision_map_creator.cc.o' failed
make[2]: *** [pgm_map_creator/CMakeFiles/collision_map_creator.dir/src/collision_map_creator.cc.o] Error 1
CMakeFiles/Makefile2:1145: recipe for target 'pgm_map_creator/CMakeFiles/collision_map_creator.dir/all' failed
make[1]: *** [pgm_map_creator/CMakeFiles/collision_map_creator.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2
Invoking "make -j4 -l4" failed

For now, I can just git checkout 71671246557319de3abd4628b879efe8defacdf8 and the build succeeds.

@abhiojha8, please test stuff before you merge it. If you don't update the rest of the course material to something non-ancient, you should probably create branches for the various Ros distros like other packages do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants