Coder Social home page Coder Social logo

rosbag_fixer's Introduction

rosbag_fixer

Quick tool to try and work around Message Headers missing dependency information.

Usage

usage: fix_bag_msg_def.py [-h] [-v] [-l] [-c CALLERID] [-m MAPPINGS]
                          inbag outbag

positional arguments:
  inbag                 Input bagfile
  outbag                Output bagfile

optional arguments:
  -h, --help            show this help message and exit
  -v, --verbose         Be verbose
  -l, --use-local-defs  Use message defs from local system (as opposed to
                        reading them from the provided mappings)
  -c CALLERID, --callerid CALLERID
                        Callerid (ie: publisher)
  -m MAPPINGS, --map MAPPINGS
                        Mapping topic type -> good msg def (multiple allowed)

Example

All caller ids

Replace all message definitions for all caller ids:

fix_bag_msg_def.py --use-local-defs /path/to/input.bag /path/to/output.bag

Note that definitions are only replaced when needed.

Specific caller id

Replace all message definitions for connections with caller id my_publisher:

fix_bag_msg_def.py --use-local-defs -c '/my_publisher' /path/to/input.bag /path/to/output.bag

Note: caller ids are not necessarily equal to node or topic names.

rosbag_fixer's People

Contributors

gavanderhoorn avatar wxmerkt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

rosbag_fixer's Issues

Bags broken after 'fixing'

Not sure what is going on yet, but after running the script on a bag, rosbag doesn't seem to recognise the connection headers in the output bag any longer, leading to "empty" bags (even though all data is still visible when manually inspecting the bag, and the file size is also roughly equal to what is was before the fixer was run).

rostopic echo can't convert the bag file after rosbag_fixer

Firstly, thanks very much for your work for this rosbag issue.

I use this script to convert a bag file about topic /iiwa/state/JointPositionVelocity from rosjava with iiwa_stack

fix_bag_msg_def.py --use-local-defs test.bag output.bag

Then

# reindex output bag file
rosbag reindex output.bag

# extract topic information to csv file from bag file
rostopic echo -b output.bag -p /iiwa/state/JointPositionVelocity > joint_pos_vel.txt

But the output file joint_pos_vel.txt is empty!

Any help will be appreciated!

The attachment is my bag file, it can be rename to test.bag directly.
test.bag.txt

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.