Failed to build razor_imu_9dof
Hi, I'm trying to build my catkin workspace on ROS Indigo, it used to build fine, but now the package razorimu9dof fail to build. I don't get why. The only thing I temember I did is to install some Android/Java SDK sofware and add a few lines in my .bahrc file.
Here is the output of my terminal :
dcx@dcx-M4700:~/catkin_ws$ catkin_make --pkg razor_imu_9dof
Base path: /home/dcx/catkin_ws
Source space: /home/dcx/catkin_ws/src
Build space: /home/dcx/catkin_ws/build
Devel space: /home/dcx/catkin_ws/devel
Install space: /home/dcx/catkin_ws/install
####
#### Running command: "make cmake_check_build_system" in "/home/dcx/catkin_ws/build"
####
####
#### Running command: "make -j8 -l8" in "/home/dcx/catkin_ws/build/razor_imu_9dof"
####
[ 0%] Built target std_msgs_generate_messages_lisp
[ 0%] Built target std_msgs_generate_messages_cpp
[ 0%] [ 14%] Built target std_msgs_generate_messages_py
Generating Java gradle project from razor_imu_9dof
[ 14%] Built target _razor_imu_9dof_generate_messages_check_deps_RazorImu
[ 28%] [ 57%] [ 71%] Built target razor_imu_9dof_generate_messages_lisp
Built target razor_imu_9dof_generate_messages_py
Generating Java gradle project from razor_imu_9dof
[ 85%] Built target razor_imu_9dof_generate_messages_cpp
Traceback (most recent call last):
File "/opt/ros/indigo/share/genjava/cmake/../../../lib/genjava/genjava_gradle_project.py", line 14, in <module>
genjava.main(sys.argv)
File "/opt/ros/indigo/lib/python2.7/dist-packages/genjava/genjava_main.py", line 82, in main
gradle_project.create(args.package, args.output_dir)
File "/opt/ros/indigo/lib/python2.7/dist-packages/genjava/gradle_project.py", line 152, in create
raise IOError("could not find %s on the ros package path" % msg_pkg_name)
IOError: could not find razor_imu_9dof on the ros package path
make[2]: *** [razor_imu_9dof/java/razor_imu_9dof/build.gradle] Error 1
make[1]: *** [razor_imu_9dof/CMakeFiles/razor_imu_9dof_generate_messages_java_gradle.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
Traceback (most recent call last):
File "/opt/ros/indigo/share/genjava/cmake/../../../lib/genjava/genjava_gradle_project.py", line 14, in <module>
genjava.main(sys.argv)
File "/opt/ros/indigo/lib/python2.7/dist-packages/genjava/genjava_main.py", line 82, in main
gradle_project.create(args.package, args.output_dir)
File "/opt/ros/indigo/lib/python2.7/dist-packages/genjava/gradle_project.py", line 152, in create
raise IOError("could not find %s on the ros package path" % msg_pkg_name)
IOError: could not find razor_imu_9dof on the ros package path
make[2]: *** [razor_imu_9dof/java/razor_imu_9dof/build.gradle] Error 1
make[1]: *** [razor_imu_9dof/CMakeFiles/razor_imu_9dof_generate_messages_java.dir/all] Error 2
make: *** [all] Error 2
Invoking "make -j8 -l8" failed
If I do rospack find razorimu9dof, it finds it well. I tried delete all the generated files in build and devel folders, but still the same issue. The package razorimu9dof works fine in fact as it's just two python scripts, but the build fail which is annoying.
Any idea how to solve this ?
Asked by Cyril Jourdan on 2015-07-16 04:53:53 UTC
Answers
It looks like the gradle project code that is failing is in Python so it maybe using the Python library rospkg
to look for the packages. This is, unfortunately, a different code path than what rospack
uses. Make sure you have an up-to-date version of rospkg
and that you don't have a copy installed by pip
which would be located in /usr/local
.
Asked by William on 2015-07-16 18:58:02 UTC
Comments
Thanks for your answer. When I do sudo apt-get install python-rospkg
everything is up to date, and can't see anything in /usr/local. I use Ubuntu 14.04 and don't have pip installed.
Asked by Cyril Jourdan on 2015-07-17 04:26:34 UTC
Well then, the only thing I can guess is that this is a bug in the rosjava generator. Have you tried using catkin_make_isolated
?
Asked by William on 2015-07-17 06:01:28 UTC
Thanks for the advice, no I have never used that command yet. I tried catkin_make_isolated --pkg razor_imu_9dof
but it failed as well. I see you wrote that, is there a good practice for using this command ?
Asked by Cyril Jourdan on 2015-07-17 09:30:59 UTC
What solved the issue for me was incredibly surprising! It looks like ros-indigo-genjava
actually interferes with the compilation. Simply removing the package before compiling solves the problem.
Either remove it via:
- terminal
sudo apt-get remove ros-indigo-genjava
- Synaptic
Then recompile.
Asked by Reuben John on 2015-12-15 06:53:26 UTC
Comments
Thanks for your feedback!
Asked by Cyril Jourdan on 2015-12-15 07:31:57 UTC
Comments