From b34a8b41d45f8c1fe1a399cbbcbd98b2e7f53977 Mon Sep 17 00:00:00 2001 From: Yohei Kakiuchi Date: Wed, 12 Sep 2018 00:05:43 +0900 Subject: [PATCH 1/2] [RobotHardware/robot.cpp] remove dummy read from gain file --- rtc/RobotHardware/robot.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/rtc/RobotHardware/robot.cpp b/rtc/RobotHardware/robot.cpp index 3e72c13c5d2..2027dd405db 100644 --- a/rtc/RobotHardware/robot.cpp +++ b/rtc/RobotHardware/robot.cpp @@ -135,21 +135,18 @@ bool robot::loadGain() default_pgain[i] = tmp; if(sstrm.eof()) break; - sstrm >> tmp; // dummy + sstrm >> tmp; // I gain if(sstrm.eof()) break; sstrm >> tmp; default_dgain[i] = tmp; if(sstrm.eof()) break; - sstrm >> tmp; // dummy - if(sstrm.eof()) break; - sstrm >> tmp; default_tqpgain[i] = tmp; if(sstrm.eof()) break; - sstrm >> tmp; // dummy + sstrm >> tmp; // I gain for torque if(sstrm.eof()) break; sstrm >> tmp; From 165a7f163b1d17ebd944e83ec0396ec64dc0f756 Mon Sep 17 00:00:00 2001 From: Yohei Kakiuchi Date: Wed, 12 Sep 2018 00:06:07 +0900 Subject: [PATCH 2/2] [RobotHardware] update description for a gain file --- rtc/RobotHardware/RobotHardware.txt | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/rtc/RobotHardware/RobotHardware.txt b/rtc/RobotHardware/RobotHardware.txt index 8be5e4e0374..27d84980f63 100644 --- a/rtc/RobotHardware/RobotHardware.txt +++ b/rtc/RobotHardware/RobotHardware.txt @@ -73,7 +73,31 @@ N/A modelstd::stringURL of a VRML model sensor_id.right_leg_force_sensorunsigned intID of a force/torque sensor whose Z force is checked to detect emergency sensor_id.leg_leg_force_sensorunsigned intID of a force/torque sensor whose Z force is checked to detect emergency +pdgains.file_namestringSettings of controller gain for low level hardware. default value: "Pdgains.sav" +\subsection gainfile How to write a PDgain file + +@par +A line should have maximum 6 numbers. +The first is P gain, the second is I gain, the 3rd is D gain, +the 4th is torque P gain, the 5th is torque I gain, and the 6th is torque D gain. +@par +A line which is blank line and starts with '#' is ignored. +@par +Example of gain file: +@code +# gain settings +# p_gain i_gain d_gain torque p_gain torque i_gain torque d_gain +# arm +100 0 10 +100 0 10 + +10 0 1 +10 0 1 + +1000 100 10 2000 200 20 + +@endcode */