question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Reading IMU Values

See original GitHub issue

Hi, Firstly, Thank you for your work, it’s really nice. secondly, I have a mambo (AIRBORNE Night drone), and I’m trying to read IMU Values while it’s moving, I’ve started with reading Speed_x, Speed_y, and Speed_z … As it’s shown below… but I got zeros value ` from Mambo import Mambo t=0 mamboAddr = “e0:14:bc:d0:3d:a1” mambo = Mambo(mamboAddr, use_wifi=False)

print(“trying to connect”) success = mambo.connect(num_retries=3) print(“connected: %s” % success)

if (success):

print("sleeping")
mambo.smart_sleep(2)
mambo.ask_for_state_update()
mambo.smart_sleep(2)

print("taking off!")
mambo.safe_takeoff(5)

while(t<8):

    print("speed_x state is %s" % mambo.sensors.speed_x)
    
    
    print("speed_y state is %s" % mambo.sensors.speed_y)

    
    print("speed_z state is %s" % mambo.sensors.speed_z)


    print("battery %s" % mambo.sensors.battery)

    
    print("Flying direct: going forward (positive pitch)")
    mambo.fly_direct(roll=0, pitch=50, yaw=0, vertical_movement=0, duration=1)



    print("Flying direct: going backwards (negative pitch)")
    mambo.fly_direct(roll=0, pitch=-50, yaw=0, vertical_movement=0, duration=1)

    
    print("ask_for_state_update")
    mambo.ask_for_state_update()

    t=t+1

print("landing")
mambo.safe_land(5)
mambo.smart_sleep(5)

print("disconnect")
mambo.disconnect()`

I thought the cause is the sequent of code, So I have tried to make two threads, One of them to pilot and the other to update sensors and read it. but it doesn’t work. I hope BLE give me the Possibility to read IMU Values.
I will be grateful for any ideas. Thank you.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:14 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
amymcgoverncommented, Apr 11, 2018

This is very odd. I just did a test run over BLE and it is sending speed_x for me. I’m running 3.0.17 for the firmware though so you need to update.

1reaction
amymcgoverncommented, Apr 7, 2018

You shouldn’t have to ask for the state update in your loop either. It comes automatically. The state update just updates the non-regular stuff (like ids)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Beginner's Guide to IMU | Robotics Club - IIT Kanpur
These acceleration values can give us roll and pitch values. ... That's it regarding IMU, mostly IMU's readings are prone to drifting when ......
Read more >
How to Interpret IMU Sensor Data for Dead-Reckoning
If applied to future acceleration readings, this matrix will rotate the values so that no matter how your sensor is mounted, the negative...
Read more >
ROS, IMU and an Arduino: How to read IMU sensor output ...
this tutorial is on how to connect and get values from IMU (specifically MPU6050 IMU) through Arduino board and send it directly to...
Read more >
Inertial Measurement Units I - Stanford University
IMU models relative rotation of sensor/body frame in world/inertial coordinates. • example: person on the left looks up → pitch=90° or.
Read more >
Inertial Measurement Unit (IMU) Use - ESE205 Wiki
An IMU works based on MEMS techonology, at the minimum it collects both ... a 1g value is read as 16384 and 2g...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found