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

roslibjs.getParam returns "Service /rosapi/get_param_names does not exist"

asked 2020-05-14 11:35:11 -0500

130s gravatar image

updated 2020-05-14 17:19:53 -0500

Posting on behalf of coworkers so I don't have full output.

wiki.ros.org/roslibjs/Tutorials explains the usage of ros.getParams. Calling the following snippet returns undefined object.

const test = new ROSLIB.Param({
      ros: this.api,
      name: "/our_custom/custom_param"
    });
    //this.paramRefs["bolles_support_version"].get(
    test.get(
      result => {
        console.dir(result);
        if (callback) {
          callback(result);
        }
      },
      error => {
        console.dir(error);
        this.props.addAlert({
          variant: "error",
          message: error
        });
      }
    );

Calling this.api.getParams() returns:

Service /rosapi/get_param_names does not exist

On ROS "backend", there's this node running:

  <node pkg="rosbridge_server" type="rosbridge_websocket" name="rosbridge_webbridge" output="screen" respawn="true">

What is missing on our setup?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-05-14 11:37:55 -0500

130s gravatar image

updated 2020-05-14 12:45:20 -0500

Posting our own finding. Digging into RobotWebTools/roslibjs/src/core/Ros.js#L479. With this, the error /rosapi/get_param_names does not exist "makes sense" -- rosapi is expected to be in the Parameter's namespace, which implies the param is expected to be registered by rosapi. But in our running ROS system, rosapi is not running. Also found this comment RobotWebTools/rosbridge_suite/#336 that recommends running a node out of rosapi.

So if that's the right way we're fine. But it's a bit strange that roslibjs can't get the parameters unless additional "backend" nodes are started (why rosbridge_server not takes care of it by deafault?). We just need this clarified and documented if needed.

edit flag offensive delete link more

Comments

Getting convinced about roots of problem, I posted on the repo as well https://github.com/RobotWebTools/rosl...

130s gravatar image 130s  ( 2020-05-14 17:28:48 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2020-05-14 11:35:11 -0500

Seen: 507 times

Last updated: May 14 '20