Ask Your Question
0

gencpp/message_generator not running properly?

asked 2015-11-04 18:19:19 -0500

new2ros gravatar image

updated 2015-11-08 17:31:05 -0500

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 ...
(more)
edit retag flag offensive close merge delete

Comments

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)

Dimitri Schachmann gravatar imageDimitri Schachmann ( 2015-11-07 06:13:41 -0500 )edit

Thanks for the response, Turns out, you were correct, the second I removed the Anaconda from my PATH environment the messages were generated.

new2ros gravatar imagenew2ros ( 2015-11-08 16:40:59 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
1

answered 2015-11-09 04:05:46 -0500

Dimitri Schachmann gravatar image

updated 2015-11-09 04:06:07 -0500

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)

edit flag offensive delete link more
0

answered 2015-11-08 17:23:38 -0500

new2ros gravatar image

updated 2015-11-08 17:29:52 -0500

Kudos to Dimitri's answer the problem was anaconda, guess anaconda doesn't play nice with ROS. Removing anaconda from my PATH and catkin_ws environments as well as removing then rebuilding build and devel directories fixed things up for me.

edit flag offensive delete link more

Comments

I made an "answer" out of it, so you can accept it ;)

Dimitri Schachmann gravatar imageDimitri Schachmann ( 2015-11-09 04:06:37 -0500 )edit

Your Answer

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

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-11-04 18:19:19 -0500

Seen: 288 times

Last updated: Nov 09 '15