SJSURoboticsTeam / urc-central-2021

Track progress and information for the URC 2021 competition
MIT License
1 stars 0 forks source link

Gyroscope/compass Linux/Jetson Nano driver #48

Open ntwong0 opened 4 years ago

ntwong0 commented 4 years ago

progress

useful links

ref for i2c timing diagram image

ntwong0 commented 4 years ago

@BobMak was not able to look at compass node this week

ntwong0 commented 4 years ago

image

BobMak commented 4 years ago

Node code appears to be calling the constructor with a correct bus specified. The problem appears to be on mraa side - some initialization failure.

BobMak commented 4 years ago

trying to set raw=TRUE in m_i2c(int bus, boolean raw)
https://github.com/eclipse/upm/blob/master/src/mpu9150/ak8975.cxx#L38

ntwong0 commented 4 years ago

Looking into mraa/i2c.h, we should try to use mraa_i2c_init_raw(), so this is a good approach.

@BobMak mpu60x0.cxx also needs to be modified at line 36, since this is the inherited constructor for MPU9250.

ntwong0 commented 4 years ago

No updates for this week, will check back on @BobMak next week

BobMak commented 4 years ago

img errors in making upm from the source. Need to resolve dependencies. so far tried apt-get install libbacnet libmodbus libopenzwave libopenzwave

ntwong0 commented 4 years ago

@BobMak can you attempt building upm from source by next Saturday? Stretch goal - draft of calibration procedure

ntwong0 commented 4 years ago

@BobMak @YMmirsky need clarification on next steps

ntwong0 commented 4 years ago

@BobMak still blocked on upm building, will meet with @YMmirsky to resolve

BobMak commented 4 years ago

Able to build upm. upm requires a specific nodejs version to build optional utilities. It is possible to build upm without node by running cmake <upm_directory> DBUILDSWIGNODE=OFF Original solution

PushpalPatil commented 4 years ago

@BobMak Note: saturday

BobMak commented 4 years ago

Rebuilding upm with raw=TRUE results in the same error

BobMak commented 4 years ago

Core issue. Replacing mraa i2c read/write calls in upm.

BobMak commented 4 years ago

I've replaced the mraa i2c calls with linux i2c code in the upm as a temporary workaround. I can see the accelerometer data, but the orientation data looks broken.

PushpalPatil commented 4 years ago

maybe use magnet method

BobMak commented 4 years ago

Tried enabling magnetometer by setting the enableAk8975 flag to true. Still getting garbage data, no noticeable changes when the magnet is put closer.

PushpalPatil commented 4 years ago

can you post an example or vid recording of the garbage data? also could you push your code to the repo so that we can see the code?

BobMak commented 4 years ago

garbage data and magnet test

BobMak commented 3 years ago

Failed to utilize the ros-mpu9250-node module on Jetson Nano. The low-level dependency of the node doesn't support Jetson nano yet. Replacing the dependency failed. Working on my own magnetometer node implementation. Already able to initialize and read from the magnetometer.

BobMak commented 3 years ago

working on a python mpu9250 orientation node implementation.

BobMak commented 3 years ago

vizualised pose data by using Nelson's rviz notes there was one other thing I needed to run to see the live data visualisation: rosrun tf static_transform_publisher 0.0 0.0 0.0 0.0 0.0 0.0 map imu 100

mpu orientation data looks consistent and is reacting to a magnet. now trying to figure out how to do self-test and how to calibrate the sensor.

BobMak commented 3 years ago

mpu9250 compass heading visualization