rsasaki0109 / lidarslam_ros2

ROS 2 package of 3D lidar slam using ndt/gicp registration and pose-optimization
BSD 2-Clause "Simplified" License
525 stars 122 forks source link

cannot load .bag file #18

Closed CAKGOD closed 4 years ago

CAKGOD commented 4 years ago

Required Info:

Steps to reproduce issue

(1) I build this framework following the tutorial in the README.md. (2) I tried running the demo and the problem occured.

Problem Description

The input dataset provided by the demo is in the .bag file format, but ros2 only provides access to the .sqlite3 file format. Even if the rosbag2 plugin is installed, the .sqlite file still cannot be read. Framework testing cannot continue. I am very interested in how you read the .bag file in ros2. Can you provide the system version and ros version, or other solutions? Thanks~

rsasaki0109 commented 4 years ago

The data in the demo was recorded in ros1. To play a rosbag of ros1 on ros2, you need to install not only ros2 but also ros1. For ubuntu 20.04, the ros1 you are installing is ros noetic.

Next, you need to install not only rosbag2 but also rosbag2_bag_v2. https://github.com/ros2/rosbag2_bag_v2

sudo apt install -y ros-foxy-rosbag2-bag-v2-plugins

See README.md in rosbag2_bag_v2 for details.

CAKGOD commented 4 years ago

@rsasaki0109 Thank you very much for your help. I finally solved the problem. Both ros1 and ros2 need to be installed. In addition, the ROS 1 installation must be sourced before sourcing the ROS 2 installation to make the plugin work. The $ros2 bag info -s rosbag_v2 and the $ros2 bag play -s rosbag_v2 can be used. But the $ros2 bag record -s rosbag_v2 does not work. Thanks again~

vico1999-ros commented 11 months ago

Is there any bag can be played on ros2 directly. both versions of ROS installed on same computer is seem not wise. finded another data source is more easier

rsasaki0109 commented 10 months ago

@vico1999-ros I don't have a 3D LiDAR, so I can't prepare a ROS 2 rosbag on my own for sample. You can use rosbags to convert ROS1 rosbags to ROS2 rosbags without installing ROS1. I will update the readme.md later.

Er-Ding commented 3 months ago

After I convert .rosbag to .db3 format file and then run the program, I found that the topic /velodyne_points always has message lost problem.How can I solve this problem? Ubuntu version: 24.04 ROS version: Jazzy

rsasaki0109 commented 3 months ago

How does the message look when it is converted? If there are no error outputs, it might be better to ask the author of rosbags.

Er-Ding commented 3 months ago

When I converted it, the information like fig1.Although the "bag size" showed 0B, but when I check this file's propertise,it's 2.4G When I play this data and run "ros2 topic echo /velodyne_points ",the result like fig2

fig1: fig2:

朱军 @.***

Original Email

From:"Ryohei Sasaki"< @.*** >;

Sent Time:2024/7/9 17:09

To:"rsasaki0109/lidarslam_ros2"< @.*** >;

Cc recipient:"Er-Ding"< @. >;"Comment"< @. >;

Subject:Re: [rsasaki0109/lidarslam_ros2] cannot load .bag file (#18)

How does the message look when it is converted?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

rsasaki0109 commented 3 months ago

The image is not displayed.

Er-Ding commented 3 months ago

The image is not displayed. fig1 22 fig2: 11

rsasaki0109 commented 2 months ago

This is an issue I've never seen before. It might be specific to ROS2 Jazzy.

rsasaki0109 commented 2 months ago

The bag size is 0B, so it seems like the conversion didn't go well. It might be worth trying to convert it again.