[Bug] CMake files

This is an error report.


Screenshot of the error


Error details

I get this same error every time I use CMake files, this happened on the quiz for unit 4 as well and because of this I haven't been able to submit either one.

Hi!
Maybe you forgot to add this line to package.xml

<member_of_group>rosidl_interface_packages</member_of_group>

The content of the file package.xml should looks like this.

<?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>actions_quiz_msg</name>
  <version>0.0.0</version>
  <description>TODO: Package description</description>
  <maintainer email="user@todo.todo">user</maintainer>
  <license>TODO: License declaration</license>

  <buildtool_depend>ament_cmake</buildtool_depend>

  <depend>rosidl_default_generators</depend>
  <depend>action_msgs</depend>
  <depend>rclcpp</depend>

  <member_of_group>rosidl_interface_packages</member_of_group>

  <test_depend>ament_lint_auto</test_depend>
  <test_depend>ament_lint_common</test_depend>

  <export>
    <build_type>ament_cmake</build_type>
  </export>
</package>

Yes, thank you! I did, but even after fixing it I get this error which is not true since there are no syntax errors there after checking the file:

Can you show me your CMakeLists.txt in package t3_action_msg?

cmake_minimum_required(VERSION 3.8)
project(actions_quiz_msg)

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)

uncomment the following section in order to fill in

further dependencies manually.

find_package( REQUIRED)

find_package(rosidl_default_generators REQUIRED)

rosidl_generate_interfaces(${PROJECT_NAME}
“action/Distance.action”
)

if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)

the following line skips the linter which checks for copyrights

comment the line when a copyright and license is added to all source files

set(ament_cmake_copyright_FOUND TRUE)

the following line skips cpplint (only works in a git repo)

comment the line when this package is in a git repo and when

a copyright and license is added to all source files

set(ament_cmake_cpplint_FOUND TRUE)
ament_lint_auto_find_test_dependencies()
endif()

ament_package()

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.