Search Unity

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

How to create a ros service in unity of type std_srvs/Empty

Discussion in 'Robotics' started by theksg, Oct 26, 2023.

  1. theksg

    theksg

    Joined:
    Oct 20, 2023
    Posts:
    5
    Hi,

    I followed the tutorials provided on github for creating service in ros using custom message. I want to use std_srvs/ Empty type for the service. Does unity support default types of services or I am required to generate message for default types also?
     
  2. theksg

    theksg

    Joined:
    Oct 20, 2023
    Posts:
    5
    add the line at top

    using RosMessageTypes.Std;

    and then use EmptyRequest and EmptyResponse accordingly.