Skip to content

Instantly share code, notes, and snippets.

@sgarciav
Last active July 2, 2018 23:24
Show Gist options
  • Save sgarciav/39ab2ff2e28a6576025aa9a142c49544 to your computer and use it in GitHub Desktop.
Save sgarciav/39ab2ff2e28a6576025aa9a142c49544 to your computer and use it in GitHub Desktop.
ROS launch file for extratcting images from a bag file.
<launch>
<arg name="IMAGE_TOPIC" default="/camera/image_raw"/>
<arg name="FILENAME" default="test.bag"/>
<arg name="SAVE_PATH" default="ROS_HOME"/>
<arg name="FPS" default="10.0"/>
<node pkg="rosbag" type="play" name="rosbag" required="true" args="$(arg FILENAME)"/>
<node name="extract" pkg="image_view" type="extract_images" respawn="false" required="true" output="screen" cwd="$(arg SAVE_PATH)">
<remap from="image" to="$(arg IMAGE_TOPIC)"/>
<param name="sec_per_frame" value="$(eval (1/arg('FPS')))"/>
</node>
</launch>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment