Ask Your Question

‘shared_ptr’ in namespace ‘std’ does not name a template type

asked 2017-02-12 03:16:40 -0500

NunchaGun gravatar image

updated 2017-02-12 06:40:37 -0500

gvdhoorn gravatar image

I'm trying to install ROS Indigo on my Raspberry Pi 3 B by following . However, there is a error due to urdf. I'm not sure how to resolve it.

I reproduce the error by running

/home/pi/ros_catkin_ws/build_isolated/urdf && sudo /opt/ros/indigo/ make -j4 -l4

And, the error message is as bellow

-- Boost version: 1.55.0
-- Found the following Boost libraries:
--   thread
--   chrono
--   system
--   date_time
--   atomic
-- Using CATKIN_DEVEL_PREFIX: /home/pi/ros_catkin_ws/devel_isolated/urdf
-- Using CMAKE_PREFIX_PATH: /opt/ros/indigo
-- This workspace overlays: /opt/ros/indigo
-- Using PYTHON_EXECUTABLE: /usr/bin/python
-- Using Debian Python package layout
-- Using empy: /usr/bin/empy
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/pi/ros_catkin_ws/build_isolated/urdf/test_results
-- Found gtest sources under '/usr/src/gtest': gtests will be built
-- Using Python nosetests: /usr/bin/nosetests-2.7
-- catkin 0.6.18
-- Configuring done
-- Generating done
-- Build files have been written to: /home/pi/ros_catkin_ws/build_isolated/urdf
Scanning dependencies of target urdf
[ 33%] Building CXX object CMakeFiles/urdf.dir/src/model.cpp.o
[ 66%] Building CXX object CMakeFiles/urdf.dir/src/rosconsole_bridge.cpp.o
In file included from /home/pi/ros_catkin_ws/src/robot_model/urdf/include/urdf/model.h:43:0,
                 from /home/pi/ros_catkin_ws/src/robot_model/urdf/src/model.cpp:37:
/home/pi/ros_catkin_ws/devel_isolated/urdf/include/urdf/urdfdom_compatibility.h:78:14: error: ‘shared_ptr’ in namespace ‘std’ does not name a template type
 typedef std::shared_ptr<ModelInterface> ModelInterfaceSharedPtr;
/home/pi/ros_catkin_ws/devel_isolated/urdf/include/urdf/urdfdom_compatibility.h:79:14: error: ‘shared_ptr’ in namespace ‘std’ does not name a template type
 typedef std::shared_ptr<const ModelInterface> ModelInterfaceConstSharedPtr;
/home/pi/ros_catkin_ws/devel_isolated/urdf/include/urdf/urdfdom_compatibility.h:80:14: error: ‘weak_ptr’ in namespace ‘std’ does not name a template type
 typedef std::weak_ptr<ModelInterface> ModelInterfaceWeakPtr;
CMakeFiles/urdf.dir/build.make:62: recipe for target 'CMakeFiles/urdf.dir/src/model.cpp.o' failed
make[2]: *** [CMakeFiles/urdf.dir/src/model.cpp.o] Error 1
CMakeFiles/Makefile2:516: recipe for target 'CMakeFiles/urdf.dir/all' failed
make[1]: *** [CMakeFiles/urdf.dir/all] Error 2
Makefile:138: recipe for target 'all' failed
make: *** [all] Error 2

Do you know how to resolve this?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2017-02-12 06:41:46 -0500

gvdhoorn gravatar image

std::shared_ptr is a C++11 addition.

Are you trying to compile ROS Kinetic versions of packages on a non-C++11 platform (ROS Kinetic is the first platform that migrated a lot of packages to C++11)?

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2017-02-12 03:16:40 -0500

Seen: 6,696 times

Last updated: Feb 12 '17