Search Unity

  1. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Non default ROS2 packages available?

Discussion in 'Robotics' started by kraj_iml_fh, Aug 2, 2023.

  1. kraj_iml_fh

    kraj_iml_fh

    Joined:
    Apr 12, 2023
    Posts:
    4
    Hi,

    in the past I used the ros2_dotnet projetct https://github.com/ros2-dotnet/ros2_dotnet to use ROS with Unity and the Hololens2.

    Im not an expert, but from my understanding, it is not possible to install additional ROS packages with this project and I was wondering, if that is the case with ROS# resp. Unity Robotics Hub.

    I want to use the audio_common package and in the future others as well and wanted to know if it is worth it to get famliar with URH for that purpose.

    Thanks
     
  2. Envilon

    Envilon

    Joined:
    Aug 8, 2020
    Posts:
    55
    Hi, I'm not familiar with ros2_dotnet, but it sounds weird that it "wouldn't be possible to install additional ROS packages".

    I think URH is currently the best solution for ROS integration with Unity. However, keep in mind that the community here is not exactly booming, so sometimes it takes time to get some help (but from my experience it was usually better than ROS forums). And some things might not be supported in URH, for example Actions, but there might be a way around it using Services and some extra code. But I see that Actions are not supported by ros2_dotnet as well.
     
  3. kraj_iml_fh

    kraj_iml_fh

    Joined:
    Apr 12, 2023
    Posts:
    4
    Thank you for your reply.

    To me it seems that ros2_dotnet only supplies basic functionalities like publishing and subscribing.

    Like I said Im not an expert and neither in the ros2_dotnet nor in ros-sharp resp. URH is explicitly mentioned how to install or use non default packages. I was hoping someone could tell me how to do it.

    I saw that in an example project for URH https://github.com/Unity-Technologies/Robotics-Nav2-SLAM-Example/tree/main/Nav2SLAMExampleProject they are using the turtlebot package, so I assume there should be a way, but I dont know if I should simply copy the packages into the Assets folder in Unity or if there are additional steps required.
     
  4. Envilon

    Envilon

    Joined:
    Aug 8, 2020
    Posts:
    55
    But the ROS packages run in your ROS environment, not in your Unity project. You don't install ROS packages into your Unity project. You usually only need to communicate with the ROS package, either using messages or services. If the ROS package is using some of the standard interfaces (message/service types), they will already be included with URH. If the package is using some custom message types, you'll have to use the Message Generator, which is part of the ROS-TCP-Connector. I also explained this process a bit more in this forum thread.
     
    Last edited: Aug 7, 2023