Code Monkey home page Code Monkey logo

mpu9255's Introduction

ROS MPU9255 Node

c++ ROS node wrapper for the mpu9255 gyroscope / accelerometer/magnetometer.
Reads accelerometer, gyroscopic and magnetic data in 3D giving 9 Degrees of Freedom.
Publishes sensor_msgs::IMU to /imu/data_raw topic(angular_velocity and linear_acceleration).
Publishes sensor_msgs::MagneticField to /imu/data_raw topic(angular_velocity and linear_acceleration).
Supported interface : I2C.
used in Raspberry PI 3.\

Installation

First install WiringPI:

cd
git clone git://git.drogon.net/wiringPi
cd ~/wiringPi
./build

Then clone this repository into your ROS workspace(src folder):

git clone https://github.com/mdleiton/MPU9255.git

Compile it:

catkin_make
g++ offsetIMU.cpp -lwiringPi -o offsetIMU

Run a node:

./offsetIMU ofssetData.txt
source devel/setup.bash
rosrun MPU9255 MPU9255_node

Review the published data with:

rostopic echo /imu/data_raw
rostopic echo /imu/mag

Complementary filter

install imu-tools:

sudo apt-get install ros-kinetic-imu-tools

run launch file:

source devel/setup.bash
roslaunch MPU9255 imu.launch

reference: http://wiki.ros.org/imu_complementary_filter

Create a rosbag file (.bag)

run launch file:

source devel/setup.bash
roslaunch MPU9255 record_topic.launch

Get data from the topics of the .bag file:

rostopic echo -b file.bag -p /topic

Visualize Rviz:

source devel/setup.bash
roslaunch MPU9255 record_topic.launch
rviz 				# other terminal

Configure as FIG.1 or load config file in (rviz_config/imu.rviz)

Alt text

GIF: Alt text

More information about published topics:

http://docs.ros.org/api/sensor_msgs/html/msg/Imu.html
http://docs.ros.org/jade/api/sensor_msgs/html/msg/MagneticField.html

mpu9255's People

Contributors

mdleiton avatar eborghi10 avatar

Watchers

James Cloos 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.