rosbag录制相关参数说明

rosbag/Commandline - ROS Wiki

  • record <topic-names>

    • Record a bag file with the contents of the specified topics.
      $ rosbag record rosout tf cmd_vel

    -h, --help

    • Show the usage and exit.
      $ rosbag record -h

    -a, --all

    • Record all topics.
      $ rosbag record -a

      Note that newly published topics are discovered by periodically polling the master. rosbag record -a will likely miss initial messages published on any topic.

    -e, --regex

    • Match topics using regular expressions.
      $ rosbag record -e "/(.*)_stereo/(left|right)/image_rect_color"

      Record all topics that contain sensors in their name:

      $ rosbag record -e "(.*)sensors(.*)"

    -p, --publish New in ROS Melodic

    • Publish a message when the record begin to write a new bag (topic = "begin_write").

      $ rosbag record -p

    -x EXCLUDE_REGEX, --exclude=EXCLUDE=REGEX

    • Exclude topics matching the given regular expression (subtracts from -a or -e).

      $ rosbag record -e "/wide_stereo(.*)" -x "(.*)/points(.*)"

    -q, --quiet

    • Suppress console output.
      $ rosbag record -q /chatter

    -d, --duration

    • Specify the maximum duration of the recorded bag file.
      $ rosbag record --duration=30 /chatter
      $ rosbag record --duration=5m /chatter
      $ rosbag record --duration=2h /chatter

    -o PREFIX, --output-prefix=PREFIX

    • Prepend PREFIX to beginning of bag name before date stamp.
      $ rosbag record -o session1 /chatter

    -O NAME, --output-name=NAME

    • Record to bag with name NAME.bag.
      $ rosbag record -O session2_090210.bag /chatter

    --split

    • Split the bag when maximum size or duration is reached
      $ rosbag record --split --size=1024 /chatter
      $ rosbag record --split --duration=30 /chatter
      $ rosbag record --split --duration=5m /chatter
      $ rosbag record --split --duration=2h /chatter

    --max-splits=MAX_SPLITS New in ROS Kinetic

    • Split bag at most MAX_SPLITS times, then begin deleting the oldest files. This creates a fixed size or duration recording.
      $ rosbag record --split --size 1024 --max-splits 3 /chatter
      $ rosbag record --split --duration 10m --max-splits 6 /chatter

    -b SIZE, --buffsize=SIZE

    • Use an internal buffer of SIZE MB (Default: 256, 0 = infinite). This is the message queue of the recorder object, before messages are being passed on to the bag. Lowering this value might result in messages being dropped before they reach the recording process.

      $ rosbag record -b 1024 /chatter

    --chunksize=SIZE

    • Advanced. Record to chunks of SIZE KB (Default: 768). This is a buffer within the bag file object. Lowering this value will result in more writes to disk.

      $ rosbag record --chunksize=1024 /chatter

    -l NUM, --limit=NUM

    • Only record NUM messages on each topic.
      $ rosbag record -l 1000 /chatter

    --node=NODE

    • Record all topics subscribed to by a specific node
      $ rosbag record --node=/joy_teleop

    -j, --bz2

    • Use BZ2 compression. See compress for details.

      $ rosbag record -j /chatter
  • --lz4

    • Use LZ4 compression. See compress for details.

      $ rosbag record --lz4 /chatter

-tcpnodelay

  • Use the TCP_NODELAY transport hint when subscribing to topics

--udp

  • 2
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值