Closed lucasw closed 2 years ago
Need to install rosdep
Building catkin isn't putting setup.bash in /opt/ros/noetic/setup.bash
.
Try building it outside of docker, on 20.04
cd ~/own/build/catkin
cmake ../../src/ros_from_src/catkin_ws/src/catkin/ -DCATKIN_BUILD_BINARY_PACKAGE=ON -DCMAKE_INSTALL_PREFIX=../catkin_install -DPYTHON_EXECUTABLE=/usr/bin/python -DSETUPTOOLS_DEB_LAYOUT=OFF && make && make install
It didn't do anything with the setup.bash.in and related files either,
Try manually creating them, replace @SETUP_DIR@
with /opt/ros/noetic
diff /opt/ros/noetic/setup.sh /opt/ros/noetic/share/catkin/cmake/templates/setup.sh.in
14c14
< : ${_CATKIN_SETUP_DIR:=/opt/ros/noetic}
---
> : ${_CATKIN_SETUP_DIR:=@SETUP_DIR@}
Also need _setup_util.py
- that should easier to search for also to see what cmake command generates it
-> cmake/catkin_generate_environment.cmake
?
All the files are being generated, it's just they are going to build/catkin/catkin_generated/installspace and not getting copied to /opt/ros/noetic
CATKIN_INSTALL_INTO_PREFIX_ROOT
is what I'm looking for:
foreach(shell ${CATKIN_SETUP_SHELL})
configure_file(${catkin_EXTRAS_DIR}/templates/setup.${shell}.in
${CMAKE_BINARY_DIR}/catkin_generated/installspace/setup.${shell}
@ONLY)
configure_file(${catkin_EXTRAS_DIR}/templates/local_setup.${shell}.in
${CMAKE_BINARY_DIR}/catkin_generated/installspace/local_setup.${shell}
@ONLY)
if(CATKIN_INSTALL_INTO_PREFIX_ROOT)
install(FILES
${CMAKE_BINARY_DIR}/catkin_generated/installspace/setup.${shell}
${CMAKE_BINARY_DIR}/catkin_generated/installspace/local_setup.${shell}
DESTINATION ${CMAKE_INSTALL_PREFIX})
endif()
endforeach(
Now the setup files are going in, but setup.bash doesn't result in anything in ROS_PACKAGE_PATH -> that is done later in ros environment, so don't source setup.bash until after that.
Now rospack
isn't getting install, or library locations aren't on the path:
rospack: error while loading shared libraries: librospack.so: cannot open shared object file: No such file or directory
The command '/bin/sh -c rospack list' returned a non-zero code: 127
Sourcing setup.bash fixes that, now make roscore work
Same as https://github.com/lucasw/ros_from_src/issues/3#issuecomment-945204527 but duplicated in 22.04 docker container
rospack list is blank
ROS_PACKAGE_PATH
is also empty, even after running devel/setup.sh