Conversation
…-packages-on-ros2 Feature/fix unable to build sub packages on ros2
| endif() | ||
|
|
||
| if(NOT NMPC_STANDALONE) | ||
| if(NOT EXISTS "${CMAKE_CURRENT_BINARY_DIR}/install_manifest.txt") |
There was a problem hiding this comment.
why is this needed ?
There was a problem hiding this comment.
@ThomasDuvinage We have problem with warning about missing install_manifest.txt. This is our solution. However, I saw that you have fixed this problem in QpSolverCollection, can you share with us?
There was a problem hiding this comment.
As mentioned in ament documentation, ament_package should be called at the end of the CMakeLists.txt. Sorry about that I missed that last time.
In order for other ament package to found the generated library, you need to export it using ament cmake functions.
Please have a look to :
There was a problem hiding this comment.
@chuoru the problem here is caused by add_project_dependency(...)
I didn't look deep into it but removing it helped to solve the issue.
There was a problem hiding this comment.
CMakeLists.txt must be kept in place. Otherwise, compiling NMPC as a standalone from mc-rtc-superbuild for example will not be possible. Furthermore this doesn't respect Modern Cmake standard.
There was a problem hiding this comment.
@ThomasDuvinage This will be the most problematic thing to modify. We found out that ament_cmake (colcon) doesn't consider add_subproject in case the CMakeLists.txt in NMPC folder. This makes ROS2 only recognize NMPC as sole packages not set of packages. I will investigate a bit more about this problem and mc-rtc-superbuild
| find_package(Eigen3 REQUIRED) | ||
| include_directories(${EIGEN3_INCLUDE_DIR}) | ||
|
|
||
| if(NOT EXISTS "${CMAKE_CURRENT_BINARY_DIR}/install_manifest.txt") |
There was a problem hiding this comment.
same comment as before
…install paths, linkage
👍 fix doxygen
| option(INSTALL_DOCUMENTATION "Generate and install the documentation" OFF) | ||
|
|
||
| include(../cmake/base.cmake) | ||
| project(nmpc_cgmres LANGUAGES CXX) |
There was a problem hiding this comment.
@ThomasDuvinage why don't you want to use include(../cmake/base.cmake) (submodule) anymore?
After you change install(DIRECTORY include/nmpc_ddp DESTINATION "${INCLUDE_INSTALL_DIR}") to install(DIRECTORY include/nmpc_ddp DESTINATION include), ctest can't found test.

There was a problem hiding this comment.
@ThomasDuvinage I fixed error Ctest No tests were found after you remove submodule and implement CI colcon standalone in PR: chuoru#4
Please take a look when @chuoru have time. Thanks !
@ThomasDuvinage @mmurooka
With @nqtabokado, we migrated this repo to ROS2. The main modification is in the way of using subproject since ament_cmake (colcon) is unable to add_subproject like catkin anymore.
All actions are confirmed with correct number of test case (previously in https://github.com/isri-aist/NMPC/actions only 3 test cases are executed).
https://github.com/chuoru/NMPC/actions/runs/14055514181
https://github.com/chuoru/NMPC/actions/runs/14055514146
https://github.com/chuoru/NMPC/actions/runs/14055514128