RobotWebTools / ros2-web-bridge

Bridging your browser to the ROS 2.0
Apache License 2.0
209 stars 68 forks source link

set_level as a request operation #93

Open qiuzhong opened 6 years ago

qiuzhong commented 6 years ago

According to the protocol spec, set_level is a response operation from the ros2-web-bridge to the roslibjs.

However, there is a API in roslibjs: Ros.setStatusLevel

Ros.prototype.setStatusLevel = function(level, id){
  var levelMsg = {
    op: 'set_level',
    level: level,
    id: id
  };

  this.callOnConnection(levelMsg);
};

This implies set_level should be a request from roslibjs. Currently, there is no handler for this kind of request operation.

minggangw commented 6 years ago

In the protocol spec 3.2

rosbridge sends status messages to the client relating to the successes and failures of rosbridge protocol commands. There are four status levels: info, warning, error, none. By default, rosbridge uses a status level of error.

@qiuzhong have you find any code path which triggers the setStatusLevel function in roslibjs? This operation should not be executed by client side as I understand.

qiuzhong commented 6 years ago

@minggangw , no, I didn't found any place that calling Ros.setStatusLevel() in roslibjs. It's just an exposed API of rclnodejs. I thought if this API comply the spec, then bridge should support set_level as a request and vice versa.

So you think this API conflicts with the spec?

minggangw commented 6 years ago

I have no idea why the roslibjs implemented this interface.