This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import rospy | |
import rosbag | |
inpath = '/path/to/original/bag.bag' | |
outpath = '/path/to/output/bag.bag' | |
trigger = lambda topic, msg, _: topic == '/tf' and msg.transforms[0].header.frame_id == '/world' | |
inbag = rosbag.Bag(inpath) | |
tf_static_messages = list(inbag.read_messages(('/tf_static'))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# inspired from https://yodahuang.github.io/articles/How-to-let-ROS-play-happily-with-fish/ | |
# added detection of catkin workspaces generated with catkin-tools | |
# added workaround for numeric issues with ROS melodic when the locale is not English https://github.com/ros-visualization/rviz/issues/1249#issuecomment-403351217 | |
# added workaround for Rviz displaying in only a portion of the screen https://github.com/ros-visualization/rviz/issues/1203#issuecomment-438213723 | |
function catkinSource --on-variable PWD | |
status --is-command-substitution; and return | |
if test -e ".catkin_workspace" -o -d ".catkin_tools" | |
bass source devel/setup.bash |