Skip to content

Commit 9e08636

Browse files
committed
fix rosbags import for version 0.11
1 parent 462ce90 commit 9e08636

File tree

5 files changed

+15
-7
lines changed

5 files changed

+15
-7
lines changed

python/pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "vbr-devkit"
7-
version = "0.1.0"
7+
version = "0.2.0"
88
description = "Development kit for VBR SLAM dataset"
99
readme = "README.md"
1010
authors = [
@@ -26,7 +26,7 @@ dependencies = [
2626
"numpy",
2727
"rich",
2828
"typer[all]>=0.10.0",
29-
"rosbags",
29+
"rosbags==0.11.0",
3030
"rosbags.image"
3131
]
3232

python/vbr_devkit/tools/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
from typing import Any, Union
22

3-
from rosbags.typesys.types import (
3+
from rosbags.typesys.stores.ros1_noetic import (
44
sensor_msgs__msg__Imu,
55
sensor_msgs__msg__Image,
66
sensor_msgs__msg__PointCloud2
77
)
8+
89
from vbr_devkit.tools.image import Image
910
from vbr_devkit.tools.imu import Imu
1011
from vbr_devkit.tools.point_cloud2 import PointCloudXf

python/vbr_devkit/tools/image.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
try:
2-
from rosbags.typesys.types import sensor_msgs__msg__Image
2+
from rosbags.typesys.stores.ros1_noetic import (
3+
sensor_msgs__msg__Image
4+
)
35
except ImportError as e:
46
raise ImportError('rosbags library not installed, run "pip install -U rosbags"') from e
57

python/vbr_devkit/tools/imu.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import numpy as np
22

33
try:
4-
from rosbags.typesys.types import sensor_msgs__msg__Imu
4+
from rosbags.typesys.stores.ros1_noetic import (
5+
sensor_msgs__msg__Imu
6+
)
57
except ImportError as e:
68
raise ImportError('rosbags library not installed, run "pip install -U rosbags"') from e
79

python/vbr_devkit/tools/point_cloud2.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@
44
import numpy as np
55

66
try:
7-
from rosbags.typesys.types import sensor_msgs__msg__PointCloud2 as PointCloud2
8-
from rosbags.typesys.types import sensor_msgs__msg__PointField as PointField
7+
from rosbags.typesys.stores.ros1_noetic import (
8+
sensor_msgs__msg__PointCloud2 as PointCloud2,
9+
sensor_msgs__msg__PointField as PointField,
10+
)
11+
912
except ImportError as e:
1013
raise ImportError('rosbags library not installed, run "pip install -U rosbags"') from e
1114

0 commit comments

Comments
 (0)