rostopic echo Int32MultiArray as hex
I'm looking for a way to use rostopic echo
to print a Int32MultiArray
message data as hex values instead of decimal. I've tried piping to xxd
but it's printing the hex for the ASCII text representing the numbers.
Here's an example Int32MultiArray. I'm using the plotting format flag -p
only to reduce the clutter. I'd like to see this:
rostopic echo -p /test_topic
%time,field.layout.data_offset,field.data0,field.data1,field.data2,field.data3
1499982217479538917,0,20805,1,21,22
1499982219479435920,0,20805,1,21,22
1499982223479465007,0,20805,1,21,22
1499982225479479074,0,20805,1,21,22
Looks something like this:
%time,field.layout.data_offset,field.data0,field.data1,field.data2,field.data3
1499982217479538917,0x0,0x5145,0x1,0x15,0x16
1499982219479435920,0x0,0x5145,0x1,0x15,0x16
1499982223479465007,0x0,0x5145,0x1,0x15,0x16
1499982225479479074,0x0,0x5145,0x1,0x15,0x16
I've even tried using wireshark to look at the raw message but that's a challenge to trace down.