ros2-web-bridge icon indicating copy to clipboard operation
ros2-web-bridge copied to clipboard

set_level as a request operation

Open qiuzhong opened this issue 6 years ago • 3 comments

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.

qiuzhong avatar Apr 13 '18 06:04 qiuzhong

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.

minggangw avatar Apr 16 '18 02:04 minggangw

@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?

qiuzhong avatar Apr 16 '18 05:04 qiuzhong

I have no idea why the roslibjs implemented this interface.

minggangw avatar Apr 18 '18 05:04 minggangw