Skip to content

Rosidl cli generate proto test#25

Open
gonzodepedro wants to merge 4 commits intostreamline-file-generationfrom
rosidl-cli-generate-proto-test
Open

Rosidl cli generate proto test#25
gonzodepedro wants to merge 4 commits intostreamline-file-generationfrom
rosidl-cli-generate-proto-test

Conversation

@gonzodepedro
Copy link
Copy Markdown
Collaborator

Adds tests for rosidl cli generate typesupports for protobuf

Signed-off-by: Gonzalo de Pedro <gonzalodepedro@ekumenlabs.com>
Signed-off-by: Gonzalo de Pedro <gonzalodepedro@ekumenlabs.com>
@gonzodepedro
Copy link
Copy Markdown
Collaborator Author

Get paths from get_package_share_directory

      package_share_path = pathlib.Path(
            get_package_share_directory('rosidl_typesupport_protobuf_c'))

@gonzodepedro
Copy link
Copy Markdown
Collaborator Author

Check that it is creating typeadapters

Signed-off-by: Gonzalo de Pedro <gonzalodepedro@ekumenlabs.com>
@gonzodepedro
Copy link
Copy Markdown
Collaborator Author

Both comments are fixed now


subprocess.run([
'rosidl', 'generate', '-ts', 'protobuf_c', '-o', output_path, 'std_msgs', './msg/String.msg'
], cwd='/home/aeten/ros2_rolling/install/std_msgs/share/std_msgs', check=True)
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hard coded path still here

target_link_libraries(test_wstring_conversion
${PROJECT_NAME})
endif()
find_package(ament_cmake_pytest REQUIRED)
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needed in package.xml too

Signed-off-by: Gonzalo de Pedro <gonzalodepedro@ekumenlabs.com>
@tfoote
Copy link
Copy Markdown
Owner

tfoote commented Mar 25, 2024

Current failure:

  CMake Error at /__w/rosidl_typesupport_protobuf/rosidl_typesupport_protobuf/ros_ws/install/rosidl_typesupport_protobuf_c/share/rosidl_typesupport_protobuf_c/cmake/rosidl_typesupport_protobuf_c_generate_interfaces.cmake:41 (add_library):
    No SOURCES given to target:
    rosidl_generator_py_custom__rosidl_typesupport_protobuf_c
  Call Stack (most recent call first):
    /__w/rosidl_typesupport_protobuf/rosidl_typesupport_protobuf/ros_ws/install/ament_cmake_core/share/ament_cmake_core/cmake/core/ament_execute_extensions.cmake:48 (include)
    /__w/rosidl_typesupport_protobuf/rosidl_typesupport_protobuf/ros_ws/install/rosidl_cmake/share/rosidl_cmake/cmake/rosidl_generate_interfaces.cmake:286 (ament_execute_extensions)
    CMakeLists.txt:56 (rosidl_generate_interfaces)

This looks like it's trying to compile the library before it's generated. We need a dependency in CMake to prevent this.

@gonzodepedro
Copy link
Copy Markdown
Collaborator Author

This PR must be compiled using this repos file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants