Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved diagnostics for AksIM2 encoder #341

Merged
merged 3 commits into from
Feb 22, 2023
Merged

Conversation

sgiraz
Copy link
Contributor

@sgiraz sgiraz commented Feb 16, 2023

What's new:

  • The EoappEncoderReader now uses the error manager to directly transmit diagnostic for the AksIM2 encoder

Notes:

  • the control loop runs at 1 ms, hence in case of AksIM errors, actually there are up to 3 different kinds of diagnostics messages transmitted to the yarprobotinterface
  • within the hal_spiencoder probably the type inside the diagnostic is unnecessary, we can leave or remove them (let's decide in this PR if possible)

@sgiraz sgiraz self-assigned this Feb 16, 2023
@sgiraz
Copy link
Contributor Author

sgiraz commented Feb 17, 2023

Here is a log the yarprobotinterface showing the diagnostics of AksIM2 on 5-improved-joint setup:

Click me: log_aksim2
Microsoft Windows [Version 10.0.22621.1194]
(c) Microsoft Corporation. All rights reserved.

C:\dev\robots-configuration>cd experimentalSetups

C:\dev\robots-configuration\experimentalSetups>cd 5-improvedJoint 

C:\dev\robots-configuration\experimentalSetups\5-improvedJoint>dir
 Volume in drive C is OS
 Volume Serial Number is 5EF1-0C3D

 Directory of C:\dev\robots-configuration\experimentalSetups\5-improvedJoint

02/10/2023  11:30 AM    <DIR>          .
02/10/2023  11:30 AM    <DIR>          ..
02/10/2023  11:30 AM               745 5-setup.xml
02/10/2023  11:30 AM    <DIR>          calibrators
02/10/2023  11:30 AM               574 CMakeLists.txt
02/10/2023  11:30 AM                22 firmwareupdater.ini
02/10/2023  11:30 AM               528 general.xml
02/10/2023  11:30 AM    <DIR>          hardware
02/10/2023  11:30 AM             3,052 network.5-setup.xml
02/10/2023  11:30 AM    <DIR>          wrappers
02/10/2023  11:30 AM               164 yarpmotorgui.ini
02/10/2023  11:30 AM                24 yarprobotinterface.ini
               7 File(s)          5,109 bytes
               5 Dir(s)  107,790,295,040 bytes free

C:\dev\robots-configuration\experimentalSetups\5-improvedJoint>yarprobotinterface    
[DEBUG] Reading file C:\dev\robots-configuration\experimentalSetups\5-improvedJoint\.\5-setup.xml
[DEBUG] yarprobotinterface: using xml parser for DTD v3.x
[DEBUG] Reading file C:\dev\robots-configuration\experimentalSetups\5-improvedJoint\.\5-setup.xml
[DEBUG] Preprocessor complete in:  0.0136135 s
[WARNING] *************************************************************************************
* yarprobotinterface 'portprefix' parameter does not follow convention,  *
* it MUST start with a leading '/' since it is used as the full prefix port name    *
*     name:    full port prefix name with leading '/',  e.g.  /robotName      *
* A temporary automatic fix will be done for you, but please fix your config file   *
*************************************************************************************
[INFO] |yarp.os.Port|/icub/yarprobotinterface| Port /icub/yarprobotinterface active at tcp://10.0.1.104:10002/
[INFO] startup phase starting...
[INFO] Opening device 5-setup-mc_nws_yarp with parameters [("PC104" [group] = "(PC104IpAddress 10.0.1.104) (PC104IpPort 12345) (PC104TXrate 1) (PC104RXrate 5)"), ("robotName" = "icub"), ("period" = "0.01"), ("name" = "/icub/5-setup")]
[DEBUG] |yarp.dev.PolyDriver|5-setup-mc_nws_yarp| Parameters are (PC104 (PC104IpAddress "10.0.1.104") (PC104IpPort 12345) (PC104TXrate 1) (PC104RXrate 5)) (device controlBoard_nws_yarp) (id "5-setup-mc_nws_yarp") (name "/icub/5-setup") (period 0.01) (robotName icub)
[INFO] |yarp.os.Port|/icub/5-setup/rpc:i| Port /icub/5-setup/rpc:i active at tcp://10.0.1.104:10003/
[INFO] |yarp.os.Port|/icub/5-setup/command:i| Port /icub/5-setup/command:i active at tcp://10.0.1.104:10004/
[INFO] |yarp.os.Port|/icub/5-setup/state:o| Port /icub/5-setup/state:o active at tcp://10.0.1.104:10005/
[INFO] |yarp.os.Port|/icub/5-setup/stateExt:o| Port /icub/5-setup/stateExt:o active at tcp://10.0.1.104:10006/
[INFO] |yarp.dev.PolyDriver|5-setup-mc_nws_yarp| Created wrapper <controlBoard_nws_yarp>. See C++ class ControlBoard_nws_yarp for documentation.
[INFO] Opening device 5-setup-mc_remapper with parameters [("PC104" [group] = "(PC104IpAddress 10.0.1.104) (PC104IpPort 12345) (PC104TXrate 1) (PC104RXrate 5)"), ("robotName" = "icub"), ("networks" = "(5-setup_joints)"), ("5-setup_joints" = "( 0 0 0 0 )"), ("joints" = "1")]
[DEBUG] |yarp.dev.PolyDriver|5-setup-mc_remapper| Parameters are ("5-setup_joints" (0 0 0 0)) (PC104 (PC104IpAddress "10.0.1.104") (PC104IpPort 12345) (PC104TXrate 1) (PC104RXrate 5)) (device controlboardremapper) (id "5-setup-mc_remapper") (joints 1) (networks ("5-setup_joints")) (robotName icub)
[INFO] |yarp.dev.PolyDriver|5-setup-mc_remapper| Created device <controlboardremapper>. See C++ class ControlBoardRemapper for documentation.
[INFO] Opening device 5-setup-mc with parameters [("PC104" [group] = "(PC104IpAddress 10.0.1.104) (PC104IpPort 12345) (PC104TXrate 1) (PC104RXrate 5)"), ("robotName" = "icub"), ("GENERAL" [group] = "(skipCalibration false) (useRawEncoderData false) (useLimitedPWM false) (verbose false)"), ("PC104" [group] = "(PC104IpAddress 10.0.1.104) (PC104IpPort 12345) (PC104TXrate 1) (PC104RXrate 5)"), ("ETH_BOARD" [group] = "(ETH_BOARD_PROPERTIES (IpAddress 10.0.1.7) (IpPort 12345) (Type ems4) (maxSizeRXpacket 768) (maxSizeROP 384)) (ETH_BOARD_SETTINGS (Name "5-setup") (RUNNINGMODE (period 1000) (maxTimeOfRXactivity 400) (maxTimeOfDOactivity 300) (maxTimeOfTXactivity 300) (TXrateOfRegularROPs 5))) (ETH_BOARD_ACTIONS (MONITOR_ITS_PRESENCE (enabled true) (timeout 0.020) (periodOfMissingReport 60.0)))"), ("GENERAL" [group] = "(MotioncontrolVersion 6) (Joints 1) (AxisMap 0) (AxisName "setup") (AxisType "revolute") (Encoder 182.044) (fullscalePWM 32000) (ampsToSensor 1000.0) (Gearbox_M2J 160) (Gearbox_E2J 1) (useMotorSpeedFbk 1) (MotorType "MOOG_C2900576") (Verbose 0)"), ("LIMITS" [group] = "(hardwareJntPosMax 180) (hardwareJntPosMin -180) (rotorPosMin 0) (rotorPosMax 0)"), ("2FOC" [group] = "(Verbose 0) (AutoCalibration 0) (HasHallSensor 0) (HasTempSensor 0) (HasRotorEncoder 1) (HasRotorEncoderIndex 1) (HasSpeedEncoder 0) (RotorIndexOffset 339) (MotorPoles 20)"), ("COUPLINGS" [group] = "(matrixJ2M 1.000 0.000 0.000 0.000 0.000 1.000 0.000 0.000 0.000 0.000 1.000 0.000 0.000 0.000 0.000 1.000) (matrixM2J 1.000 0.000 0.000 0.000 0.000 1.000 0.000 0.000 0.000 0.000 1.000 0.000 0.000 0.000 0.000 1.000) (matrixE2J 1.00 0.00 0.00 0.00 0.00 0.00 0.00 1.00 0.00 0.00 0.00 0.00 0.00 0.00 1.00 0.00 0.00 0.00 0.00 0.00 0.00 1.00 0.00 0.00)"), ("JOINTSET_CFG" [group] = "(numberofsets 1) (JOINTSET_0 (listofjoints 0) (constraint none) (param1 0) (param2 0))"), ("SERVICE" [group] = "(type eomn_serv_MC_foc) (PROPERTIES (ETHBOARD (type ems4)) (CANBOARDS (type foc) (PROTOCOL (major 1) (minor 6)) (FIRMWARE (major 0) (minor 0) (build 0))) (JOINTMAPPING (ACTUATOR (type eomc_act_foc) (port CAN1:1:0)) (ENCODER1 (type eomc_enc_aksim2) (port CONN:P6) (position eomc_pos_atjoint) (resolution 524288) (tolerance 0.7)) (ENCODER2 (type roie) (port CAN1:1:0) (position atmotor) (resolution 5200) (tolerance 3.6))))"), ("LIMITS" [group] = "(jntPosMax 180) (jntPosMin -180) (jntVelMax 18000) (motorNominalCurrents 20000) (motorPeakCurrents 20000) (motorOverloadCurrents 20000) (motorPwmLimit 32000)"), ("TIMEOUTS" [group] = "(velocity 100)"), ("IMPEDANCE" [group] = "(stiffness 0) (damping 0)"), ("CONTROLS" [group] = "(positionControl POS_PID_DEFAULT) (velocityControl POS_PID_DEFAULT) (mixedControl POS_PID_DEFAULT) (torqueControl TRQ_PID_DEFAULT) (currentPid 2FOC_CUR_CONTROL) (speedPid 2FOC_VEL_CONTROL)"), ("POS_PID_DEFAULT" [group] = "(controlLaw minjerk) (outputType pwm) (fbkControlUnits metric_units) (outputControlUnits machine_units) (kp 500) (kd 0) (ki 100) (maxOutput 32000) (maxInt 3000) (stictionUp 0) (stictionDown 0) (kff 0)"), ("TRQ_PID_DEFAULT" [group] = "(controlLaw torque) (outputType current) (fbkControlUnits machine_units) (outputControlUnits machine_units) (kp 1.8) (kd 0) (ki 0) (maxOutput 2000) (maxInt 1000) (ko 0.55) (stictionUp 0) (stictionDown 0) (kff 0) (kbemf 0) (filterType 3) (ktau 0) (viscousPos 1.0) (viscousNeg 1.0) (coulombPos 0.0) (coulombNeg 0.0)"), ("2FOC_CUR_CONTROL" [group] = "(controlLaw low_lev_current) (fbkControlUnits machine_units) (outputControlUnits machine_units) (kp 8) (kd 0) (ki 2) (shift 10) (maxOutput 32000) (maxInt 32000) (kff 0)"), ("2FOC_VEL_CONTROL" [group] = "(controlLaw low_lev_speed) (fbkControlUnits machine_units) (outputControlUnits machine_units) (kff 0) (kp 12) (kd 0) (ki 16) (shift 10) (maxOutput 32000) (maxInt 32000)"), ("OTHER_CONTROL_PARAMETERS" [group] = "(deadZone 0.0049)")]
[DEBUG] |yarp.dev.PolyDriver|5-setup-mc| Parameters are ("2FOC" (Verbose 0) (AutoCalibration 0) (HasHallSensor 0) (HasTempSensor 0) (HasRotorEncoder 1) (HasRotorEncoderIndex 1) (HasSpeedEncoder 0) (RotorIndexOffset 339) (MotorPoles 20)) ("2FOC_CUR_CONTROL" (controlLaw low_lev_current) (fbkControlUnits machine_units) (outputControlUnits machine_units) (kp 8) (kd 0) (ki 2) (shift 10) (maxOutput 32000) (maxInt 32000) (kff 0)) ("2FOC_VEL_CONTROL" (controlLaw low_lev_speed) (fbkControlUnits machine_units) (outputControlUnits machine_units) (kff 0) (kp 12) (kd 0) (ki 16) (shift 10) (maxOutput 32000) (maxInt 32000)) (CONTROLS (positionControl POS_PID_DEFAULT) (velocityControl POS_PID_DEFAULT) (mixedControl POS_PID_DEFAULT) (torqueControl TRQ_PID_DEFAULT) (currentPid "2FOC_CUR_CONTROL") (speedPid "2FOC_VEL_CONTROL")) (COUPLINGS (matrixJ2M 1.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 1.0) (matrixM2J 1.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 1.0) (matrixE2J 1.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0)) (ETH_BOARD (ETH_BOARD_PROPERTIES (IpAddress "10.0.1.7") (IpPort 12345) (Type ems4) (maxSizeRXpacket 768) (maxSizeROP 384)) (ETH_BOARD_SETTINGS (Name "5-setup") (RUNNINGMODE (period 1000) (maxTimeOfRXactivity 400) (maxTimeOfDOactivity 300) (maxTimeOfTXactivity 300) (TXrateOfRegularROPs 5))) (ETH_BOARD_ACTIONS (MONITOR_ITS_PRESENCE (enabled true) (timeout 0.02) (periodOfMissingReport 60.0)))) (GENERAL (skipCalibration false) (useRawEncoderData false) (useLimitedPWM false) (verbose false) (MotioncontrolVersion 6) (Joints 1) (AxisMap 0) (AxisName setup) (AxisType revolute) (Encoder 182.04400000000001) (fullscalePWM 32000) (ampsToSensor 1000.0) (Gearbox_M2J 160) (Gearbox_E2J 1) (useMotorSpeedFbk 1) (MotorType MOOG_C2900576) (Verbose 0)) (IMPEDANCE (stiffness 0) (damping 0)) (JOINTSET_CFG (numberofsets 1) (JOINTSET_0 (listofjoints 0) (constraint none) (param1 0) (param2 0))) (LIMITS (hardwareJntPosMax 180) (hardwareJntPosMin -180) (rotorPosMin 0) (rotorPosMax 0) (jntPosMax 180) (jntPosMin -180) (jntVelMax 18000) (motorNominalCurrents 20000) (motorPeakCurrents 20000) (motorOverloadCurrents 20000) (motorPwmLimit 32000)) (OTHER_CONTROL_PARAMETERS (deadZone 0.0048999999999999998)) (PC104 (PC104IpAddress "10.0.1.104") (PC104IpPort 12345) (PC104TXrate 1) (PC104RXrate 5) (PC104IpAddress "10.0.1.104") (PC104IpPort 12345) (PC104TXrate 1) (PC104RXrate 5)) (POS_PID_DEFAULT (controlLaw minjerk) (outputType pwm) (fbkControlUnits metric_units) (outputControlUnits machine_units) (kp 500) (kd 0) (ki 100) (maxOutput 32000) (maxInt 3000) (stictionUp 0) (stictionDown 0) (kff 0)) (SERVICE (type eomn_serv_MC_foc) (PROPERTIES (ETHBOARD (type ems4)) (CANBOARDS (type foc) (PROTOCOL (major 1) (minor 6)) (FIRMWARE (major 0) (minor 0) (build 0))) (JOINTMAPPING (ACTUATOR (type eomc_act_foc) (port "CAN1:1:0")) (ENCODER1 (type eomc_enc_aksim2) (port "CONN:P6") (position eomc_pos_atjoint) (resolution 524288) (tolerance 0.69999999999999996)) (ENCODER2 (type roie) (port "CAN1:1:0") (position atmotor) (resolution 5200) (tolerance 3.6000000000000001))))) (TIMEOUTS (velocity 100)) (TRQ_PID_DEFAULT (controlLaw torque) (outputType current) (fbkControlUnits machine_units) (outputControlUnits machine_units) (kp 1.8) (kd 0) (ki 0) (maxOutput 2000) (maxInt 1000) (ko 0.55000000000000004) (stictionUp 0) (stictionDown 0) (kff 0) (kbemf 0) (filterType 3) (ktau 0) (viscousPos 1.0) (viscousNeg 1.0) (coulombPos 0.0) (coulombNeg 0.0)) (device embObjMotionControl) (id "5-setup-mc") (robotName icub)
[DEBUG] eth::parser::print(pc104Data) for PC104:
[DEBUG] PC104/PC104IpAddress:PC104IpPort =  10.0.1.104:12345
[DEBUG] PC104/PC104TXrate =  1
[DEBUG] PC104/PC104RXrate =  5
[DEBUG] EthSender is a PeriodicThread with txrate = 1 ms
[DEBUG] EthReceiver is a PeriodicThread with rxrate = 5 ms
[WARNING] in EthReceiver::config() the config socket has queue size =  1048576 ; you request ETHRECEIVER_BUFFER_SIZE=
[DEBUG] eth::parser::print(boardData) for BOARD "5-setup"
[DEBUG] ETH_BOARD/ETH_BOARD_PROPERTIES:
[DEBUG] ETH_BOARD/ETH_BOARD_PROPERTIES/IpAddress =  10.0.1.7
[DEBUG] ETH_BOARD/ETH_BOARD_PROPERTIES/IpPort =  12345
[DEBUG] ETH_BOARD/ETH_BOARD_PROPERTIES/Type =  ems4
[DEBUG] ETH_BOARD/ETH_BOARD_PROPERTIES/maxSizeRXpacket =  768
[DEBUG] ETH_BOARD/ETH_BOARD_PROPERTIES/maxSizeROP =  384
[DEBUG] ETH_BOARD/ETH_BOARD_SETTINGS:
[DEBUG] ETH_BOARD/ETH_BOARD_SETTINGS/Name =  "5-setup"
[DEBUG] ETH_BOARD/ETH_BOARD_SETTINGS/RUNNINGMODE/(period, maxTimeOfRXactivity, maxTimeOfDOactivity, maxTimeOfTXactivity, TXrateOfRegularROPs) =  1000 400 300 300 5
[DEBUG] ETH_BOARD/ETH_BOARD_ACTIONS/MONITOR_ITS_PRESENCE
[DEBUG] ETH_BOARD/ETH_BOARD_ACTIONS/MONITOR_ITS_PRESENCE/(enabled, timeout, periodOfMissingReport) =  true 0.02 60
[DEBUG] eth::EthMonitorPresence::config(): monitoring of presence is ON for BOARD 10.0.1.7 ("5-setup") with timeout = 0.02 sec and period of missing report = 60 sec
[DEBUG] TheEthManager::requestResource2(): has just succesfully created a new EthResource for board of type ems4 with IP =  10.0.1.7
[WARNING] embObjMC BOARD  "5-setup" Missing KALMAN_FILTER group. Kalman Filter will be disabled by default.
[DEBUG] EthResource::verifyBoardPresence() found BOARD "5-setup" with IP 10.0.1.7 after 0.0016492 seconds
[DEBUG] EthResource::verifyBoardTransceiver() has validated the transceiver of BOARD "5-setup" with IP 10.0.1.7
[DEBUG] EthResource::cleanBoardBehaviour() has cleaned the application in BOARD "5-setup" with IP 10.0.1.7 : config mode + cleared all its regulars
[DEBUG] EthResource::setTimingOfRunningCycle() for BOARD "5-setup" with IP 10.0.1.7 has succesfully set: cycletime = 1000 usec, RX DO TX = ( 400 300 300 ) usec and TX rate = 5  every cycle
[INFO] EthResource::askBoardVersion() found BOARD "5-setup" @ IP 10.0.1.7 of type ems4 with FW = ver 3.60 built on 2023 Jan 25 12:11
[ERROR]  from BOARD 10.0.1.7 (α╡W$►☻), src LOCAL, adr 0, time 463s 279m 127u: (code 0x01000003, par16 0x0000 par64 0x0000000000000000) -> HW - encoder: the position data is not valid + .
[ERROR]  from BOARD 10.0.1.7 (α╡W$►☻), src LOCAL, adr 0, time 463s 279m 247u: (code 0x01000004, par16 0x0000 par64 0x0000000000000000) -> HW - encoder: the position data is valid, but some operating conditions are close to limits. + .
[ERROR]  from BOARD 10.0.1.7 (α╡W$►☻), src LOCAL, adr 0, time 463s 279m 350u: (code 0x01000005, par16 0x0000 par64 0x0000000000000000) -> HW - encoder: inverted CRC is invalid + .
[DEBUG]  from BOARD 10.0.1.7 (α╡W$►☻), src LOCAL, adr 0, time 463s 279m 638u: (code 0x05000015, par16 0x1000 par64 0x00000000000f0000) -> CFG: EOtheEncoderReader can be correctly configured. p16&0xf000: number of joint; primary encs: failure mask in p16&0x000f and errorcodes in p64&0x0000ffff; secondary encs: failure mask in p16&0x00f0 and errorcodes in p64&0xffff0000 + .
[INFO]  from BOARD 10.0.1.7 (α╡W$►☻) @ 463s 279m 807u: CAN discovery has started for 1 eobrd_foc boards on (can1map, can2map) = (0x0002, 0x0000) with target can protocol ver 1.6 and application ver 0.0.0.
[INFO]  from BOARD 10.0.1.7 (α╡W$►☻) @ 463s 280m 200u: CAN discovery has detected a eobrd_foc board in CAN1 addr 1 with can protocol ver 1.6 and application ver 3.5.3 Search time was 0 ms
[INFO]  from BOARD 10.0.1.7 (α╡W$►☻) @ 463s 280m 362u: CAN discovery is OK for 1 eobrd_foc boards with target can protocol ver 1.6 and application ver 0.0.0. Search time was 0 ms
[DEBUG] embObjMotionControl:serviceVerifyActivate OK!
[DEBUG]  from BOARD 10.0.1.7 (α╡W$►☻), src LOCAL, adr 0, time 463s 280m 667u: (code 0x0500000d, par16 0x0000 par64 0x0000000000000000) -> CFG: EOtheMotionController can correctly configure 2foc-based motion. more info will follow + .
[DEBUG]  from BOARD 10.0.1.7 (α╡W$►☻), src LOCAL, adr 0, time 463s 321m 391u: (code 0x04000001, par16 0x000f par64 0x0000010000000040) -> DEBUG: tag01 + CURRENT PID
[DEBUG]  from BOARD 10.0.1.7 (α╡W$►☻), src LOCAL, adr 0, time 463s 321m 505u: (code 0x04000001, par16 0x000f par64 0x0000018000000200) -> DEBUG: tag01 + VELOCITY PID
[INFO] |yarp.dev.PolyDriver|5-setup-mc| Created device <embObjMotionControl>. See C++ class yarp::dev::embObjMotionControl for documentation.
[ERROR]  from BOARD 10.0.1.7 (α╡W$►☻), src LOCAL, adr 0, time 463s 336m 92u: (code 0x01000003, par16 0x0000 par64 0x0000000000000000) -> HW - encoder: the position data is not valid + .
[ERROR]  from BOARD 10.0.1.7 (α╡W$►☻), src LOCAL, adr 0, time 463s 336m 211u: (code 0x01000004, par16 0x0000 par64 0x0000000000000000) -> HW - encoder: the position data is valid, but some operating conditions are close to limits. + .
[ERROR]  from BOARD 10.0.1.7 (α╡W$►☻), src LOCAL, adr 0, time 463s 336m 318u: (code 0x01000005, par16 0x0000 par64 0x0000000000000000) -> HW - encoder: inverted CRC is invalid + .
[ERROR]  from BOARD 10.0.1.7 (α╡W$►☻), src LOCAL, adr 0, time 463s 337m 92u: (code 0x01000003, par16 0x0000 par64 0x0000000000000000) -> HW - encoder: the position data is not valid + .
[ERROR]  from BOARD 10.0.1.7 (α╡W$►☻), src LOCAL, adr 0, time 463s 337m 210u: (code 0x01000004, par16 0x0000 par64 0x0000000000000000) -> HW - encoder: the position data is valid, but some operating conditions are close to limits. + .
[ERROR]  from BOARD 10.0.1.7 (α╡W$►☻), src LOCAL, adr 0, time 463s 337m 318u: (code 0x01000005, par16 0x0000 par64 0x0000000000000000) -> HW - encoder: inverted CRC is invalid + .
[ERROR]  from BOARD 10.0.1.7 (α╡W$►☻), src LOCAL, adr 0, time 463s 338m 92u: (code 0x01000003, par16 0x0000 par64 0x0000000000000000) -> HW - encoder: the position data is not valid + .
[ERROR]  from BOARD 10.0.1.7 (α╡W$►☻), src LOCAL, adr 0, time 463s 338m 210u: (code 0x01000004, par16 0x0000 par64 0x0000000000000000) -> HW - encoder: the position data is valid, but some operating conditions are close to limits. + .
[ERROR]  from BOARD 10.0.1.7 (α╡W$►☻), src LOCAL, adr 0, time 463s 338m 318u: (code 0x01000005, par16 0x0000 par64 0x0000000000000000) -> HW - encoder: inverted CRC is invalid + .
[ERROR]  from BOARD 10.0.1.7 (α╡W$►☻), src LOCAL, adr 0, time 463s 339m 92u: (code 0x01000003, par16 0x0000 par64 0x0000000000000000) -> HW - encoder: the position data is not valid + .
[ERROR]  from BOARD 10.0.1.7 (α╡W$►☻), src LOCAL, adr 0, time 463s 339m 210u: (code 0x01000004, par16 0x0000 par64 0x0000000000000000) -> HW - encoder: the position data is valid, but some operating conditions are close to limits. + .
[ERROR]  from BOARD 10.0.1.7 (α╡W$►☻), src LOCAL, adr 0, time 463s 339m 318u: (code 0x01000005, par16 0x0000 par64 0x0000000000000000) -> HW - encoder: inverted CRC is invalid + .
[ERROR]  from BOARD 10.0.1.7 (α╡W$►☻), src LOCAL, adr 0, time 463s 340m 92u: (code 0x01000003, par16 0x0000 par64 0x0000000000000000) -> HW - encoder: the position data is not valid + .
[ERROR]  from BOARD 10.0.1.7 (α╡W$►☻), src LOCAL, adr 0, time 463s 340m 210u: (code 0x01000004, par16 0x0000 par64 0x0000000000000000) -> HW - encoder: the position data is valid, but some operating conditions are close to limits. + .
[ERROR]  from BOARD 10.0.1.7 (α╡W$►☻), src LOCAL, adr 0, time 463s 340m 318u: (code 0x01000005, par16 0x0000 par64 0x0000000000000000) -> HW - encoder: inverted CRC is invalid + .
[ERROR]  from BOARD 10.0.1.7 (α╡W$►☻), src LOCAL, adr 0, time 463s 341m 92u: (code 0x01000003, par16 0x0000 par64 0x0000000000000000) -> HW - encoder: the position data is not valid + .
[INFO] Opening device 5-setup-calibrator with parameters [("PC104" [group] = "(PC104IpAddress 10.0.1.104) (PC104IpPort 12345) (PC104TXrate 1) (PC104RXrate 5)"), ("robotName" = "icub"), ("GENERAL" [group] = "(skipCalibration false) (useRawEncoderData false) (useLimitedPWM false) (verbose false)"), ("GENERAL" [group] = "(joints 1) (deviceName 5-Setup_Calibrator)"), ("HOME" [group] = "(positionHome 0) (velocityHome 10)"), ("CALIBRATION" [group] = "(calibrationType 12) (calibration1 64473) (calibration2 0) (calibration3 0) (calibration4 0) (calibration5 0) (calibrationZero 0) (calibrationDelta 0) (startupPosition 0) (startupVelocity 30) (startupMaxPwm 32000) (startupPosThreshold 2)"), ("CALIB_ORDER" = "(0)")]
[ERROR]  from BOARD 10.0.1.7 (α╡W$►☻), src LOCAL, adr 0, time 463s 341m 210u: (code 0x01000004, par16 0x0000 par64 0x0000000000000000) -> HW - encoder: the position data is valid, but some operating conditions are close to limits. + .
[ERROR]  from BOARD 10.0.1.7 (α╡W$►☻), src LOCAL, adr 0, time 463s 341m 318u: (code 0x01000005, par16 0x0000 par64 0x0000000000000000) -> HW - encoder: inverted CRC is invalid + .
[ERROR]  from BOARD 10.0.1.7 (α╡W$►☻), src LOCAL, adr 0, time 463s 342m 92u: (code 0x01000003, par16 0x0000 par64 0x0000000000000000) -> HW - encoder: the position data is not valid + .
[ERROR]  from BOARD 10.0.1.7 (α╡W$►☻), src LOCAL, adr 0, time 463s 342m 210u: (code 0x01000004, par16 0x0000 par64 0x0000000000000000) -> HW - encoder: the position data is valid, but some operating conditions are close to limits. + .
[ERROR]  from BOARD 10.0.1.7 (α╡W$►☻), src LOCAL, adr 0, time 463s 342m 318u: (code 0x01000005, par16 0x0000 par64 0x0000000000000000) -> HW - encoder: inverted CRC is invalid + .
[ERROR]  from BOARD 10.0.1.7 (α╡W$►☻), src LOCAL, adr 0, time 463s 343m 93u: (code 0x01000003, par16 0x0000 par64 0x0000000000000000) -> HW - encoder: the position data is not valid + .
[ERROR]  from BOARD 10.0.1.7 (α╡W$►☻), src LOCAL, adr 0, time 463s 343m 211u: (code 0x01000004, par16 0x0000 par64 0x0000000000000000) -> HW - encoder: the position data is valid, but some operating conditions are close to limits. + .
[ERROR]  from BOARD 10.0.1.7 (α╡W$►☻), src LOCAL, adr 0, time 463s 343m 319u: (code 0x01000005, par16 0x0000 par64 0x0000000000000000) -> HW - encoder: inverted CRC is invalid + .
[ERROR]  from BOARD 10.0.1.7 (α╡W$►☻), src LOCAL, adr 0, time 463s 344m 92u: (code 0x01000003, par16 0x0000 par64 0x0000000000000000) -> HW - encoder: the position data is not valid + .
[ERROR]  from BOARD 10.0.1.7 (α╡W$►☻), src LOCAL, adr 0, time 463s 344m 210u: (code 0x01000004, par16 0x0000 par64 0x0000000000000000) -> HW - encoder: the position data is valid, but some operating conditions are close to limits. + .
[ERROR]  from BOARD 10.0.1.7 (α╡W$►☻), src LOCAL, adr 0, time 463s 344m 317u: (code 0x01000005, par16 0x0000 par64 0x0000000000000000) -> HW - encoder: inverted CRC is invalid + .
[ERROR]  from BOARD 10.0.1.7 (α╡W$►☻), src LOCAL, adr 0, time 463s 345m 92u: (code 0x01000003, par16 0x0000 par64 0x0000000000000000) -> HW - encoder: the position data is not valid + .
[ERROR]  from BOARD 10.0.1.7 (α╡W$►☻), src LOCAL, adr 0, time 463s 345m 210u: (code 0x01000004, par16 0x0000 par64 0x0000000000000000) -> HW - encoder: the position data is valid, but some operating conditions are close to limits. + .
[ERROR]  from BOARD 10.0.1.7 (α╡W$►☻), src LOCAL, adr 0, time 463s 345m 318u: (code 0x01000005, par16 0x0000 par64 0x0000000000000000) -> HW - encoder: inverted CRC is invalid + .
[ERROR]  from BOARD 10.0.1.7 (α╡W$►☻), src LOCAL, adr 0, time 463s 346m 93u: (code 0x01000003, par16 0x0000 par64 0x0000000000000000) -> HW - encoder: the position data is not valid + .
[ERROR]  from BOARD 10.0.1.7 (α╡W$►☻), src LOCAL, adr 0, time 463s 346m 211u: (code 0x01000004, par16 0x0000 par64 0x0000000000000000) -> HW - encoder: the position data is valid, but some operating conditions are close to limits. + .

@marcoaccame
Copy link
Contributor

@sgiraz sgiraz changed the title Update hal + EOappEncodersReader to manage the diagnostic for Aksim2 Improved diagnostics for AksIM2 encoder Feb 20, 2023
Copy link
Contributor

@marcoaccame marcoaccame left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @sgiraz, that all is fine to solve the need for more diagnostics info.
However, there are a few thing which will improve the whole iCub infrastructure:

  • in icub-firmware:
    • add in here the .lib of te recompiled hal,
    • add ne application versions for the ems, mac4plus, mc2plus
  • in icub-firmware-build:
    • create a PR for the new binaries
  • in icub-firmware-shared:
    • advance the version in CMakeLists.txt
  • in icub-main:
    • create a PR so that the compilation forces the use of the new icub-firmware-shared, so that the diagnostics message sre correctly printed.

@sgiraz
Copy link
Contributor Author

sgiraz commented Feb 21, 2023

  • in icub-firmware:

    • add in here the .lib of te recompiled hal,
    • add ne application versions for the ems, mac4plus, mc2plus
  • in icub-firmware-build:

    • create a PR for the new binaries
  • in icub-firmware-shared:

    • advance the version in CMakeLists.txt
  • in icub-main:

    • create a PR so that the compilation forces the use of the new icub-firmware-shared, so that the diagnostics message sre correctly printed.

Hi @marcoaccame, PRs open:

@sgiraz sgiraz requested a review from marcoaccame February 21, 2023 14:10
@marcoaccame
Copy link
Contributor

Hi @sgiraz, I will have a look at the PRs first thing tomorrow morning.

Copy link
Contributor

@marcoaccame marcoaccame left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

@marcoaccame marcoaccame merged commit 530a4d5 into robotology:devel Feb 22, 2023
if(0x01 == (0x01 & diag->info.aksim2_status_crc))
{
errdes.code = eoerror_code_get(eoerror_category_HardWare, eoerror_value_HW_encoder_crc);
eo_errman_Error(eo_errman_GetHandle(), eo_errortype_error, NULL, NULL, &errdes);
}

return eobool_true;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @sgiraz ,
I think that this function should return false if one or more errors occurred in order to let the above sw layers discard the value with errors. Otherwise false.

Moreover, since with this procedure, we send an explicit error message for each error event, the in/out parameter error should value encreader_err_NONE. In this way, in the block of code that takes care to send the diagnostic, it doesn't send anything despite of the value of filldiagnostics.

What do you think?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I noticed only now that my comment was pending...sorry!

@sgiraz we can discuss this together and do a fix. :)

Copy link
Contributor Author

@sgiraz sgiraz Feb 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No worries @valegagge!
As discussed f2f I gonna apply these fixies in a new PR on icub-firmware and icub-firmware-build.

cc @marcoaccame

valegagge pushed a commit to valegagge/icub-firmware that referenced this pull request May 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants