-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sometimes the IMU does not provide any data (all zeros) when used through the master-board network. #5
Comments
The tests to be done in order to check this:
report the results here: (imu working or not, any error that pops up, etc.) |
In debug and release mode all of five times (I didn't recompile it) in example.cpp, attitude was a nonzero number, and attitude was zero in hardware_calibration. |
ok then there is a bug in bolt/odri |
I changed these lines.
|
Hi, can you try to print the imu_attitude before converting it back and forth? What I mean is adding the lines like this:
in https://github.com/open-dynamic-robot-initiative/odri_control_interface/blob/main/src/imu.cpp#L80 This will print the raw imu attitude as provided from the master board. If this is non-zero but bolt's |
I created a debug demo for bolt: This is the demo you should run @Lhumd |
It prints zero. |
Maybe stupid question, but the other measurements like joints etc are all okay? I don't understand why the IMU is not working when using this interface reading the raw values from the robot_if but things work fine when running the low-level example. |
The only thing it seems working is the slider!
|
My print doesn't include a counter to make sure that we are not loosing realtime. Could it be the problem?
|
It takes 5 seconds to initialize the motor boards (calibrate the motors). Is that the period where you see zero values or does it take longer until you see non-zero values? |
Approximately, yes. |
That's what I suspect there a wait until ready that I missed somewhere, wait! |
I pushed a fix that is waiting until the robot is ready to perform any action in the demo. For the DGM the wait is done in the main loop inside the (send_command) |
@Lhumd can you try again updating the code this should work now. |
@ALL I am not sure what is the status of this issue, does people still see the imu not going up sometimes? |
On solo12, I had the IMU not engage 1 out of roughly 10 times. What I do in the code is check during startup if the IMU reads zeros. If that's the case, I print an error message and reboot the robot. # Check if the IMU is working.
imu_gyro = head.get_sensor('imu_gyroscope')
if np.all(imu_gyro == np.zeros(3)):
print('!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!')
print('!!! !!!')
print('!!! IMU IS NOT WORKING !!!')
print('!!! !!!')
print('!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!')
print('imu_gyro:', imu_gyro) |
👍 |
I am trying to use IMU for Bolt. The problem is that sometimes base_attitude_ is equal to zero. The behavior is changing with different compiling. For example, I added some prints, then it works, and by adding more prints, it doesn't work.
To me, it doesn't seem the problem comes from hardware or connection because master_board_example works fine.
The text was updated successfully, but these errors were encountered: