I've implemented a function to use an external sensor to calibrate the zero position during command_mode: position (using VESC as servo). For this PR, I used PM-T65W-P photoelectric sensor for calibration.
Details
You can enable calibration via sensor by setting enable_sensor_calibration: true Check the vesc_hw_interface/launch/position_control_sample.launch for more parameter details.
I've also added sensor calibration firmware. You can load the firmware using Arduino IDE or call the following command. Edit the vesc_hw_interface/firmware/CMakeLists.txt file to change the target port and/or board.
Applied new features to vesc_hw_interface as well as introduced additional build dependencies. Make sure to install the necessary dependencies before building
Change Summary
Details
enable_sensor_calibration: true
Check the vesc_hw_interface/launch/position_control_sample.launch for more parameter details.Impacts
References
Additional Information