0
0

dockerを使って.activeなrosbagを一気にreindexする

Posted at

.activeになったrosbag、手動でreindexは面倒

  • .activeなrosbagをactiveじゃないファイル名にする
  • rosbag reindexする
  • 使っているROSはnoetic
  • Host OSはubuntu 20.04ではないのでdockerを使いたい
  • .orig.bagもいらないので消したい

以下のワンライナーで一撃

for i in $(ls *.active); do BAG=$(echo $i | sed s/.active//) ; echo $BAG ; mv $i $BAG  ;docker run --rm -v $PWD:/rosbag --workdir /rosbag ros:noetic-ros-base  rosbag reindex $BAG ; sudo rm *.orig.bag; sudo chown $USER:$USER $BAG ; done
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0