IntelRealSense / librealsense

Intel® RealSense™ SDK
https://www.intelrealsense.com/
Apache License 2.0
7.55k stars 4.81k forks source link

.bag file convert to csv file #10235

Closed LeeChangwon-AT-SCH closed 2 years ago

LeeChangwon-AT-SCH commented 2 years ago

Required Info
Camera Model D455
Firmware Version 4.9.253-tegra
Operating System & Version Linux (Ubuntu 18)
Kernel Version (Linux Only) 18.04
Platform NVIDIA Jetson (Nano)
SDK Version SDK-2.50.0
Language Python
Segment Robot

Issue Description

Hello, everyone. I entered rs-convert command but problem called segmentaion fault (core doped) occurs when converting the bag file into a csv file. Can you tell me the reason and solution? image

MartyG-RealSense commented 2 years ago

Hi @LeeChangwon-remote As you have defined a filename for the bag but not a path to the file, have you placed your bag file in the same folder that rs-convert is launched from so that rs-convert can find the bag file?

If the librealsense SDK was installed on Linux with the pre-made versions of tools and examples included then I would recommend launching the pre-built version of rs-convert from the usr/local/bin folder where launchable binaries of SDK examples are placed during SDK installation, and putting your bag file in the same folder as rs-convert.

LeeChangwon-AT-SCH commented 2 years ago

Thank you for your quick response. @MartyG-RealSense . image As you can see, there's a bag file where you run rs-convert. but it still not work.

MartyG-RealSense commented 2 years ago

My reason for suggesting changing to the usr/local/bin file and putting the bag there, instead of being in python/examples like the image above, was that inputting the rs-convert command could be causing the pre-built version of the program in usr/local/bin to run, but it looks for your bag file in the usr/local/bin folder and can't find it because the bag is in python/examples.

A path to the bag file should be included in your conversion instruction in order for rs-convert to find it if the bag is not in the same directory that the program is launching from.

LeeChangwon-AT-SCH commented 2 years ago

I misunderstood what you said. I moved the bag file to /usr/local/bing and performed it, but there is still a segmentation fault error without a separate error message. I looked for other issues with GitHub, but most of them are rsusb backend issues, but I still can't find a solution because they put options on the first installation. image

MartyG-RealSense commented 2 years ago

A small number of RealSense users have reported problems with bag to csv conversion in the past when using rs-convert, whilst bag to PNG image extraction worked for them. Examples of this problem can be found at https://github.com/IntelRealSense/librealsense/issues/6221 and also the link below.

https://support.intelrealsense.com/hc/en-us/community/posts/360042055394/comments/360011063953

Similarly, problems with bag to ply conversion have been reported, like in https://github.com/IntelRealSense/librealsense/issues/4171#issuecomment-631293971

If csv or ply conversion issues occur in rs-convert then there is not a known fix for it, unfortunately. If your main goal is to achieve a csv file and the bag recording is not important to you then the rs-capture tool can dump depth and color frames to csv, as described at https://github.com/IntelRealSense/librealsense/issues/1485#issuecomment-380157114

For RealSense users who want to extract image files instead of csv or ply, there is an alternative extractor to rs-convert that was created by a RealSense user that is called rs_bag2image

https://github.com/UnaNancyOwen/rs_bag2image

LeeChangwon-AT-SCH commented 2 years ago

It's a pity that there's no clear cause and solution.

So I performed a code that converts another bag file into a csv file, but I'm not sure which part represents the data. Can you tell me what each topic means in the bag file?

image

MartyG-RealSense commented 2 years ago

The depth data would be in the /device_0/sensor_0/Depth_0/image/data topic.

I cannot find descriptions for the other highlighted topics, unfortunately.

LeeChangwon-AT-SCH commented 2 years ago

Okay, Thank you