Skip to content

Commit a200fa4

Browse files
tkimura4mitsudome-rkmiyawep21kenji-miyake
authored
feat: add autoware_rosbag_recorder packages (#98)
* release v0.4.0 * remove ROS1 packages temporarily Signed-off-by: mitsudome-r <ryohsuke.mitsudome@tier4.jp> * add sample ros2 packages Signed-off-by: mitsudome-r <ryohsuke.mitsudome@tier4.jp> * remove ROS1 packages Signed-off-by: mitsudome-r <ryohsuke.mitsudome@tier4.jp> * Revert "remove ROS1 packages temporarily" This reverts commit ac428d4af68ef0b51992d31f692dd9aae9a4a944. Signed-off-by: mitsudome-r <ryohsuke.mitsudome@tier4.jp> * add COLCON_IGNORE to ros1 packages Signed-off-by: mitsudome-r <ryohsuke.mitsudome@tier4.jp> * Unify Apache-2.0 license name (#1242) * Port autoware rosbag recorder to ros2 (#1569) * Port autoware rosbag recorder to ros2 Signed-off-by: wep21 <border_goldenmarket@yahoo.co.jp> * Update record.sh Co-authored-by: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com> * Add shellcheck (#2079) * Add shellcheck Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Fix shellcheck Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Change formatter to clang-format and black (#2332) * Revert "Temporarily comment out pre-commit hooks" This reverts commit 748e9cdb145ce12f8b520bcbd97f5ff899fc28a3. * Replace ament_lint_common with autoware_lint_common Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Remove ament_cmake_uncrustify and ament_clang_format Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Apply Black Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Apply clang-format Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Fix build errors Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Fix for cpplint * Fix include double quotes to angle brackets Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Apply clang-format Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Fix build errors Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * Add COLCON_IGNORE (#500) Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp> * remove COLCON_IGNORE (#510) Co-authored-by: Takayuki Murooka <takayuki.murooka@tier4.jp> * Auto/add readme common pkg (#567) * add description to global paraemeter loader * add readme to rosbag recorde * fix typo Co-authored-by: Kazuki Miyahara <kmiya@outlook.com> * Fix Format Co-authored-by: Kazuki Miyahara <kmiya@outlook.com> * Clarify the description Co-authored-by: Kazuki Miyahara <kmiya@outlook.com> * Fix Typo Co-authored-by: tkimura4 <tomoya.kimura@tier4.jp> * proper description Co-authored-by: Kazuki Miyahara <kmiya@outlook.com> Co-authored-by: tkimura4 <tomoya.kimura@tier4.jp> * fix topic name * fix topic name Co-authored-by: mitsudome-r <ryohsuke.mitsudome@tier4.jp> Co-authored-by: Kazuki Miyahara <kmiya@outlook.com> Co-authored-by: Daisuke Nishimatsu <42202095+wep21@users.noreply.github.com> Co-authored-by: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com> Co-authored-by: Takayuki Murooka <takayuki5168@gmail.com> Co-authored-by: Takayuki Murooka <takayuki.murooka@tier4.jp> Co-authored-by: taikitanaka3 <65527974+taikitanaka3@users.noreply.github.com>
1 parent 94904a5 commit a200fa4

File tree

5 files changed

+80
-3
lines changed

5 files changed

+80
-3
lines changed

.pre-commit-config.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@ repos:
3434
- id: prettier-package-xml
3535
- id: sort-package-xml
3636

37-
- repo: https://github.com/gruntwork-io/pre-commit
38-
rev: v0.1.17
37+
- repo: https://github.com/shellcheck-py/shellcheck-py
38+
rev: v0.8.0.1
3939
hooks:
4040
- id: shellcheck
4141

4242
- repo: https://github.com/scop/pre-commit-shfmt
4343
rev: v3.4.1-1
4444
hooks:
45-
- id: shfmt-docker
45+
- id: shfmt
4646

4747
- repo: https://github.com/pycqa/isort
4848
rev: 5.10.1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
cmake_minimum_required(VERSION 3.5)
2+
project(autoware_rosbag_recorder)
3+
4+
find_package(ament_cmake_auto REQUIRED)
5+
ament_auto_find_build_dependencies()
6+
7+
if(BUILD_TESTING)
8+
find_package(ament_lint_auto REQUIRED)
9+
ament_lint_auto_find_test_dependencies()
10+
endif()
11+
12+
ament_auto_package()
13+
14+
install(PROGRAMS
15+
scripts/record.sh
16+
DESTINATION lib/${PROJECT_NAME}
17+
)
+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Autoware Rosbag Recorder
2+
3+
This package is to record ros2 bag with desired topic.
4+
5+
## Usage
6+
7+
Here is a usage below.
8+
9+
```sh
10+
ros2 run autoware_rosbag_recorder record.sh [-o filename]
11+
```
12+
13+
If you want some other topics to record, you need to modify below in record.sh as an example.
14+
15+
```sh
16+
ros2 bag record -e "(.*)/velodyne_packets|/pacmod_interface/(.*)|/pacmod/(.*)|/vehicle/(.*)|/sensing/imu/(.*)|/sensing/gnss/(.*)|/sensing/camera/(.*)/camera_info|/sensing/camera/(.*)/compressed|/perception/object_recognition/detection/rois(.)|/perception/object_recognition/objects" -o "$OPTARG";
17+
```
18+
19+
## Assumptions / Known limits
20+
21+
Recording all topics in autoware is very heavy so usually you need to avoid points cloud topics to record.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<?xml version="1.0"?>
2+
<package format="3">
3+
<name>autoware_rosbag_recorder</name>
4+
<version>0.1.0</version>
5+
<description>The autoware_rosbag_recorder package</description>
6+
7+
<maintainer email="yukihiro.saito@tier4.jp">Yukihiro Saito</maintainer>
8+
<license>Apache License 2.0</license>
9+
10+
<buildtool_depend>ament_cmake_auto</buildtool_depend>
11+
12+
<test_depend>ament_lint_auto</test_depend>
13+
<test_depend>autoware_lint_common</test_depend>
14+
15+
<export>
16+
<build_type>ament_cmake</build_type>
17+
</export>
18+
</package>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/sh
2+
3+
usage_exit() {
4+
echo "Usage: ros2 run autoware_rosbag_recorder record.sh [-o filename]" 1>&2
5+
exit 1
6+
}
7+
8+
while getopts o:h OPT; do
9+
case $OPT in
10+
"o") echo "record as $OPTARG" ;;
11+
"h") usage_exit ;;
12+
"*") usage_exit ;;
13+
\?) usage_exit ;;
14+
esac
15+
done
16+
17+
if [ -n "$OPTARG" ]; then
18+
ros2 bag record -e "(.*)/velodyne_packets|/pacmod_interface/(.*)|/pacmod/(.*)|/vehicle/(.*)|/sensing/imu/(.*)|/sensing/gnss/(.*)|/sensing/camera/(.*)/camera_info|/sensing/camera/(.*)/compressed|/perception/object_recognition/detection/rois(.)|/perception/object_recognition/objects" -o "$OPTARG"
19+
else
20+
usage_exit
21+
fi

0 commit comments

Comments
 (0)