Good day,
I am tuning my ODrive for an autonomous differential robot platform.
It has these 50:1 geared motors for both wheels and I am using the included hall effect encoders (Attached to the motor before the 50:1 transmission).
My ODrive is V3.5 24V with Firmware 0.5.1
I configured both axis and I can calibrate and run both wheels in velocity control mode. I am using CAN Interface for controlling the ODrive from a Jetson Xavier running ROS.
The problem: occasionally when accelerating from 0 to 60 Turns/s (considering this speed from the motor and not from the wheels) both axis will stop responding, and and Unknown Error 0x00000004 appeard on both axis.
Am I missing some configuration? I followed both the getting started and the hoverboard motors setup guides.
What can be the cause of this errors?
Thanks in advance for your support.
Error dump
In [15]: dump_errors(odrv0)
system: not found
axis0
axis: Error(s):
UNKNOWN ERROR: 0x00000004
motor: no error
sensorless_estimator: no error
encoder: no error
controller: no error
axis1
axis: Error(s):
UNKNOWN ERROR: 0x00000004
motor: no error
sensorless_estimator: no error
encoder: no error
controller: no error
My axis setup:
In [23]: odrv0.axis1.controller.config
Out[23]:
anticogging:
anticogging_enabled: True (bool)
calib_anticogging: False (bool)
calib_pos_threshold: 1.0 (float)
calib_vel_threshold: 1.0 (float)
cogging_ratio: 1.0 (float)
index: 0 (uint32)
pre_calibrated: False (bool)
axis_to_mirror: 255 (uint8)
circular_setpoint_range: 1.0 (float)
circular_setpoints: False (bool)
control_mode: 2 (int32)
enable_current_mode_vel_limit: True (bool)
enable_gain_scheduling: False (bool)
enable_overspeed_error: True (bool)
enable_vel_limit: True (bool)
gain_scheduling_width: 10.0 (float)
homing_speed: 0.25 (float)
inertia: 0.0 (float)
input_filter_bandwidth: 2.0 (float)
input_mode: 1 (int32)
load_encoder_axis: 1 (uint8)
mirror_ratio: 1.0 (float)
pos_gain: 20.0 (float)
torque_ramp_rate: 0.009999999776482582 (float)
vel_gain: 0.46000000834465027 (float)
vel_integrator_gain: 0.0 (float)
vel_limit: 84.0 (float)
vel_limit_tolerance: 1.2000000476837158 (float)
vel_ramp_rate: 1.0 (float)
In [24]: odrv0.axis0.controller.config
Out[24]:
anticogging:
anticogging_enabled: True (bool)
calib_anticogging: False (bool)
calib_pos_threshold: 1.0 (float)
calib_vel_threshold: 1.0 (float)
cogging_ratio: 1.0 (float)
index: 0 (uint32)
pre_calibrated: False (bool)
axis_to_mirror: 255 (uint8)
circular_setpoint_range: 1.0 (float)
circular_setpoints: False (bool)
control_mode: 2 (int32)
enable_current_mode_vel_limit: True (bool)
enable_gain_scheduling: False (bool)
enable_overspeed_error: True (bool)
enable_vel_limit: True (bool)
gain_scheduling_width: 10.0 (float)
homing_speed: 0.25 (float)
inertia: 0.0 (float)
input_filter_bandwidth: 2.0 (float)
input_mode: 1 (int32)
load_encoder_axis: 0 (uint8)
mirror_ratio: 1.0 (float)
pos_gain: 20.0 (float)
torque_ramp_rate: 0.009999999776482582 (float)
vel_gain: 0.46000000834465027 (float)
vel_integrator_gain: 0.0 (float)
vel_limit: 84.0 (float)
vel_limit_tolerance: 1.2000000476837158 (float)
vel_ramp_rate: 1.0 (float)
Encoder Setup
In [27]: odrv0.axis0.encoder
Out[27]:
calib_scan_response: 143.0 (float)
config:
abs_spi_cs_gpio_pin: 1 (uint16)
bandwidth: 200.0 (float)
calib_range: 0.019999999552965164 (float)
calib_scan_distance: 150.0 (float)
calib_scan_omega: 12.566370964050293 (float)
cpr: 12 (int32)
enable_phase_interpolation: True (bool)
find_idx_on_lockin_only: False (bool)
idx_search_unidirectional: False (bool)
ignore_illegal_hall_state: False (bool)
mode: 1 (int32)
offset: -66 (int32)
offset_float: -0.4443618059158325 (float)
pre_calibrated: False (bool)
sincos_gpio_pin_cos: 4 (uint16)
sincos_gpio_pin_sin: 3 (uint16)
use_index: False (bool)
zero_count_on_find_idx: True (bool)
count_in_cpr: 2 (int32)
error: 0 (int32)
hall_state: 2 (uint8)
index_found: False (bool)
interpolation: 0.5 (float)
is_ready: True (bool)
phase: 3.083325147628784 (float)
pos_abs: 0 (int32)
pos_circular: 0.17110556364059448 (float)
pos_cpr: 0.17081031203269958 (float)
pos_cpr_counts: 2.0497236251831055 (float)
pos_estimate: 0.16690075397491455 (float)
pos_estimate_counts: 2.0028090476989746 (float)
set_linear_count(obj: object_ref, count: int32)
shadow_count: 2 (int32)
spi_error_rate: 0.0 (float)
vel_estimate: 0.0 (float)
vel_estimate_counts: 0.0 (float)
In [28]: odrv0.axis1.encoder
Out[28]:
calib_scan_response: 143.0 (float)
config:
abs_spi_cs_gpio_pin: 1 (uint16)
bandwidth: 200.0 (float)
calib_range: 0.4000000059604645 (float)
calib_scan_distance: 150.0 (float)
calib_scan_omega: 12.566370964050293 (float)
cpr: 12 (int32)
enable_phase_interpolation: True (bool)
find_idx_on_lockin_only: False (bool)
idx_search_unidirectional: False (bool)
ignore_illegal_hall_state: False (bool)
mode: 1 (int32)
offset: -66 (int32)
offset_float: -0.4645048975944519 (float)
pre_calibrated: False (bool)
sincos_gpio_pin_cos: 4 (uint16)
sincos_gpio_pin_sin: 3 (uint16)
use_index: False (bool)
zero_count_on_find_idx: True (bool)
count_in_cpr: 4 (int32)
error: 0 (int32)
hall_state: 4 (uint8)
index_found: False (bool)
interpolation: 0.5 (float)
is_ready: True (bool)
phase: -1.0843665599822998 (float)
pos_abs: 0 (int32)
pos_circular: 0.41282007098197937 (float)
pos_cpr: 0.41252967715263367 (float)
pos_cpr_counts: 4.9503560066223145 (float)
pos_estimate: 0.4166117310523987 (float)
pos_estimate_counts: 4.999340534210205 (float)
set_linear_count(obj: object_ref, count: int32)
shadow_count: 4 (int32)
spi_error_rate: 0.0 (float)
vel_estimate: 0.0 (float)
vel_estimate_counts: 0.0 (float)