How to read Binary data from a bagfile ?

asked 2018-04-12 07:27:08 -0500

aks gravatar image

updated 2018-04-12 08:06:47 -0500

I have received a bag file which i need to analyze. I opened the file in rqt_bag and played a topic /pnc/carstatus which has the messages of type string. Now to read the messages, I used rostopic echo /pnc/carstatus. But this shows data: !!Binary | and some unreadable characters below it. Is there a way to read the contents of these bag files ?

ps : I cannot covert the file to a .csv or a .txt format as it contains a topic of custom message type and it fives a unicode error. ps : I am not sure if i can attach an image or not but I guess looking at the image makes it a lot more clearer. Sorry if i am offending the rules.image description

edit retag flag offensive close merge delete

Comments

To me it seems you are actually doing everything correct. The problem with the custom message is that we cannot say what this is about without further Information. How is the message defined? What is the purpose? What should it be about? Is it a string where somebody wrote "!!Binary | ChQJBK..."?

mgruhler gravatar image mgruhler  ( 2018-04-12 08:02:04 -0500 )edit

Hi @mig I guess you got a bit confused. /pnc/carstatus has a message of type string. It is another topic in the file which has a custom message type (Ill edit the question for better understanding). It is definitely a string but how do i know if someone wrote!!Binary | ChQJBK... or not ?

aks gravatar image aks  ( 2018-04-12 08:05:54 -0500 )edit

Pleasen provide more info: What is the Output of rosbag info of your bagfile? Where did you get it from?

mgruhler gravatar image mgruhler  ( 2018-04-12 08:45:48 -0500 )edit

@mig, this is a continuation of #q288319.

gvdhoorn gravatar image gvdhoorn  ( 2018-04-12 08:47:25 -0500 )edit

@mighere @ gvdhoorn thanks

aks gravatar image aks  ( 2018-04-12 08:49:29 -0500 )edit

@gvdhoorn thanks.

I would ask the person you got this from. This seems to be very specific. As long as you cannot say where this rosbag is from or what how it has been created, I guess you cannot receive more help.

Neither sim_l3_msg nor kouliang can be found, so this seems not open sourced.

mgruhler gravatar image mgruhler  ( 2018-04-12 09:14:50 -0500 )edit