Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Spinal][Config] Additional features and new configuration for Spinal (…
…#630) * [Spinal][Dynamixel] transplanted dynamixel interface to spinal * [Spinal][Encoder] modified encorder interface imitating neuron one * [Spinal] change usart3 bardrate as 1Mbps * [Spinal][Servo][WIP] create a new universal interface to control servos * [Spinal][Servo] fix complile erors in servo interface (stil not work) * [Spinal][Servo] add implimentation to call servo interface from main.cpp * [Spinal][Servo][WIP] modifed some details and add MPU setting * [Spinal][Servo] add new task to treat servos directly * [Spinal][Servo] change servo flag name * [Spinal][Servo][WIP] workaround send command to dynamixel * [Spinal][Servo] create a new service to set configuration of direct control servos * [Spinal][Servo] workaround to set configuration of direct servos to flashmemory * [Spinal][Servo] add interface to set target angle directly * [Spinal][Servo] fix some bugs * [Spinal][Servo] change the priority of servotask from idle to realtime * [Spinal][Servo] fixed bug in a function of toruqe enabling * [Spinal][Dynamixel] limit the situation in which offset and torque parameter can be set to only during torqe off state. * [Spinal][Dynamixel] modified maximum servo number from 4 to 8. * [Spinal][servo] Create README for servo interface * [Spinal][Servo] resize the servo message as same as maximum servo num. * [ServoBridge] workaroud to use servo profiles in spinal firmware. * [Spinal][Servo] use servo index to indentify servo * [Spinal][Servo] workaround to use rqt to monitor and setup direct servos. * [Spinal][Servo] debug around reading servo from rqt * [Spinal][Servo] debug around boad configurator * [Spinal][Servo] change the port for servo control from usart3 to usart2 * [Spinal][Servo] workaround to use servo and gps simultaneously * [Spinal][DShot] add telemetry function for the ESCs that support. The code can be flashed into mcu. However, the telemetry has not been tested yet, since the DShot function should be implemented first. * [Spinal][DShot] add DShot code from https://github.com/mokhwasomssi/stm32_hal_dshot * [Spinal][DShot] add DMA function for DShot PWM. only set the CubeMX and generate code, not tested. * [Spinal][DShot]: remove redundant code for esc_telem * [Spinal][DShot]: create the new dshot class * [Spinal][DShot]: change the PWM setting in CubeMX for DShot; fix a type error in dshot.cpp; fix a 'static' keyword error and add dma address for STM32H7 in dshot.h. When building, some include errors occur. * [Spinal][DShot]: try to change pwm to dshot. Not tested. * [Spinal][DShot]: fix bugs, now the code can be built without errors. * [Spinal][DShot]: change the memory size for dma buffer. The original size is too small. However, error still occur when accessing the memory. * [Spinal][DShot]: only one motor can rotate. do not know why * [Spinal][DShot]: [SUCCESS] change settings to use NPU. NPU is critical for DMA in stm32H7. change a permission setting to allow NPU access. pwm_test works fine on real machine! * [Spinal][DShot]: add one flag to decide if using telemetry or not. * [Spinal][DShot]: change the UART for receiving dshot telemetry to RX only. * [Spinal][DShot]: add msg for telemetry * [Spinal][DShot]: achieve dshot telemetry of one motor. test using debug. the received data is checked in a clever way. * [Spinal][DShot]: add code to communicate with ros. tested successfully! * [Spinal][DShot]: refactor dshot class to triggering one by one. tested successfully! * [Spinal][DShot]: refactor esc_telem class to measure one by one. Unsuccessful. Still problem * Revert "[Spinal][DShot]: refactor esc_telem class to measure one by one. Unsuccessful. Still problem" This reverts commit 699c1d1. * Revert "[Spinal][DShot]: refactor dshot class to triggering one by one. tested successfully!" This reverts commit 5d1518e. * [Spinal][DShot]: add time stamp to ESCTelemetryArray.msg * [Spinal][DShot]: add esc_reader support for different esc_msgs * [Spinal][DShot]: send telem flag to different motors. one telem for one motor during one round. [tested using Oscilloscope] * [Spinal][DShot]: finish the eRPM measurement of different motors. Tested! Now the freq. is limited to 125hz. 250 hz will cause strange behavior. * [Spinal][DShot]: polish the dshot code for rotor measurement * [Spinal][DShot]: add crc to ESCTelemetry.msg for debugging * [Spinal][DShot]: refactor some names; add constraints for dshot value * [Spinal][DShot]: add support to reverse rotation directions. tested! * [Spinal][DShot]: change telemetry info from erpm to real rpm! * [Spinal]: fix typo * [Spinal][DShot]: refactor rx_buf_ to esc_telem_rx_, in case of unambiguous * [Spinal][DShot]: remove code for dshot config, since unsuccessful * [Spinal][Battery]: use dshot telemetry to update the battery voltage * [Spinal][Dynamixel] change the Dynamixel reading procedure from send-receive to receive-send. Not working. * [Spinal][Dynamixel] make the send freq. the same as INST_GET_PRESENT_POS * [Spinal][Dynamixel] refactor code to support quick reading for Dynamixel. The current freq. for servo is 100hz, and the current freq. for dshot is 125hz. Tested on real machine. * [Spinal][Dynamixel] fix a bug after cherry-pick * [Spinal][DShot][WIP] workaround to use dshot in Spinal 4.1 * [Spinal][DShot] workaround to use Dshot and ESC telemetry in Spinal version 4.1 * [Spinal][DShot] modified volatage sensing update procudure * [Spinal4.1][DShot] restore the procedure of reading esc telem as previous version * [Spinal][Config][ver4.1] workaround to enable servo control in spinal 4.1 * [Spinal][Config][ver4.1] add roslib build instruction for stm32h7_v2 * [Spinal][Dynamixel] modified servo task priority * [Spinal][Dynamixel] modified max servo number * [Spinal][Servo] modified way of gain transmitting to avoid write error * [Spinal][Servo] debug around the method to distinguish invalid servo ID. * [Spinal][H7_V1] revert ping uart2 and 3 config as master * [Spinal][Config] add new flag to distinguish special board version * [Spinal][DirectServo] choose correct MPU region according to board version. * [Spinal][DirectServo] dynamically configure Pin setting for servo. * [Spinal][Config][WIP] create separated config files corresponding to each Spinal board. * [Spinal][Config][F7] configure CubeIDE project for SpinalF7 based on its own config. * [Spinal][Config][H7] configure CubeIDE project for SpinalH7 based on its own config. * [Spinal][Config][H7_v2] configure CubeIDE project for SpinalH7_v2 based on its own config. * [Spinal][F7] update the way to call magencoder * [Spinal][H7&H7_V2] modified imu select condition * [Spinal][config] delete previous common config file. * [Spinal][Dshot] deleted unused include path. * [Spinal][Controller] add a dynamic board configurator for the method of thrust signal transmission(PWM or DSHOT). * [Spinal][Config] add new flag to determine whether Spinal uses dshot or not. * [Spinal][ACD] Rvert adc channel from 18 to 15 to revive previous voltage sensing way. * [Spinal][Servo] Debug of infinity loop in sevoTask function when direct servo mode is disenabled. * [Spinal] Initialize battery instance according to Dshot falg. * [Spinal] remove the exectuable attribute for config files * Revert "[Spinal][Encoder] modified encorder interface imitating neuron one" This reverts commit af3f910. * Revert "[Spinal][F7] update the way to call magencoder" This reverts commit 366b3d1. * [Spinal][Config] add new flag to determine Spinal or Neuron. * [Spinal][Dynamixel] Add build macro abount the part related to external encoder. --------- Co-authored-by: Kaneko <[email protected]> Co-authored-by: hisaaki <[email protected]> Co-authored-by: LI, Jinjie <[email protected]> Co-authored-by: Jinjie Li <[email protected]> Co-authored-by: Moju Zhao <[email protected]>
- Loading branch information