0
$\begingroup$

Rosanswers logo

I'm using rosbridge with catkin packages.

ros_rope (the webserver for the GUI) is started with a python script. At the same time rosbridge_websocket is started. Here's my launchfile:

<launch>
        <node name="ros_rope_server" pkg="ros_rope" type="server.py" output="screen" />
        <node name="ros_rope_bridge" pkg="rosbridge_server" type="rosbridge_websocket" />
        <node name="ros_rope_helper" pkg="ros_rope_helper" type="listener.py" output="screen" />
</launch>

Additionally there's another ROS node ros_rope_test providing the different services for the gui:

<launch>
        <node name="ros_rope_test_server" pkg="ros_rope_test" type="rope_server.py" output="screen" />
</launch>

I start both packages with roslaunch ros_rope server and roslaunch ros_rope_test server.

When the ros_rope executes the first service call to ros_rope_test, it throws the following exception:

[ERROR] [WallTime: 1396864502.429285] [Client 0] [id: call_service:/get_process_list:2] call_service InvalidPackageException: Unable to load the manifest for package ros_rope_test. Caused by: ros_rope_test

The next calls work without any problem. So this exception is only thrown once after the node is started.

How can I fix this?


Originally posted by Pro on ROS Answers with karma: 11 on 2014-04-07

Post score: 1


Original comments

Comment by jihoonl on 2014-04-12:
Did you make sure service is available before you call service?

Comment by Pro on 2014-04-13:
Yes, I can call the service with rosservice call -> The service is definetly up and running. I can also reproduce this behavior by simply restarting the rosbridge_server rosbridge_websocket. Thus rosbridge causes the error after each restart. Maybe it's related to catkin packages?

Comment by jihoonl on 2014-04-13:
Can you provide any test code? So I can dig out the problem. I am not sure how to reproduce the given issue.

Comment by Pro on 2014-04-14:
Here are two ros packages to reproduce this behavior: https://www.dropbox.com/s/5acl60sygzjyf51/gui_process_editor.tar.gz Just catkin_make and start them with roslaunch rosbridge_test_service server and roslauch rosbridge_test_webapp server. Then open your browser http://localhost:3000

Comment by Pro on 2014-04-14:
It looks like this problem only occurs when using backbone.js (see the comments in main.js file within the webapp folder)

Comment by jihoonl on 2014-04-14:
It complains about ros_rope package missing when I tried to start rosbridge_test_webapp server. Can you share this? Or any simple way to replicate the problem would be good too.

Comment by Pro on 2014-04-14:
Oh, sorry, here again: https://www.dropbox.com/s/h088mhtyqwf34zw/rosbridge_test_2.tar.gz Unfortunately I didn't found any simpler way than creating these two packages...

Comment by jihoonl on 2014-04-16:
I am following this. Please wait me for test. I just got too many things are loaded on my todo list these days.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

After some experiment, I firstly confirms that ServiceRequests works fine with the code below.

  var ros = new ROSLIB.Ros();

  // If there is an error on the backend, an 'error' emit will be emitted.
  ros.on('error', function(error) {
    console.log(error);
  });

  // Find out exactly when we made a connection.
  ros.on('connection', function() {
    console.log('Connection made!');
    var getListService = new ROSLIB.Service({
      ros : ros,
      name : '/get_list',
      serviceType : 'rosbridge_test_service/GetList'
    });
    var request = new ROSLIB.ServiceRequest({});
    getListService.callService(request, function(result) {
       console.log(result);
     });
  });

  // Create a connection to the rosbridge WebSocket server.
  ros.connect('ws://localhost:9090'); //98

I figured out that your code call the service twice almost simultaneously. And it seems to cause a problem when rosbridge creates a message cache. I have tried to investigate to solve this issue but the exception arises from ros core library which I can't track down more deeply.

Thus, I would suggest to clean up the server code logic to call service once. rosbridge is able to handle multiple connections and multiple service calls. However, this case was too extreme...


Originally posted by jihoonl with karma: 634 on 2014-04-16

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.