Git Product home page Git Product logo

i2c_imu's People

Contributors

avishorp avatar cyborg-x1 avatar jeskesen avatar mryellow avatar richardbarnett 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  avatar  avatar  avatar  avatar  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  avatar  avatar  avatar

i2c_imu's Issues

Why there is a linear_acceleration in X direction for not moving imu 9250?

I am using mpu9250 by the package /jeskesen/i2c_imu and the launch file is:


<?xml version="1.0"?>
<launch>
    <node pkg="tf" type="static_transform_publisher" name="imu_to_base" 
    args="0 0 0 0 0 0 base_link imu_link 50" /> 
<!--
    <node name="i2c_imu_node" pkg="i2c_imu" type="i2c_imu_node" ns="imu" output="screen">
        <param name="imu_frame" value="imu_link" />
    -->
    <node name="i2c_imu_node" pkg="i2c_imu" type="i2c_imu_node"  output="screen">
        <param name="imu_frame" value="imu_link" />

    <param name="i2c_bus" value="1" />

    <param name="i2c_slave_address" value="104" />
    <!--imu_type:
        0 = Auto discover
        1 = Null (used when data is provided from a remote IMU
        2 = InvenSense MPU-9150
        3 = STM L3GD20H + LSM303D
        4 = STM L3GD20 + LSM303DLHC
        5 = STM LSM9DS0
        6 = STM LSM9DS1
        7 = InvenSense MPU-9250
        8 = STM L3GD20H + LSM303DLHC
        9 = Bosch BMX055
        10 = Bosch BNX055
    -->
    <param name="imu_type" value="7" />

    <!--fusion_type:
        0 = RTFUSION_TYPE_NULL: just a dummy to keep things happy if not needed
        1 = RTFUSION_TYPE_KALMANSTATE4: kalman state is the quaternion pose
        2 = RTFUSION_TYPE_RTQF: RT quaternion fusion
    -->
    <param name="fusion_type" value="2" />

    <!-- mpu9250/gyro_accel_sample_rate: 5 - 1000 Hz --> 
    <param name="mpu9250/gyro_accel_sample_rate" value="80" />

    <!-- mpu9250/compass_sample_rate: 1 - 100 Hz -->
    <param name="mpu9250/compass_sample_rate" value="40" /> 

    <!-- mpu9250/gyro_low_pass_filter:
        0x11 - 8800Hz, 0.64mS delay
        0x10 - 3600Hz, 0.11mS delay
        0x00 - 250Hz, 0.97mS delay
        0x01 - 184Hz, 2.9mS delay
        0x02 - 92Hz, 3.9mS delay
        0x03 - 41Hz, 5.9mS delay
        0x04 - 20Hz, 9.9mS delay
            0x05 - 10Hz, 17.85mS delay
            0x06 - 5Hz, 33.48mS delay
        -->
        <param name="mpu9250/gyro_low_pass_filter" value="3" />

        <!-- mpu9250/accel_low_pass_filter:
            0x00 - 460Hz, 1.94mS delay
            0x01 - 184Hz, 5.80mS delay
            0x02 - 92Hz, 7.80mS delay
            0x03 - 41Hz, 11.80mS delay
            0x04 - 20Hz, 19.80mS delay
            0x05 - 10Hz, 35.70mS delay
            0x06 - 5Hz, 66.96mS delay
        -->
        <param name="mpu9250/accel_low_pass_filter" value="3" />

        <!-- mpu9250/gyro_full_scale_range:
            0 +/- 250 degress per second
            8 +/- 500 degress per second
            16 +/- 1000 degress per second
            24 +/- 2000 degress per second
        -->
        <param name="mpu9250/gyro_full_scale_range" value="16" />

        <!-- mpu9250/accel_full_scale_range:
            0 +/- 2g
            8 +/- 4g
            16 +/- 8g
            24 +/- 16g
        -->
        <param name="mpu9250/accel_full_scale_range" value="16" />
    </node>
</launch>

the imu doesn't move, but the output is:

---
header: 
  seq: 2685
  stamp: 
    secs: 1598377876
    nsecs: 786975020
  frame_id: "imu_link"
orientation: 
  x: 0.0196061972529
  y: -0.100331619382
  z: 0.19570158422
  w: 0.975320518017
orientation_covariance: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
angular_velocity: 
  x: -0.000253986567259
  y: -0.000782979652286
  z: 0.000762287527323
angular_velocity_covariance: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
linear_acceleration: 
  x: 1.93930334473
  y: 0.0191536132812
  z: 9.28710823975
linear_acceleration_covariance: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0]
---

Why there is a linear_acceleration in X direction x=1.9 ?

How to use mpu9250?

Hi, I want to run mpu9250 in banana pi M3,I try to modify the mpu_9150.launch, as follow:

<node name="i2c_imu_node" pkg="i2c_imu" type="i2c_imu_node" ns="imu" output="screen">
		<param name="imu_frame" value="imu_link" />
		
		<param name="i2c_bus" value="2" />
		
		<param name="i2c_slave_address" value="104" />
		<!--imu_type:
			1 = Null: used when data is provided from a remote IMU
			2 = InvenSense MPU-9150
			3 = STM L3GD20H + LSM303D
			4 = STM L3GD20 + LSM303DLHC
			5 = STM LSM9DS0
			6 = InvenSense MPU-9250
		-->
		<param name="imu_type" value="6" />
		
		<!--fusion_type:
			0 = RTFUSION_TYPE_NULL: just a dummy to keep things happy if not needed
			1 = RTFUSION_TYPE_KALMANSTATE4: kalman state is the quaternion pose
			2 = RTFUSION_TYPE_RTQF: RT quaternion fusion
		-->
		<param name="fusion_type" value="2" />
		
		<!-- mpu9250/gyro_accel_sample_rate: 5 - 1000 Hz -->
		<param name="mpu9250/gyro_accel_sample_rate" value="50" />

		<!-- mpu9250/compass_sample_rate: 1 - 100 Hz -->
		<param name="mpu9250/compass_sample_rate" value="30" />	
		
		<!-- mpu9250/accel_full_scale_range:
			0x00: MPU9150_ACCELFSR_2		+/- 2g
			0x08: MPU9150_ACCELFSR_4		+/- 4g
			0x10: MPU9150_ACCELFSR_8		+/- 8g
			0x18: MPU9150_ACCELFSR_16		+/- 16g
		-->
		<param name="mpu9250/accel_full_scale_range" value="16" />
		
		<!-- mpu9250/gyro_full_scale_range:
			0x00: MPU9150_GYROFSR_250		+/- 250 degrees per second
			0x08: MPU9150_GYROFSR_500		+/- 500 degrees per second
			0x10: MPU9150_GYROFSR_1000		+/- 1000 degrees per second
			0x18: MPU9150_GYROFSR_2000		+/- 2000 degrees per second
		-->
		<param name="mpu9250/gyro_full_scale_range" value="16" />
		
		
		<!-- mpu9250/gyro_accel_low_pass_filter:
			0: MPU9150_LPF_256:  gyro: 256Hz, accel: 260Hz
			1: MPU9150_LPF_188:  gyro: 188Hz, accel: 184Hz
			2: MPU9150_LPF_98:   gyro: 98Hz, accel: 98Hz
			3: MPU9150_LPF_42:   gyro: 42Hz, accel: 44Hz
			4: MPU9150_LPF_20:   gyro: 20Hz, accel: 21Hz
			5: MPU9150_LPF_10:   gyro: 10Hz, accel: 10Hz
			6: MPU9150_LPF_5:    gyro: 5Hz, accel: 5Hz
		-->
		<param name="mpu9250/gyro_accel_low_pass_filter" value="3" />
</node>
------------------------------------------------------------------------------------------------- and I have detect mpu9250 in i2c bus 2 root@bpi-iot-ros-ai:/home/pi/my_ros_ws# i2cdetect -y 2 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- --

when i run: roslaunch i2c_imu mpu_9250.launch, the result as follow:

PARAMETERS

  • /imu/i2c_imu_node/fusion_type: 2
  • /imu/i2c_imu_node/i2c_bus: 1
  • /imu/i2c_imu_node/i2c_slave_address: 104
  • /imu/i2c_imu_node/imu_frame: imu_link
  • /imu/i2c_imu_node/imu_type: 6
  • /rosdistro: indigo
  • /rosversion: 1.11.20

NODES
/imu/
i2c_imu_node (i2c_imu/i2c_imu_node)
/
imu_to_base (tf/static_transform_publisher)

ROS_MASTER_URI=http://localhost:11311

core service [/rosout] found
process[imu_to_base-1]: started with pid [10098]
process[imu/i2c_imu_node-2]: started with pid [10099]
[ INFO] [1487039913.152380428]: RTIMU Node for ROS
Settings file RTIMULib.ini loaded
[ INFO] [1487039913.213003026]: loadSettings: reading IMU parameters from param server
[ INFO] [1487039913.381746702]: No Calibration for Compass
[ INFO] [1487039913.385535281]: No Calibration for Accelerometer
Using fusion algorithm RTQF
min/max compass calibration not in use
Ellipsoid compass calibration not in use
Accel calibration not in use
I2C read error from 104, 15 - Failed to read LSM9DS1 accel/gyro id
[FATAL] [1487039913.492664405]: I2cImu - Failed to init the IMU
[FATAL] [1487039913.492860938]: BREAKPOINT HIT
file = /home/pi/my_ros_ws/src/i2c_imu-master/src/i2c_imu_node.cpp
line=137

How can I solve this problem? thanks

How to calibrate compass and accelerometer ?

How to calibrate compass and accelerometer ?
What are those values refer to?
#Calibration
calib:
compass_min: [-28.451460, -42.645390, -38.086895]
compass_max: [68.179794, 48.143326, 57.744003]

accel_min: [ -1.004789, -1.014467, -1.015889 ]
accel_max: [ 0.995606, 1.002416, 0.996524 ]

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.