ROS2 colcon build doesn't create polygone__struct.hpp [closed]
Hello everyone. I use ROS2 Foxy for windows 10, I followed the Installing tuto.
I am trying to create my custom message for ROS 2.
When I compile with colcon build --symlink-install
or --merge-install
, it tells me that the message package failed.
When I look in the events.log file, there is this line:
[24.203000] (custom_msg) StdoutLine: {'line': b"C:\\Users\\Bimprinter-user04\\Desktop\\Prototype\\dev_ws\\build\\custom_msg\\rosidl_generator_cpp\\custom_msg/msg/detail/waypoint__struct.hpp(19,10): fatal error C1083: Impossible d'ouvrir le fichier include\xff: 'custom_msg/msg/detail/polygon__struct.hpp'\xff: No such file or directory [C:\\Users\\Bimprinter-user04\\Desktop\\Prototype\\dev_ws\\build\\custom_msg\\custom_msg__rosidl_typesupport_introspection_cpp.vcxproj]\r\n"}
here are my files : CMakeList.txt :
cmake_minimum_required(VERSION 3.5)
project(custom_msg)
# Default to C99
if(NOT CMAKE_C_STANDARD)
set(CMAKE_C_STANDARD 99)
endif()
# Default to C++14
if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 14)
endif()
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()
# find dependencies
find_package(ament_cmake REQUIRED)
find_package(rosidl_default_generators REQUIRED)
find_package(std_msgs REQUIRED)
find_package(geometry_msgs REQUIRED)
find_package(builtin_interfaces)
# uncomment the following section in order to fill in
# further dependencies manually.
# find_package(<dependency> REQUIRED)
if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)
# the following line skips the linter which checks for copyrights
# uncomment the line when a copyright and license is not present in all source files
#set(ament_cmake_copyright_FOUND TRUE)
# the following line skips cpplint (only works in a git repo)
# uncomment the line when this package is not in a git repo
#set(ament_cmake_cpplint_FOUND TRUE)
ament_lint_auto_find_test_dependencies()
endif()
rosidl_generate_interfaces(${PROJECT_NAME}
"msg/Waypoint.msg"
DEPENDENCIES std_msgs
DEPENDENCIES geometry_msgs
DEPENDENCIES builtin_interfaces
)
ament_export_dependencies(rosidl_default_runtime)
ament_package()
package.xml :
<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>custom_msg</name>
<version>0.0.0</version>
<description>TODO: Package description</description>
<maintainer email="43658668+Nehil971@users.noreply.github.com">Bimprinter-user03</maintainer>
<license>TODO: License declaration</license>
<buildtool_depend>ament_cmake</buildtool_depend>
<test_depend>ament_lint_auto</test_depend>
<test_depend>ament_lint_common</test_depend>
<buildtool_depend>rosidl_default_generators</buildtool_depend>
<exec_depend>rosidl_default_runtime</exec_depend>
<member_of_group>rosidl_interface_packages</member_of_group>
<exec_depend>rclpy</exec_depend>
<exec_depend>std_msgs</exec_depend>
<buildtool_depend>geometry_msgs</buildtool_depend>
<exec_depend>geometry_msgs</exec_depend>
<export>
<build_type>ament_cmake</build_type>
</export>
</package>
and my msg :
Polygon[] waypoint
#### EDIT
I just recreated the polygon message following the message creation tutorial and it works