Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

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?