Skip to content

Instantly share code, notes, and snippets.

@linknum23
Last active March 6, 2018 19:18
Show Gist options
  • Save linknum23/7350a48b1f0d1d25e2589d758b04cde3 to your computer and use it in GitHub Desktop.
Save linknum23/7350a48b1f0d1d25e2589d758b04cde3 to your computer and use it in GitHub Desktop.
Launching 1KHz bagfile playback
<?xml version="1.0"?>
<launch>
<arg name="play_bag" default="true"/>
<arg name="uut" default="my_node"/>
<param name="use_sim_time" value="true"/>
<arg name="bag_file" value="$(env HOME)/.ros/my_bag.bag"/>
<node pkg="my_pkg" type="$(param uut)" name="$(param uut)_node" output="screen"/>
<!-- NOTE: standard rosbag published clock rate of 100Hz, was too slow for my ros timer callbacks -->
<!-- Produce a clock, using the bagfile, at 1KHz to make timer callbacks up to a KHz work! -->
<node pkg="rosbag" type="play" name="player" args="$(arg bag_file) --clock --hz=1000" output="screen" if="$(arg play_bag)"/>
</launch>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment