Have you added the new interfaces package to your ament_target_dependencies
?
This is how my CMakeLists.txt
looks like for a cpp executable:
...
find_package(reconstruction_msgs REQUIRED)
...
# Executables ------------------------------
add_executable(gp25_services_node
src/ros_nodes/gp25_services_node.cpp
)
ament_target_dependencies( gp25_services_node
rclcpp
rclcpp_action
moveit_ros_planning_interface
reconstruction_msgs
)
The custumcustom interface package in my case is the reconstruction_msgs
.
Edit:
AlsoAlso make sure your #include
ends with .hpp
.