Robotics StackExchange | Archived questions

service didn't show namespace.

  1. launch file specify the node "surface_service" in namespace "opnear3".

  2. the node "surfaceservice" has the function to provide one service "select service" ros::ServiceServer surfaceserver; surfaceserver_ = nh.advertiseService( "selectservice", &xxxx::selectcallback, this);

  3. roslaunch launch file, I'm expecting the service name of "selectservice" will be /opnear3/selectservice when using rosservice list. in stead, in only shows /select_service.

Asked by chenchengshao@gmail.com on 2016-02-04 14:32:49 UTC

Comments

Because I want to get another service like /opnear4/select_service by running same ROS node in different namespace, is there any way to create service with namespace on it?

Asked by chenchengshao@gmail.com on 2016-02-04 14:50:31 UTC

Answers

Did you try to include your node in a group in your launch file ?

<group ns="opnear3">
    <node name="surface_service" .... />
</group>

Asked by F.Brosseau on 2016-02-05 03:01:57 UTC

Comments

I did try to put in the group, looks like it doesn't help.

Asked by chenchengshao@gmail.com on 2016-02-05 10:31:37 UTC