Skip to content

Conversation

f0reachARR
Copy link

In this PR, I will introduce a support for Jazzy distribution. (Iron is not tested but I think it will work)

There are some changes:

  • Add repository information for Jazzy, including new package rosidl_core.
  • Changes for CMake functions
    • Use more proper way (checking dependencies version) to use rosidl_get_typesupport_target
    • Add jazzy as CycloneDDS supported distribution.

I tested this PR on my Ubuntu 24.04 + Unity 2022.3.15f1 + ROS 2 Jazzy environment.

@LegitYew0108
Copy link

I tested this PR on Ubuntu24.04 + ROS 2 Jazzy environment, but I encountered one error with --standalone option.

CMake Error at CMakeLists.txt:294 (message):
  Could not find yaml
Call Stack (most recent call first):
  CMakeLists.txt:395 (get_standalone_dependencies)

So, I changed these points, and it works successfully.

(src/ros2cs/ros2cs_core/CMakeLists.txt)

(row:31)
+ find_package( yaml-cpp REQUIRED)
....
(row:360~382)
  set(ros2_standalone_libs

    rcl
    rcl_logging_spdlog
    rcl_yaml_param_parser
    rcpputils
    rcutils
    rmw
    FastRTPS
    rmw_fastrtps_cpp
    CycloneDDS
    rmw_cyclonedds_cpp
    rmw_dds_common
    rmw_implementation
    rosidl_runtime_c
    rosidl_typesupport_c
    rosidl_typesupport_cpp
    rosidl_typesupport_introspection_c
    rosidl_typesupport_introspection_cpp
    spdlog
    tracetools
-   yaml
+   yaml-cpp
    tinyxml2
  )

@f0reachARR
Copy link
Author

Thank you @LegitYew0108 ! I confirmed yaml-cpp errors on standalone mode, and fixed it.

@watanabe-pfr
Copy link

watanabe-pfr commented Jan 15, 2025

Thank you for your work, I would like the maintainer to merge this PR.

I've also tested this branch with Ros2ForUnity, and it works with my Jazzy environment (Ubuntu 24.04, ROS 2 Jazzy)

Maybe the line of find_package is needed as @LegitYew0108 mentioned.

+ find_package(yaml-cpp REQUIRED)

@Mechaick
Copy link

Thank you for your work, I would like the maintainer to merge this PR.

I've also tested this branch with Ros2ForUnity, and it works with my Jazzy environment (Ubuntu 24.04, ROS 2 Jazzy)

Maybe the line of find_package is needed as @LegitYew0108 mentioned.

+ find_package(yaml-cpp REQUIRED)

Dear Watanabe,

Could you detail how you managed to get it work with your jazzy environment, do you have your own fork of Ros2ForUnity you might share ?

Many thanks !

@f0reachARR
Copy link
Author

f0reachARR commented Sep 12, 2025

Here is my version of ros2-for-unity: RobotecAI/ros2-for-unity#125
In addition to these PR, you may need to use this patch for build errors: #69

@Mechaick
Copy link

Here is my version of ros2-for-unity: RobotecAI/ros2-for-unity#125 In addition to these PR, you may need to use this patch for build errors: #69

Have you tried it ? Because in the ros2cs.repos you are not refering to your fork of ros2cs, so if I do pull the repos its doing :
Detected ROS2 jazzy. Getting required repos from 'ros2_jazzy.repos' ./get_repos.sh: line 9: ros2_jazzy.repos: No such file or directory /home/mechaick/ros2unity_ws/ros2-for-unity

Do I only need to change the target of ros2cs.repo to your work ?

Thats what I tried earlier and was facing other issues when importing in linux the standalone compiled one :

RuntimeError: failed to get symbol 'rmw_init_options_init' due to Environment variable 'AMENT_PREFIX_PATH' is not set or empty, at ./src/functions.cpp:171, at ./src/rcl/init_options.c:75
ROS2.Utils.CheckReturnEnum (System.Int32 ret) (at <4fd8cdb8b3a94e43acf2c21a144d59e0>:0)
ROS2.Ros2cs.Init () (at <4fd8cdb8b3a94e43acf2c21a144d59e0>:0)
ROS2.ROS2ForUnity..ctor () (at Assets/Ros2ForUnity/Scripts/ROS2ForUnity.cs:311)
ROS2.ROS2UnityCore..ctor () (at Assets/Ros2ForUnity/Scripts/ROS2UnityCore.cs:55)
Ros2Node..ctor () (at Assets/Scripts/Ros2Node.cs:12)
Ros2ExampleNode..ctor () (at Assets/Scripts/Ros2ExampleNode.cs:19)
UnityEditor.EditorApplication:Internal_CallDelayFunctions() (at /home/bokken/build/output/unity/unity/Editor/Mono/EditorApplication.cs:395)

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.

4 participants