Skip to content

Commit

Permalink
feat: add autoware_rosbag_recorder packages (autowarefoundation#98)
Browse files Browse the repository at this point in the history
* 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 (autowarefoundation#1242)

* Port autoware rosbag recorder to ros2 (autowarefoundation#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 (autowarefoundation#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 (autowarefoundation#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 (autowarefoundation#500)

Signed-off-by: Kenji Miyake <kenji.miyake@tier4.jp>

* remove COLCON_IGNORE (autowarefoundation#510)

Co-authored-by: Takayuki Murooka <takayuki.murooka@tier4.jp>

* Auto/add readme common pkg (autowarefoundation#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>
  • Loading branch information
8 people committed Dec 6, 2021
1 parent 94904a5 commit a200fa4
Show file tree
Hide file tree
Showing 5 changed files with 80 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@ repos:
- id: prettier-package-xml
- id: sort-package-xml

- repo: https://github.com/gruntwork-io/pre-commit
rev: v0.1.17
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.8.0.1
hooks:
- id: shellcheck

- repo: https://github.com/scop/pre-commit-shfmt
rev: v3.4.1-1
hooks:
- id: shfmt-docker
- id: shfmt

- repo: https://github.com/pycqa/isort
rev: 5.10.1
Expand Down
17 changes: 17 additions & 0 deletions common/autoware_rosbag_recorder/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
cmake_minimum_required(VERSION 3.5)
project(autoware_rosbag_recorder)

find_package(ament_cmake_auto REQUIRED)
ament_auto_find_build_dependencies()

if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)
ament_lint_auto_find_test_dependencies()
endif()

ament_auto_package()

install(PROGRAMS
scripts/record.sh
DESTINATION lib/${PROJECT_NAME}
)
21 changes: 21 additions & 0 deletions common/autoware_rosbag_recorder/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Autoware Rosbag Recorder

This package is to record ros2 bag with desired topic.

## Usage

Here is a usage below.

```sh
ros2 run autoware_rosbag_recorder record.sh [-o filename]
```

If you want some other topics to record, you need to modify below in record.sh as an example.

```sh
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";
```

## Assumptions / Known limits

Recording all topics in autoware is very heavy so usually you need to avoid points cloud topics to record.
18 changes: 18 additions & 0 deletions common/autoware_rosbag_recorder/package.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0"?>
<package format="3">
<name>autoware_rosbag_recorder</name>
<version>0.1.0</version>
<description>The autoware_rosbag_recorder package</description>

<maintainer email="yukihiro.saito@tier4.jp">Yukihiro Saito</maintainer>
<license>Apache License 2.0</license>

<buildtool_depend>ament_cmake_auto</buildtool_depend>

<test_depend>ament_lint_auto</test_depend>
<test_depend>autoware_lint_common</test_depend>

<export>
<build_type>ament_cmake</build_type>
</export>
</package>
21 changes: 21 additions & 0 deletions common/autoware_rosbag_recorder/scripts/record.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/bin/sh

usage_exit() {
echo "Usage: ros2 run autoware_rosbag_recorder record.sh [-o filename]" 1>&2
exit 1
}

while getopts o:h OPT; do
case $OPT in
"o") echo "record as $OPTARG" ;;
"h") usage_exit ;;
"*") usage_exit ;;
\?) usage_exit ;;
esac
done

if [ -n "$OPTARG" ]; then
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"
else
usage_exit
fi

0 comments on commit a200fa4

Please sign in to comment.