Giter VIP home page Giter VIP logo

matlab_rosbag's Introduction

Overview

matlab_rosbag is a library for reading ROS bags in Matlab. It uses the C++ ROS API to read stored messages and lets get meta-data about the bag (e.g., topic info and message definitions similar to rosmsg show and rosbag info). The library also contains methods for working with TF messages. ROS does not not need to be installed on a machine to use this library.

You can download the compiled code for Mac and Linux from github:

https://github.com/bcharrow/matlab_rosbag/releases

If you want to compile things yourself see COMPILING.md. WARNING: This library won't work at all if your machine is big-endian.

Usage

Download the library and add the base directory to your Matlab path (i.e., add the directory that contains +ros and rosbag_wrapper). You should now be able to access ros.Bag, a Matlab class which can read ROS messages on topics from a bag and return them as structs. Multiple messages are returned as cell arrays. To get an idea of how the code works go to the example directory and look at bag_example.m and tf_example.m

The fields in the structs are guaranteed to be in the same order as they are in the message definition. There are also some utilities for converting messages from structs to matrices.

NOTE: Prior to version 1.2, bags do not store message definitions. As such, matlab_rosbag won't be able to do anything with these old bags. Don't worry about this if you've been using a not terribly old version of ROS (i.e., C turtle and later).

Ubuntu later than 10.04

Matlab ships with an old version of the C++ standard library that you'll need to get rid of. To do this, follow these steps from the command line:

cd /usr/local/MATLAB/<version>/sys/os/<system>
mkdir backup
mv libstdc++* backup

With some versions of Ubuntu and Matlab, the libstdc++ libraries may be located elsewhere (e.g., /usr/local/MATLAB/bin). The same steps should fix the problem.

License

matlab_rosbag is licensed under the BSD license.

matlab_rosbag's People

Contributors

bcharrow avatar philipdames avatar

Watchers

 avatar

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.