Tutorial Trouble - Markers Basic Shapes
I'm not new to programming, but I am new to building without an IDE doing all the work. Why is this failing?
Tutorial:
http://wiki.ros.org/rviz/Tutorials/Ma...
Build error:
$ catkin_make
Base path: /home/jackson/ros_catkin_ws
Source space: /home/jackson/ros_catkin_ws/src
Build space: /home/jackson/ros_catkin_ws/build
Devel space: /home/jackson/ros_catkin_ws/devel
Install space: /home/jackson/ros_catkin_ws/install
####
#### Running command: "cmake /home/jackson/ros_catkin_ws/src -DCATKIN_DEVEL_PREFIX=/home/jackson/ros_catkin_ws/devel -DCMAKE_INSTALL_PREFIX=/home/jackson/ros_catkin_ws/install -G Unix Makefiles" in "/home/jackson/ros_catkin_ws/build"
####
-- Using CATKIN_DEVEL_PREFIX: /home/jackson/ros_catkin_ws/devel
-- Using CMAKE_PREFIX_PATH: /home/jackson/ros_catkin_ws/devel;/opt/ros/indigo
-- This workspace overlays: /home/jackson/ros_catkin_ws/devel;/opt/ros/indigo
-- Using PYTHON_EXECUTABLE: /usr/bin/python
-- Using Debian Python package layout
-- Using empy: /usr/bin/empy
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/jackson/ros_catkin_ws/build/test_results
-- Found gtest sources under '/usr/src/gtest': gtests will be built
-- Using Python nosetests: /usr/bin/nosetests-2.7
-- catkin 0.6.16
-- BUILD_SHARED_LIBS is on
WARNING: Package "libg2o" does not follow the version conventions. It should not contain leading zeros (unless the number is 0).
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ~~ traversing 2 packages in topological order:
-- ~~ - using_markers
-- ~~ - beginner_tutorials
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- +++ processing catkin package: 'using_markers'
-- ==> add_subdirectory(using_markers)
-- +++ processing catkin package: 'beginner_tutorials'
-- ==> add_subdirectory(beginner_tutorials)
-- Using these message generators: gencpp;genlisp;genpy
-- beginner_tutorials: 1 messages, 1 services
-- Configuring done
-- Generating done
-- Build files have been written to: /home/jackson/ros_catkin_ws/build
####
#### Running command: "make -j2 -l2" in "/home/jackson/ros_catkin_ws/build"
####
Scanning dependencies of target basic_shapes
[ 7%] [ 7%] Built target _beginner_tutorials_generate_messages_check_deps_AddTwoInts
Building CXX object using_markers/CMakeFiles/basic_shapes.dir/src/basic_shapes.cpp.o
[ 7%] Built target _beginner_tutorials_generate_messages_check_deps_Num
Scanning dependencies of target std_msgs_generate_messages_cpp
[ 7%] Built target std_msgs_generate_messages_cpp
Scanning dependencies of target std_msgs_generate_messages_lisp
[ 7%] Built target std_msgs_generate_messages_lisp
Scanning dependencies of target std_msgs_generate_messages_py
[ 7%] Built target std_msgs_generate_messages_py
[ 15%] Built target listener
[ 30%] Built target beginner_tutorials_generate_messages_cpp
[ 46%] Built target beginner_tutorials_generate_messages_lisp
[ 76%] Built target beginner_tutorials_generate_messages_py
[ 84%] Built target talker
[ 84%] Built target beginner_tutorials_gencpp
[ 84%] Built target beginner_tutorials_generate_messages
[ 92%] Built target add_two_ints_client
[100%] Built target add_two_ints_server
Linking CXX executable /home/jackson/ros_catkin_ws/devel/lib/using_markers/basic_shapes
CMakeFiles/basic_shapes.dir/src/basic_shapes.cpp.o: In function `main':
basic_shapes.cpp:(.text+0x63): undefined reference to `ros::init(int&, char**, std::string const&, unsigned int)'
basic_shapes.cpp:(.text+0xbf): undefined reference to `ros::NodeHandle::NodeHandle(std::string const&, std::map<std::string, std::string, std::less<std::string>, std::allocator<std::pair<std::string const, std::string> > > const&)'
basic_shapes.cpp:(.text+0x2e1): undefined reference to `ros::ok()'
basic_shapes.cpp:(.text+0x2ff): undefined reference to `ros::console::g_initialized'
basic_shapes.cpp:(.text+0x30f): undefined reference to `ros::console::initialize()'
basic_shapes.cpp:(.text+0x364): undefined reference to `ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)'
basic_shapes.cpp:(.text+0x3a5): undefined reference to `ros::console::setLogLocationLevel(ros::console::LogLocation*, ros::console::levels::Level)'
basic_shapes.cpp:(.text+0x3af): undefined reference to `ros::console::checkLogLocationEnabled(ros::console::LogLocation*)'
basic_shapes.cpp:(.text+0x419): undefined reference to `ros::console::print(ros::console::FilterBase*, void*, ros::console::levels::Level, char const*, int, char const ...
Did you edit the
CMakeLists.txt
as explained at the very bottom of section 4.1 of the tutorial? You need to tell CMake which libraries you should link..If you did follow this step and it does not work, please post your
CMakeLists.txt
.@mig I added the CMakeLists.txt to the bottom of the original question. I'm thinking the issue may be that I don't have
<visualization_msgs/Marker.h>
. How can I verify that theMarker.h
exists? I triedfind /usr -iname "marker.h"
and received nothing.