Commit Graph
1298 Commits
Author SHA1 Message Date
Samuel Sadok 9155edfb17 Fix a numerical issue in the trajectory planner that could cause sudden jumps of the position setpoint.
If certain inputs were passed to trajectory planner, an expression inside the trajectory planner which is an argument to sqrtf() could become negative due to finite floating point accuracy.
This led to Vr_ == NaN and then Tf_ == 0, causing the trajectory to jump to the final setpoint instantaneously. To the user, this manifested as a sudden increase in velocity (limited by controller.config.vel_limit) and/or an overcurrent fault.

This bug was likely to show up when constantly sending trajectory setpoints while moving in the negative direction.

See also: https://discourse.odriverobotics.com/t/move-to-pos-not-works-well/4626
2020-05-06 19:25:39 +02:00
Samuel Sadok 484c5ab9da clarify comments 2020-05-06 11:23:46 +02:00
Unknown bf6d47f950 Add some missing reference & symbols 2020-05-05 21:37:47 -04:00
Unknown 7290e55525 Convert Axes to a std::array 2020-05-05 20:30:03 -04:00
Samuel Sadok 50ecdef860 move DC overcurrent/undercurrent checks to update_brake_current()
The checks now take into account the brake current.
Expose ibus on fibre.
2020-05-05 18:16:06 +02:00
Samuel Sadok 1dc420a76d various changes to update_brake_current:
- cleaner implementaiton of the overvoltage ramp with config variables separate from other functions
 - explicit enable flag for overvoltage ramp (disabled by default)
 - reinstate brake duty cycle NaN error
 - add informational flag for brake resistor saturation
2020-05-04 12:54:34 +02:00
Oskar Weigl edb6a1611c changed max brake duty to 95 pct 2020-05-01 17:11:47 -07:00
Oskar Weigl d002a74d24 rename psu current fault levels 2020-05-01 16:37:20 -07:00
Samuel Sadok 90f5c1d0b1 change velocity clamping in input filter mode
as per: https://discordapp.com/channels/369667319280173067/369678934985408524/705227337230188595
2020-05-01 16:32:09 +02:00
Samuel Sadok 6ade7e47ed update testing documentation 2020-05-01 14:48:12 +02:00
Samuel Sadok f84ff36c74 only enable vbus_voltage clamping if dc_bus_overvoltage_trip_level > nominal_voltage 2020-04-30 11:44:14 +02:00
Samuel Sadok 4cfbb2c3e4 fix various issues with SPI encoder implementation
- Remove logic that would inhibit error detection until the first value is received. This logic posed a risk when no encoder is connected at all.
 - check error flag in AMS mode
 - Make CUI mode work. Only tested with emulated CUI encoder.
 - only go to ready-state if a successful value was received _and_ the offset was already pre-calibrated
 - enable pull-up on MISO so that a disconnected AMS encoder can be detected
 - update encoder documentation
2020-04-29 16:18:55 +02:00
Unknown 3d2d0f0e1a Clean up and modernize axis task_chain 2020-04-27 15:27:43 -04:00
Unknown 659bcaaa2c Merge branch 'RazorsFrozenTesting' into RazorsEdge 2020-04-27 12:49:46 -04:00
Samuel Sadok 8cd673363c Reboot on erase_configuration().
This avoids unexpected behavior of a subsequent `save_configuration()`
call, since the configuration is only erased from NVM, not from RAM.
2020-04-27 15:19:32 +02:00
Unknown baa6e4b5dc Set default configuration of endstops to configuration 4 2020-04-26 00:25:19 -04:00
Unknown 9ef3d0c6a1 Store the result of get_inverter_temp to a member variable 2020-04-25 22:38:53 -04:00
Samuel Sadok d3a864785d remove spurious line change 2020-04-24 11:13:11 +02:00
Samuel Sadok ff544bfc19 simplify JSON caching logic, make JSON cache ID opaque, remove spurious changes 2020-04-24 11:06:53 +02:00
Adam Munich 5e3d8693c9 Update shell.py
fix broken exceptionhandler
2020-04-24 11:06:53 +02:00
Adam Munich 0e1ee833d2 Update discovery.py
added entropy
2020-04-24 11:06:53 +02:00
Adam Munich c93400aacf Update protocol.hpp 2020-04-24 11:06:53 +02:00
Adam Munich 2fd20eb931 Update protocol.cpp 2020-04-24 11:06:53 +02:00
Ben Wang 1445d3531a refactor fiber cache 2020-04-23 17:49:12 +02:00
Adam Munich 3b4d2a5d34 Update discovery.py
store string directly
2020-04-23 17:49:12 +02:00
Adam Munich 4fc9f7e3fe Update discovery.py
fixd
2020-04-23 17:49:12 +02:00
Adam Munich f7eadfeb3b Update discovery.py
fxd
2020-04-23 17:49:12 +02:00
Oskar Weigl 1e9e647941 backwards compatible with old firmware 2020-04-23 17:49:12 +02:00
Oskar Weigl f6eacd7ae4 implement fetching of json crc on discovery 2020-04-23 17:49:12 +02:00
Oskar Weigl 0f3baf816f accept 0xffffffff offset for json crc 2020-04-23 17:49:12 +02:00
Samuel Sadok c45ef8934b Change wrap_pm to be based on fmodf
Before this commit, bad user input could cause the device to hang,
that is, no longer respond on USB (other side effects are likely,
though not tested for).

An example of such an input is:

odrv0.axis0.encoder.config.cpr = 10
odrv0.axis0.encoder.config.offset = 20000
2020-04-23 14:38:50 +02:00
Unknown a5d991e712 Clarify current_setpoint calculation 2020-04-21 20:39:39 -04:00
Unknown 574190e433 Change trap_traj timer to be more robust 2020-04-21 20:39:10 -04:00
Samuel Sadok 237a50bfc9 add step/dir input tests 2020-04-21 15:57:26 +02:00
Samuel Sadok 93287acd42 fix UART hang-up, harden ASCII protocol code 2020-04-14 22:48:17 +02:00
Unknown e6f95d4d47 Make sin/cos encoder pins configurable. 2020-04-09 18:53:53 -04:00
Samuel Sadok 19ac132f51 fix UART error handling 2020-04-09 23:14:52 +02:00
Samuel Sadok 37c4fe337a allow configuring motor parameters without reboot 2020-04-08 16:26:15 +02:00
Samuel Sadok 746e142fc2 fix encoder direction find procedure 2020-04-08 16:25:29 +02:00
Unknown 8a7a5aac4d Remove VBUS_OVERVOLTAGE_LEVEL because it's not being used 2020-03-29 21:10:38 -04:00
Unknown db890b0d5c Use brake_current as a true FF 2020-03-28 00:58:32 -04:00
Unknown 163ce7d21a Change Interval to Increment 2020-03-28 00:50:44 -04:00
Unknown a8d47894ca Add additional test types and fix missing template argument 2020-03-28 00:40:00 -04:00
Unknown f5f9514bfc Fix comment 2020-03-28 00:20:28 -04:00
Unknown 128ae3935c Make Timer generic, add comments 2020-03-28 00:15:21 -04:00
Unknown 31fb65b86c Improve braking logic 2020-03-27 21:30:32 -04:00
Unknown c231928619 Merge branch 'feature/brake_current_fix' into RazorsFrozenTesting 2020-03-27 21:24:49 -04:00
Unknown fb46103498 Add doctest, fix drv8301 warning 2020-03-27 21:22:04 -04:00
Unknown 8a0a22eb6f Revamp Endstop timers 2020-03-27 21:11:39 -04:00
Unknown f98da473f1 Remove utils import from drv8301.c 2020-03-27 21:11:23 -04:00