Show EOL distros: 

Package Summary

The remote_rosbag_record package

Package Summary

The remote_rosbag_record package

Usage

[Step 1]

Launch recorder nodes with your favourite nodes. Use respawn options to record multiple times.

   1 <launch>
   2 
   3   <group ns="console">
   4     <include file="console.machine"/>
   5 
   6     ... other console nodes ...
   7     
   8     <node name="console-record" pkg="remote_rosbag_record" type="record" respawn="true">
   9       <rosparam file="console_topics.yml"/>
  10       <param name="prefix" value="console"/>
  11       <param name="apped_date" value="true"/>
  12     </node>
  13   </group>
  14 
  15   <group ns="robot">
  16     <include file="robot.machine"/>
  17 
  18     ... other robot nodes ....
  19 
  20     <node name="robot-record" pkg="remote_rosbag_record" type="record" respawn="true">
  21       <rosparam file="robot_topics.yml"/>
  22       <param name="prefix" value="robot"/>
  23       <param name="apped_date" value="true"/>
  24     </node>
  25   </group>
  26   
  27 </launch>

# xxx_topics.yml may look like this
topics:
- /joint_states
- /imu
- ...

[Step 2]

Start rosbag-record at your own timing

  • method 1: use remote_rosbag_record/trigger node

rosrun remote_rosbag_record trigger _regex:="/.*/start"
  • method 2: use remote_rosbag_record/joy_listener node

rosrun remote_rosbag_record joy_listener _start_regex:="/.*/start" _start_button:=10 ...
  • method 3: call trigger services from your teleoperation node

#include<remote_rosbag_record/call.hpp>

#include<boost/regex.hpp>

...

if (start_button_pressed) {
  remote_rosbag_record::call(boost::regex("/.*/start"));
}

[Step 3]

Stop rosbag-record (similar to the previous step)

Nodes

record

starts/stops rosbag-record when a corresponding service is called

Services

start (std_srvs/Empty)
  • start rosbag-record
stop (std_srvs/Empty)
  • stop rosbag-record

Parameters

~record_all (bool) ~regex (bool)
  • equivalent of --regex
~quiet (bool)
  • equivalent of --quiet
~append_date (bool)
  • equivalent of --output-prefix with an empty prefix. To set prefix string, use ~prefix parameter.
~verbose (bool)
  • verbose console output
~compression (string)
  • "bz2" to use BZ2 compression (equivalent of --bz2), "lz4" to use LZ4 compression, or "uncompressed"
~prefix (string)
  • filename prefix
~name (string)
  • equivalent of --output-name ignored for now. Use ~prefix with false of ~append_date.
~topics (string array)
  • topics to be recorded
~buffer_size (int)
  • equivalent of --buffersize
~exclude_regex (string)
  • equivalent of --exclude
~node (string)
  • equivalent of --node

trigger

calls multiple start/stop services at once

Parameters

~regex (string)
  • regular expression which matches services you want to call

joy_listener

subscribes joystick messages and calls start/stop services when a specified button is pressed

Subscribed Topics

joy (sensor_msgs/Joy)
  • joystick input

Parameters

~start_button (int, default: 12)
  • button id to trigger start services
~start_regex (string, default: <node's namespace>/start)
  • regular expression which matches start services
~stop_button (int, default: 11)
  • button id to trigger stop services
~stop_regex (string, default: <node's namespace>/stop)
  • regular expression which matches stop services
~verbose (bool, default: true)
  • verbose console output when calling a service

Wiki: remote_rosbag_record (last edited 2020-09-25 20:08:27 by Yoshito Okada)