Closed Timple closed 6 months ago
@Timple I believe the install location for Python was changed between Humble and Python. So I will have to add a check to see what version of ROS is sourced and then change the path. It will probably take some investigation. This is the line that probably needs to change: https://github.com/PickNikRobotics/generate_parameter_library/blob/42c8f8a0591a2cc5993e8bac554b6594dd1425dd/generate_parameter_library/cmake/generate_parameter_library.cmake#L119
Thank you for looking into this! I can confirm that this line works in iron:
set(PARAM_HEADER_FILE ${CMAKE_INSTALL_PREFIX}/lib/${PYTHON_VERSION}/site-packages/${PROJECT_NAME}/${LIB_NAME}.py)
-local/ dist=site
Reading the changelog, there seems to be an ament_get_python_install_dir
function: https://github.com/ament/ament_cmake/pull/387/files
Perhaps that one can be used.
@Timple I used the ament_get_python_install_dir
macro and tested it in the dockerfile and it worked. This is the PR https://github.com/PickNikRobotics/generate_parameter_library/pull/178
Minimal reproducable dockerfile:
Especially the installation in
./install/cmake_generate_parameter_module_example/local/lib/python3.10/dist-packages/cmake_generate_parameter_module_example/admittance_parameters.py
looks suspicious as typical python modules are installed in the same path with/local
.Any ideas @pac48 ?