Skip to content
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

[23] fix acc and mag scaling factors and make them configurable #24

Merged
merged 3 commits into from
Nov 12, 2021

Conversation

@flynneva
Copy link
Owner Author

flynneva commented Nov 6, 2021

@Darkproduct could you look over these changes and let me know if they fix the issues you identified in #23? I chose to make these parameters so that in the event that existing users want to keep the old behavior they still can

@Darkproduct
Copy link

Yes, looking good from my side. I currently don't have access to hardware but I can check on Thursday if that's necessary.

@flynneva
Copy link
Owner Author

flynneva commented Nov 9, 2021

@Darkproduct yeah I haven't had access to hardware either but hopefully will later this week. I'll confirm later and report back.

@flynneva flynneva force-pushed the fix/scaling_factors branch from 8467412 to 6a11b87 Compare November 11, 2021 05:24
@flynneva
Copy link
Owner Author

@kallaspriit if you have some time would be great to get your review. I think I have fixed the missing constants you mentioned in #35 but would love a second pair of eyes. I'll test this branch on hardware tomorrow

@kallaspriit
Copy link

Thanks, will try to test later today :)

@kallaspriit
Copy link

Hey, I can confirm that given branch compiles without issues and communication with Adafruit BNO055 is working nicely (testing on Raspberry PI 4B, Ubuntu server 20.04, uart5).

Only problem is that during startup I'm consistently getting six Receiving sensor data failed with ZeroDivisionError:"float division by zero" warnings and after that it seems to work fine (getting data on /imu topic). Somewhere it's probably trying to divide by zero but does not log the stack trace.

[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [bno055-1]: process started with pid [3517]
[bno055-1] [INFO] [1636651512.736648900] [bno055]: Initializing parameters
[bno055-1] [INFO] [1636651512.752603194] [bno055]: Parameters set to:
[bno055-1] [INFO] [1636651512.755413902] [bno055]:      ros_topic_prefix:       ""
[bno055-1] [INFO] [1636651512.758326944] [bno055]:      connection_type:        "uart"
[bno055-1] [INFO] [1636651512.760868316] [bno055]:      uart_port:              "/dev/ttyAMA1"
[bno055-1] [INFO] [1636651512.763388485] [bno055]:      uart_baudrate:          "115200"
[bno055-1] [INFO] [1636651512.765895597] [bno055]:      uart_timeout:           "0.1"
[bno055-1] [INFO] [1636651512.768630268] [bno055]:      frame_id:               "imu"
[bno055-1] [INFO] [1636651512.771115676] [bno055]:      data_query_frequency:   "100"
[bno055-1] [INFO] [1636651512.773650382] [bno055]:      calib_status_frequency: "0.1"
[bno055-1] [INFO] [1636651512.776171532] [bno055]:      operation_mode:         "12"
[bno055-1] [INFO] [1636651512.778656552] [bno055]:      placement_axis_remap:   "P0"
[bno055-1] [INFO] [1636651512.781175553] [bno055]:      acc_factor:             "100.0"
[bno055-1] [INFO] [1636651512.783697648] [bno055]:      mag_factor:             "16000000.0"
[bno055-1] [INFO] [1636651512.786188464] [bno055]:      gyr_factor:             "900.0"
[bno055-1] [INFO] [1636651512.788727947] [bno055]:      acc_offset:             "[65516, 165, 65512]"
[bno055-1] [INFO] [1636651512.791274098] [bno055]:      mag_offset:             "[65460, 65182, 637]"
[bno055-1] [INFO] [1636651512.793762784] [bno055]:      gyr_offset:             "[2, 65535, 65535]"
[bno055-1] [INFO] [1636651512.796652196] [bno055]: Opening serial port: "/dev/ttyAMA1"...
[bno055-1] [INFO] [1636651512.820942188] [bno055]: Configuring device...
[bno055-1] [INFO] [1636651512.866787167] [bno055]: Bosch BNO055 IMU configuration complete.
[bno055-1] [WARN] [1636651512.889269662] [bno055]: Receiving sensor data failed with ZeroDivisionError:"float division by zero"
[bno055-1] [WARN] [1636651512.902735770] [bno055]: Receiving sensor data failed with ZeroDivisionError:"float division by zero"
[bno055-1] [WARN] [1636651512.914167770] [bno055]: Receiving sensor data failed with ZeroDivisionError:"float division by zero"
[bno055-1] [WARN] [1636651512.926148866] [bno055]: Receiving sensor data failed with ZeroDivisionError:"float division by zero"
[bno055-1] [WARN] [1636651512.937963776] [bno055]: Receiving sensor data failed with ZeroDivisionError:"float division by zero"
[bno055-1] [WARN] [1636651512.949206051] [bno055]: Receiving sensor data failed with ZeroDivisionError:"float division by zero"

@flynneva
Copy link
Owner Author

Going to merge this for now and follow up another day on the remaining topics

@flynneva flynneva merged commit b5d3826 into develop Nov 12, 2021
@flynneva flynneva deleted the fix/scaling_factors branch November 23, 2021 04:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants