Can someone explain how to decode and read the message correctly when using 'cbor-raw' with rosbridge_server

asked 2022-01-29 07:11:25 -0500

client.current.send( JSON.stringify({ op: 'subscribe', topic: '/topic', compression: 'cbor-raw', throttle_rate: 0, queue_length: 0, }) );

const msgdef1 = string data; data = CBOR.decode(message.data); const MsgReader1 = getMessageReader(msgdef1, { typeName: '/topics', readerOptions: {}, }); console.log('read message',MsgReader1.readMessage(data.msg.bytes));

but this is giving a error.

edit retag flag offensive close merge delete