Commit Graph
2471 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
Samuel Sadok 8ab2e0530e add helper to pass through encoder 2020-05-06 11:21:33 +02:00
Samuel Sadok 35d1a24314 improve encoder tests 2020-05-06 11:21:33 +02:00
Samuel Sadok eb944018e3 update documentation 2020-05-06 11:21:33 +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 afe83430fe add test for over-regen-current check 2020-05-05 18:16:45 +02: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 23f513e99e update changelog 2020-05-04 16:26:52 +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
Oskar Weigl c6bb191457 improvements to pos filter analysis script 2020-05-01 16:01:14 -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 f5289ddb19 update developer 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
Samuel Sadok 4b58aeb637 add SPI encoder tests (AMS and CUI protocol) 2020-04-29 16:11:41 +02:00
Unknown 9ba9aae8f9 Merge branch 'RazorsEdge' into RazorsFrozenTesting 2020-04-27 15:28:12 -04: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 b3dc36f97c extend CAN test: add watchdog and heartbeat tests 2020-04-27 17:38:17 +02:00
Samuel Sadok 744baf79ef overhaul all tests so they pass 2020-04-27 15:19:32 +02:00
Samuel Sadok 7004e93506 add closed loop control tests 2020-04-27 15:19:32 +02: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 9c86808bca Changelog updates 2020-04-26 00:16:52 -04:00
Unknown 828f82b25b Merge branch 'RazorsFrozenTesting' into RazorsEdge 2020-04-25 23:53:52 -04:00
Unknown 39fba04520 Merge branch 'master' into RazorsFrozenTesting 2020-04-25 23:52:30 -04:00
Unknown 9ef3d0c6a1 Store the result of get_inverter_temp to a member variable 2020-04-25 22:38:53 -04:00
Unknown c63d6baff0 Merge branch 'RazorsFrozenTesting' into RazorsEdge 2020-04-24 12:02:34 -04:00
samuelsadok c8b1881c51 Merge pull request #353 from madcowswe/fiber_cache_refactor
- Add JSON caching to Fibre. This drastically reduces the time odrivetool needs to connect to an ODrive (except for the first time or after firmware updates). The updated firmware is compatible with the old odrivetool and the updated odrivetool is compatible with the old firmware.
- Fix IPython `RuntimeWarning` that would occur every time `odrivetool` was started.
2020-04-24 11:24:23 +02:00
Samuel Sadok 78b48f1a9b amend changelog 2020-04-24 11:21:49 +02: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
Paul Guenette 56fb02b453 Merge branch 'RazorsFrozenTesting' into RazorsEdge 2020-04-23 16:36:01 -04: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 1b9f442114 clarify ascii doc 2020-04-23 17:44:07 +02:00