Search Unity

  1. We are migrating the Unity Forums to Unity Discussions. On July 12, the Unity Forums will become read-only. On July 15, Unity Discussions will become read-only until July 18, when the new design and the migrated forum contents will go live. Read our full announcement for more information and let us know if you have any questions.

Ros Service Call from Unity to call a service implemented in Unity

Discussion in 'Robotics' started by ingeniarius_games, Mar 20, 2023.

  1. ingeniarius_games

    ingeniarius_games

    Joined:
    Jan 23, 2018
    Posts:
    1
    Hello,

    I have implemented a service called Action_srv in Unity project(server). I can send request to this service using the terminal and "rosservice call /Action_srv" and it works.

    On another Unity project(client) I am trying to send a request. I used RosServiceCallExample.cs, however it complained as "Unity service 'action_srv' has not been implemented!"

    I assume instead of ros.RegisterRosService, I should use ros.RegisterUnityService(string topic, string RosMessageName), but I could not figure out what exactly topic and RosMessageName and I could not find an example for this.

    Could you please help me with it? Thank you!

    Cheers,
    Beril
     
  2. Envilon

    Envilon

    Joined:
    Aug 8, 2020
    Posts:
    55
    Do I understand correctly that you are trying to send ROS messages (service requests) between two running Unity projects?