Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Documentation] - Create and build messages #129

Open
xas opened this issue Apr 11, 2024 · 0 comments
Open

[Documentation] - Create and build messages #129

xas opened this issue Apr 11, 2024 · 0 comments

Comments

@xas
Copy link

xas commented Apr 11, 2024

Hi,

I am a dotnet dev, but totally new with ROS2.

I did ok with some python tutorials, but now trying to migrate the code to ROS2.NET

I am trying to understand how to build any message (currently action msg) but I am failing miserably.

I am not sure how correctly fill the CMakeLists.txt (currently it is just by guessing 😞). My questions are:

  • Can I create a new workspace with a new package only with action messages ? Or should I keep it into the dotnet ws ?
  • I have some errors when trying to colcon build (see below), but I am not an expert of cmake, so I must be missing some packages/linker/...?

Can someone guide me ?

PS: The building errors:

CMake Error: Cannot determine link language for target "cloudnet__rosidl_typesupport_fastrtps_c".
CMake Error: CMake can not determine linker language for target: cloudnet__rosidl_typesupport_fastrtps_c
CMake Error: Cannot determine link language for target "cloudnet__rosidl_typesupport_fastrtps_cpp".
CMake Error: CMake can not determine linker language for target: cloudnet__rosidl_typesupport_fastrtps_cpp
CMake Error: Cannot determine link language for target "cloudnet__rosidl_typesupport_c".
CMake Error: CMake can not determine linker language for target: cloudnet__rosidl_typesupport_c
CMake Error: Cannot determine link language for target "cloudnet__rosidl_typesupport_introspection_cpp".
CMake Error: CMake can not determine linker language for target: cloudnet__rosidl_typesupport_introspection_cpp
CMake Error: Cannot determine link language for target "cloudnet__rosidl_typesupport_cpp".
CMake Error: CMake can not determine linker language for target: cloudnet__rosidl_typesupport_cpp

The CMakeLists.txt

cmake_minimum_required(VERSION 3.5)
project(cloudnet C)

find_package(ament_cmake REQUIRED)
find_package(builtin_interfaces REQUIRED)
find_package(rosidl_default_generators REQUIRED)
find_package(unique_identifier_msgs REQUIRED)
find_package(rosidl_default_generators REQUIRED)

rosidl_generate_interfaces(${PROJECT_NAME}
  "action/OneAction.action"
  DEPENDENCIES builtin_interfaces action_msgs unique_identifier_msgs
  ADD_LINTER_TESTS
)

ament_export_dependencies(rosidl_default_runtime)
ament_package()
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

No branches or pull requests

1 participant