Robotics StackExchange | Archived questions

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

client.current.send( JSON.stringify({ op: 'subscribe', topic: '/topic', compression: 'cbor-raw', throttlerate: 0, queuelength: 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.

Asked by Rahul Katiyar on 2022-01-29 08:11:25 UTC

Comments

Answers