ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

service does not exist - app_manager rapp, hydro, python, turtlebot

asked 2014-03-14 10:19:37 -0500

david.c.liebman gravatar image

updated 2016-10-24 08:36:24 -0500

ngrennan gravatar image

I am using the app_manager and three rapps. In one, the navigate rapp, I get this message when I try to use a service of my own.

[ERROR] [WallTime: 1394827317.221882] [Client 0] [id: call_service:/app_manager/application/load_map_db:7] call_service InvalidServiceException: Service /app_manager/application/load_map_db does not exist

why would the app manager tell me that this is non existant? I am running hydro on a ubuntu 12.04 system. I'm pretty sure it's there, in the srv folder there's a MapPublish.srv file, and in CMakeLists.txt there's an entry for the srevice in the 'add_service_files' section. Everything compiles right. Other services that Ive written work. What have I done wrong? I thought it was some kind of naming problem, but I think the names I've chosen are somewhat original. Any help would be appreciated. I can add more info if requested.

EDIT 1: My project works like this: I have a turtlebot and I use an internet service to transmit direction info from one computer to another, then through the chrome web browser, websockets and rosbridge server to the turtlebot. I have several services that I've authored that help me out. So far that works. I have also tried to implement amcl and gmapping functions that I try to start and stop remotely. I use the app_manager and three rapps. One rapp is for teleop, one for gmapping, and one for amcl.

I should provide documents showing some of these functions, but the idea is that the rosbridge server stuff tells the app_manager stuff to start and stop different launch files, allowing for this different functionality. This is why my service 'load_map_db' is preceded by the '/app_manager/application/'. What I don't do, is use the rocon launcher. Everything runs on the same port and there's no need to switch (I think they call it flip) from one port to another. I do use the app_manager 'start_app' and 'stop_app'.

I thought briefly that the rosbridge server didn't know about the app_manager navigation services because they weren't started when the rosbridge server was started. This didn't pan out. I restarted the rosbridge server stuff as well as I could in javascript at the time that the load_map_db service was used and there was no change.

I don't understand how some of the services work (like 'list_maps') but this one doesn't. Long ago you could have inserted a control character into a file or file name and not know it. Maybe I have done this? I suspect today's text editors will not let you do this. Below I include some source material.

This is my launch file for the whole program:

  <arg name="rapp_lists" default="tele_presence/tele_presence_apps.rapps"/> 
  <include file="$(find tele_presence)/launch/includes/app_manager_rocon.launch.xml">
    <arg name="rapp_lists" value="$(arg rapp_lists)" />

  <include file="$(find rosbridge_server)/launch/rosbridge_websocket.launch"/>


This is my rapps file:

 - tele_presence/mapping
 - tele_presence/navigate
 - tele_presence/teleop

This is ... (more)

edit retag flag offensive close merge delete


Should I add that I am using ROSBRIDGE SERVER? Does anyone follow questions about rosbridge server? I am using v.2, and the tutorial at this site:

david.c.liebman gravatar image david.c.liebman  ( 2014-03-15 05:51:58 -0500 )edit

That's a runtime error. Probably it built the .srv quite fine, but the error message there is saying the runtime service does not exist at `/app_manager/application/load_map_db does`. Use `rosservice list` to figure out where your service is, or backtrack to figure out why your service did not start

Daniel Stonier gravatar image Daniel Stonier  ( 2014-03-15 19:17:34 -0500 )edit

You might want to add more info about how you're using the rosbridge server. Hard to say whether it is relevant or not given just that information.

Daniel Stonier gravatar image Daniel Stonier  ( 2014-03-15 19:18:05 -0500 )edit

I have added my python (which may be the problem) to the original question.

david.c.liebman gravatar image david.c.liebman  ( 2014-03-17 03:41:36 -0500 )edit

Is it a case of not having used wait_for_service before calling the service?

Daniel Stonier gravatar image Daniel Stonier  ( 2014-03-17 17:18:23 -0500 )edit

how does one 'wait_for_service' with rosbridge server? I googled to no avail.

david.c.liebman gravatar image david.c.liebman  ( 2014-03-18 02:35:12 -0500 )edit

hm... seems like wait for service is not supported by roslibjs and rosbridge yet. I have opened an issue in roslibjs repo. We can continue to discuss there.

jihoonl gravatar image jihoonl  ( 2014-03-18 14:38:50 -0500 )edit

You could probably verify that it is indeed the problem by just putting a sleep of some sorts in your program for n seconds before calling the service. If there's no error, then you know it's just your service client calling the server before it's been constructed on the other side.

Daniel Stonier gravatar image Daniel Stonier  ( 2014-03-18 21:04:07 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2014-03-16 03:37:21 -0500

rtoris288 gravatar image

I have had similar problems when using rosbridge. Be sure that the terminal you are launching rosbridge in knows about your service files and custom nodes. In other words, do this:

cd /path/to/my/catkin/workspace

source devel/setup.bash

rospack profile

roslaunch rosbridge_server rosbridge_websocket.launch

edit flag offensive delete link more


`rospack profile` didn't change my experience. The `devel/setup.bash` file is loaded correctly.

david.c.liebman gravatar image david.c.liebman  ( 2014-03-16 05:57:43 -0500 )edit

I tried this twice just to be sure. I didn't see a change when I ran the above commands. Truthfully I don't understand quite what is intended with the commands. I have some srv files that work, so how do I tell which ones rosbridge doesn't see from the command line?

david.c.liebman gravatar image david.c.liebman  ( 2014-03-18 06:17:57 -0500 )edit

answered 2014-03-16 18:30:38 -0500

jihoonl gravatar image

I don't know if this is similar one as the issue reported in rosbridge_suite.

rostopic python module had a problem with returning the right topic type if the topic does not exist. Could service as well?

edit flag offensive delete link more


would that mean that though '/app_manager/application/load_map_db' doesn't work, that if I change things around that '/load_map_db' by itself would work?? This is not the case. If I launch the python support code outside the rapp, I still get an error. '/load_map_db' service does not exist then.

david.c.liebman gravatar image david.c.liebman  ( 2014-03-17 03:33:30 -0500 )edit

AND I have to think that all this should come back to the fact that I have other services that do work. If it's a runtime error, where is the fault, in the javascript or the python?? I should look there.

david.c.liebman gravatar image david.c.liebman  ( 2014-03-17 03:35:37 -0500 )edit

could it be the problem you say and still some of my services work?

david.c.liebman gravatar image david.c.liebman  ( 2014-03-17 04:15:29 -0500 )edit

Well. One of possibility. Not sure though. I would test service itself without rosbridge first to confirm service works fine. Then test with rosbridge connection. If service works without rosbridge properly, then it obviously tells that something is going on with rosbridge.

jihoonl gravatar image jihoonl  ( 2014-03-17 14:57:49 -0500 )edit

Question Tools

1 follower


Asked: 2014-03-14 10:19:37 -0500

Seen: 1,483 times

Last updated: Mar 17 '14