i can not build a ros project in apollo docker, the always a problem occured ?
i build the project as follow: mkdir -p rosws/src cd rosws/ catkin_make
and then i get the error: Base path: /apollo/mytest/rosws Source space: /apollo/mytest/rosws/src Build space: /apollo/mytest/rosws/build Devel space: /apollo/mytest/rosws/devel Install space: /apollo/mytest/rosws/install Creating symlink "/apollo/mytest/rosws/src/CMakeLists.txt" pointing to "/apollo/third_party/ros_x86_64/share/catkin/cmake/toplevel.cmake"
Running command: "cmake /apollo/mytest/rosws/src -DCATKIN_DEVEL_PREFIX=/apollo/mytest/rosws/devel -DCMAKE_INSTALL_PREFIX=/apollo/mytest/rosws/install -G Unix Makefiles" in "/apollo/mytest/rosws/build"
-- The C compiler identification is GNU 4.8.4 -- The CXX compiler identification is GNU 4.8.4 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done CMake Error at CMakeLists.txt:20 (message): Search for 'catkin' in workspace failed (catkin_find_pkg catkin /apollo/mytest/rosws/src): Traceback (most recent call last):
File "/usr/local/bin/catkin_find_pkg", line 9, in <module>
load_entry_point('catkin-pkg==0.3.6', 'console_scripts', 'catkin_find_pkg')()
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 351, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2363, in load_entry_point
return ep.load()
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2088, in load
entry = __import__(self.module_name, globals(),globals(), ['__name__'])
ImportError: No module named cli.find_pkg
-- Configuring incomplete, errors occurred! See also "/apollo/mytest/rosws/build/CMakeFiles/CMakeOutput.log". Invoking "cmake" failed
so how to solve the proble
Can you can try to
source scripts/apollo_base.sh
and run your commands again?
You are recommended to build via Bazel BUILD file. It is easier to manage, and most importantly, you can easily leverage existing source code in Apollo; In addition, you can find many BUILD file examples in Apollo source code.
I have been using catkin command tools (https://catkin-tools.readthedocs.io/en/latest/) for a while and found it is much more friendly to use to build ros projects.
This Python package provides command line tools for working with the catkin meta-buildsystem and catkin workspaces. These tools are separate from the Catkin CMake macros used in Catkin source packages.
@lxbeyond is the issue still relevant? If your issue is resolved, please kindly close the issue. The ticket will be closed in 72 hours if there is no response, and please feel free to open new issue if there are additional question.