Wiki

  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.

Toggle line numbers
   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

rosrun remote_rosbag_record trigger _regex:="/.*/start"

rosrun remote_rosbag_record joy_listener _start_regex:="/.*/start" _start_button:=10 ...

#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) stop (std_srvs/Empty)

Parameters

~record_all (bool) ~regex (bool) ~quiet (bool) ~append_date (bool) ~verbose (bool) ~compression (string) ~prefix (string) ~name (string) ~topics (string array) ~buffer_size (int) ~exclude_regex (string) ~node (string)

trigger

calls multiple start/stop services at once

Parameters

~regex (string)

joy_listener

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

Subscribed Topics

joy (sensor_msgs/Joy)

Parameters

~start_button (int, default: 12) ~start_regex (string, default: <node's namespace>/start) ~stop_button (int, default: 11) ~stop_regex (string, default: <node's namespace>/stop) ~verbose (bool, default: true)

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