gencpp/message_generator not running properly?
Help!
Trying to figure out what is wrong with my build of ROS, I have built a new custom message for my node but each time I catkin_make it and reference it to another project I have an empty header file when I inspect the #include and the code fails to compile, I know my configurations for package.xml and CMakeList.txt are correct as when I compile this on another machine it works and gencpp creates the code for it in the header, but my main working PC seems to not be using gencpp for what ever reason.
If anyone has encountered this issue before I would much appreciate some input.
This is the output of catkin_make
:
-- Using CATKIN_DEVEL_PREFIX: /home/USER/catkin_ws/devel
-- Using CMAKE_PREFIX_PATH: /home/USER/catkin_ws/devel;/opt/ros/indigo
-- This workspace overlays: /home/USER/catkin_ws/devel;/opt/ros/indigo
-- Using PYTHON_EXECUTABLE: /home/USER/anaconda/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/USER/catkin_ws/src/test_results
-- Found gtest sources under '/usr/src/gtest': gtests will be built
-- Using Python nosetests: /usr/bin/nosetests-2.7
-- catkin 0.6.14
-- BUILD_SHARED_LIBS is on
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ~~ traversing 5 packages in topological order:
-- ~~ - spatial_dual_sdk_c
-- ~~ - lms400_driver
-- ~~ - phenoframework
-- ~~ - spatial_msg
-- ~~ - spatial_dual_driver
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- +++ processing catkin package: 'spatial_dual_sdk_c'
-- ==> add_subdirectory(spatial_dual_driver/spatial_dual_sdk_c)
-- +++ processing catkin package: 'lms400_driver'
-- ==> add_subdirectory(lms400_driver)
-- Using these message generators: gencpp;genlisp;genpy
-- lms400_driver: 1 messages, 0 services
-- +++ processing catkin package: 'phenoframework'
-- ==> add_subdirectory(phenoframework)
-- +++ processing catkin package: 'spatial_msg'
-- ==> add_subdirectory(spatial_dual_driver/spatial_msg)
-- Using these message generators: gencpp;genlisp;genpy
-- spatial_msg: 1 messages, 0 services
-- +++ processing catkin package: 'spatial_dual_driver'
-- ==> add_subdirectory(spatial_dual_driver/spatial_dual_driver)
-- Using these message generators: gencpp;genlisp;genpy
-- Configuring done
-- Generating done
-- Build files have been written to: /home/USER/catkin_ws/src
####
#### Running command: "make -j8 -l8" in "/home/USER/catkin_ws/build"
####
[ 15%] [ 15%] Built target std_msgs_generate_messages_cpp
Built target spatial_dual_sdk_c
[ 15%] [ 23%] [ 23%] Built target spatial_dual_sdk_c_rs232
Built target std_msgs_generate_messages_lisp
Built target std_msgs_generate_messages_py
[ 30%] Built target packet_example_spatial_dual
[ 30%] Built target _lms400_driver_generate_messages_check_deps_lms400
[ 30%] Built target _spatial_msg_generate_messages_check_deps_Spatial
[ 46%] Built target lms400_driver_generate_messages_py
[ 53%] [ 69%] [ 76%] Built target lms400_driver_generate_messages_lisp
[ 84%] [ 92%] Built target spatial_msg_generate_messages_py
Built target lms400_driver_generate_messages_cpp
Built target spatial_msg_generate_messages_lisp
Built target spatial_msg_generate_messages_cpp
[ 92%] [ 92%] Built target spatial_msg_generate_messages
Built target lms400_driver_generate_messages
[100%] Built target spatial_dual_node
From this It looks like the messages were created successfully but the message headers are empty... not sure what I'm missing here.
~~~~~~~UPDATE~~~~~~~~
Ok Update, rebuilt my catkin workspace and environment, found this on catkin_make
:
Looks like it fails every time I have to rebuild the build from scratch i.e. removing the contents of devel.
From catkin_make --force
:
-- Base path: /home/USER/catkin_ws
-- Source space: /home/USER/catkin_ws/src
-- Build space: /home/USER/catkin_ws/build
-- Devel space: /home/USER/catkin_ws/devel
-- Install space: /home/USER/catkin_ws/install
-- ####
-- #### Running command: "cmake /home/USER/catkin_ws/src -DCATKIN_DEVEL_PREFIX=/home/USER/catkin_ws/devel -DCMAKE_INSTALL_PREFIX=/home/USER/catkin_ws/install -G Unix Makefiles" in "/home/USER/catkin_ws/build"
-- ####
-- Using CATKIN_DEVEL_PREFIX: /home/USER/catkin_ws/devel
-- Using CMAKE_PREFIX_PATH: /home/USER/catkin_ws/devel;/opt/ros/indigo
-- This workspace overlays: /home/USER/catkin_ws/devel ...
Just a wild guess: do you also have
-- Using PYTHON_EXECUTABLE: /home/USER/anaconda/bin/python
on your other machines? If not, then I would try to build with the python that comes with ubuntu. (don't forget do delete the build folder because cmake caches this path)Thanks for the response, Turns out, you were correct, the second I removed the Anaconda from my PATH environment the messages were generated.