From: Erik Andresen Date: Sat, 24 Jun 2017 17:34:36 +0000 (+0200) Subject: Revert pid changes and update steps per m X-Git-Url: https://defiant.homedns.org/gitweb/?a=commitdiff_plain;h=d55fc1ff8c77515d29610d3940f35965ff202a90;p=ros_wild_thumper.git Revert pid changes and update steps per m --- diff --git a/avr/motor_ctrl/main.c b/avr/motor_ctrl/main.c index 5d65529..7781fb4 100644 --- a/avr/motor_ctrl/main.c +++ b/avr/motor_ctrl/main.c @@ -97,14 +97,14 @@ */ -#define KP 0.09 -#define KI 0.07 +#define KP 0.062 +#define KI 0.12 #define KD 0.0 #define PID_T 0.01 // wheel diameter=12cm, encoder=48cpr, gear ratio=1:47 // STEP_PER_M = 48*47/(d*pi) // Left real diameter: 0.12808, Right real diameter: 0.121 -#define STEP_PER_M 5770.8 +#define STEP_PER_M 5573.0 #define STEP_PER_M_LEFT (STEP_PER_M) #define STEP_PER_M_RIGHT (STEP_PER_M) #define WHEEL_DIST 0.39912 // Measured: 0.252 diff --git a/avr/motor_ctrl/main.hex b/avr/motor_ctrl/main.hex index aef12fe..1707ad2 100644 --- a/avr/motor_ctrl/main.hex +++ b/avr/motor_ctrl/main.hex @@ -73,7 +73,7 @@ :10048000D3008093D20081E08093DC00E3C123B1EC :100490008091A4009091A500A091A600B091A70022 :1004A0006627782F892F9A2F622B6093A400709370 -:1004B000A5008093A6009093A70026E636E544EBBE +:1004B000A5008093A6009093A70020E038E24EEAC2 :1004C00055E40E94E9110E94C9107093D90060930D :1004D000D8007093D7006093D60081E08093DF004E :1004E0008093DE00B7C183B190E0A0E0B0E00EC021 @@ -210,8 +210,8 @@ :100D10000E94E91120E030E040E05FE30E94E91129 :100D2000A50194010E94F60F6B017C01A5019401BD :100D3000C501B4010E94F60FA70196010E94F50FAC -:100D400026E636E544EB55E40E94E9114B015C01CF -:100D500026E636E544EB55E4C701B6010E94E911E9 +:100D400020E038E24EEA55E40E94E9114B015C01D3 +:100D500020E038E24EEA55E4C701B6010E94E911ED :100D60006B017C018091AA008823C9F18091AA00BF :100D700024E630E0281B3109B901882777FD8095EA :100D8000982F0E94FC109B01AC01C501B4010E9488 @@ -250,10 +250,10 @@ :100F90007E8B8F8B988FB201882777FD8095982F55 :100FA0000E94FC102AE037ED43E25CE30E946110EE :100FB0000E94C910698F7A8F8B8F9C8FB7016C0D3F -:100FC0007D1D882777FD8095982F0E94FC1026E6CE -:100FD00036E544E356E40E9461104B015C01B30125 +:100FC0007D1D882777FD8095982F0E94FC1020E0DA +:100FD00038E24EE256E40E9461104B015C01B3011D :100FE000640D751D882777FD8095982F0E94FC1051 -:100FF00026E636E544E356E40E9461102B013C01ED +:100FF00020E038E24EE256E40E9461102B013C01F1 :10100000A50194010E94F50F25E739E54CEC5EE35C :101010000E94611069877A878B879C876091B500F1 :101020007091B6008091B7009091B80029853A85FB @@ -321,9 +321,9 @@ :10140000B90AB501882777FD8095982FC0908E0086 :10141000D0908F00E0909000F0909100C60ED71E03 :10142000E81EF91EC0928E00D0928F00E0929000CC -:10143000F09291000E94FC102CEE31E548EB5DE348 +:10143000F09291000E94FC1026EB33EF4DE75DE344 :101440000E94E9112B013C01C701B6010E94FC106A -:1014500024E330E847E35AE30E94E9119B01AC0121 +:1014500021E539E44DE95AE30E94E9119B01AC0111 :10146000C301B2010E94F60F6B017C0180918000E4 :1014700090918100B501681B790B882777FD8095D5 :10148000982F0E94FC1020E030E0A9010E94E91191 @@ -349,9 +349,9 @@ :1015C000B90AB501882777FD8095982FC0908A00C9 :1015D000D0908B00E0908C00F0908D00C60ED71E4E :1015E000E81EF91EC0928A00D0928B00E0928C0017 -:1015F000F0928D000E94FC102CEE31E548EB5DE38B +:1015F000F0928D000E94FC1026EB33EF4DE75DE387 :101600000E94E9112B013C01C701B6010E94FC10A8 -:1016100024E330E847E35AE30E94E9119B01AC015F +:1016100021E539E44DE95AE30E94E9119B01AC014F :10162000C301B2010E94F60F6B017C0180917E0024 :1016300090917F00B501681B790B882777FD809515 :10164000982F0E94FC1020E030E0A9010E94E911CF @@ -377,9 +377,9 @@ :10178000B90AB501882777FD8095982FC09086000B :10179000D0908700E0908800F0908900C60ED71E98 :1017A000E81EF91EC0928600D0928700E092880061 -:1017B000F09289000E94FC102CEE31E548EB5DE3CD +:1017B000F09289000E94FC1026EB33EF4DE75DE3C9 :1017C0000E94E9112B013C01C701B6010E94FC10E7 -:1017D00024E330E847E35AE30E94E9119B01AC019E +:1017D00021E539E44DE95AE30E94E9119B01AC018E :1017E000C301B2010E94F60F6B017C0180917C0065 :1017F00090917D00B501681B790B882777FD809556 :10180000982F0E94FC1020E030E0A9010E94E9110D @@ -405,9 +405,9 @@ :10194000B90AB501882777FD8095982FC09082004D :10195000D0908300E0908400F0908500C60ED71EE2 :10196000E81EF91EC0928200D0928300E0928400AB -:10197000F09285000E94FC102CEE31E548EB5DE30F +:10197000F09285000E94FC1026EB33EF4DE75DE30B :101980000E94E9112B013C01C701B6010E94FC1025 -:1019900024E330E847E35AE30E94E9119B01AC01DC +:1019900021E539E44DE95AE30E94E9119B01AC01CC :1019A000C301B2010E94F60F6B017C0180917A00A5 :1019B00090917B00B501681B790B882777FD809596 :1019C000982F0E94FC1020E030E0A9010E94E9114C