Giter VIP home page Giter VIP logo

razor_imu_9dof's Introduction

Official ROS Documentation

A much more extensive and standard ROS-style version of this documentation can be found on the ROS wiki at:

http://wiki.ros.org/razor_imu_9dof

Install and Configure ROS Package

  1. Install dependencies:

    $ sudo apt-get install python-visual

  2. Download code:

    $ cd ~/catkin_workspace/src $ git clone https://github.com/KristofRobot/razor_imu_9dof.git $ cd .. $ catkin_make

Install Arduino firmware

  1. Open src/Razor_AHRS/Razor_AHRS.ino in Arduino IDE. Note: this is a modified version of Peter Bartz' original Arduino code (see https://github.com/ptrbrtz/razor-9dof-ahrs). Use this version - it emits linear acceleration and angular velocity data required by the ROS Imu message

  2. Select your hardware here by uncommenting the right line in src/Razor_AHRS/Razor_AHRS.ino, e.g.

// HARDWARE OPTIONS
/*****************************************************************/
// Select your hardware here by uncommenting one line!
//#define HW__VERSION_CODE 10125 // SparkFun "9DOF Razor IMU" version "SEN-10125" (HMC5843 magnetometer)
//#define HW__VERSION_CODE 10736 // SparkFun "9DOF Razor IMU" version "SEN-10736" (HMC5883L magnetometer)
//#define HW__VERSION_CODE 10183 // SparkFun "9DOF Sensor Stick" version "SEN-10183" (HMC5843 magnetometer)
//#define HW__VERSION_CODE 10321 // SparkFun "9DOF Sensor Stick" version "SEN-10321" (HMC5843 magnetometer)
#define HW__VERSION_CODE 10724 // SparkFun "9DOF Sensor Stick" version "SEN-10724" (HMC5883L magnetometer)
  1. Upload Arduino sketch to the Sparkfun 9DOF Razor IMU board

Configure

In its default configuration, razor_imu_9dof expects a yaml config file my_razor.yaml with:

  • USB port to use
  • Calibration parameters

An examplerazor.yaml file is provided. Copy that file to my_razor.yaml as follows:

$ roscd razor_imu_9dof/config
$ cp razor.yaml my_razor.yaml

Then, edit my_razor.yaml as needed

Launch

Publisher and 3D visualization:

$ roslaunch razor_imu_9dof razor-pub-and-display.launch

Publisher only:

$ roslaunch razor_imu_9dof razor-pub.launch

Publisher only with diagnostics:

$ roslaunch razor_imu_9dof razor-pub-diags.launch

3D visualization only:

$ roslaunch razor_imu_9dof razor-display.launch

Calibrate

For best accuracy, follow the tutorial to calibrate the sensors:

http://wiki.ros.org/razor_imu_9dof

A copy of Peter Bartz's magnetometer calibration scripts from https://github.com/ptrbrtz/razor-9dof-ahrs is provided in the magnetometer_calibration directory.

Update my_razor.yaml with the new calibration parameters.

Dynamic Reconfigure

After having launched the publisher with one of the launch commands listed above, it is possible to dynamically reconfigure the yaw calibration.

  1. Run:

    $ rosrun rqt_reconfigure rqt_reconfigure

  2. Select imu_node.

  3. Change the slider to move the calibration +/- 10 degrees. If you are running the 3D visualization you'll see the display jump when the new calibration takes effect.

The intent of this feature is to let you tune the alignment of the AHRS to the direction of the robot driving direction, so that if you can determine that, for example, the AHRS reads 30 degrees when the robot is actually going at 35 degrees as shown by e.g. GPS, you can tune the calibration to make it read 35. It's the compass-equivalent of bore-sighting a camera.

razor_imu_9dof's People

Contributors

dkoguciuk avatar garethellis0 avatar kristofrobot avatar paulbouchier avatar robotictang avatar robyncastro avatar valrat avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  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.