Errror: Undefined function 'getActionInfo' for input arguments of type 'struct'.
Mostra commenti meno recenti
Hi
This would work previously. I now get an error when I try to test a RL agent. Is this an issue of data-type expected?
I have provided the error message as well as the properties of the agent Action and Observation objects.
Error message -> Undefined function 'getActionInfo' for input arguments of type 'struct'.
Agent and Observation objects:
>> DDPG_agent.agent.getActionInfo
rlNumericSpec with properties:
LowerLimit: 0
UpperLimit: 100
Name: [0×0 string]
Description: [0×0 string]
Dimension: [1 1]
DataType: "double"
>> DDPG_agent.agent.getObservationInfo
rlNumericSpec with properties:
LowerLimit: [3×1 double]
UpperLimit: [3×1 double]
Name: "observations"
Description: "controlled flow, error, integral of error"
Dimension: [3 1]
DataType: "double"
2 Commenti
Rajesh Siraskar
il 13 Set 2021
Modificato: Rajesh Siraskar
il 13 Set 2021
Emmanouil Tzorakoleftherakis
il 13 Set 2021
Where is the error in the code above? I don't see an error when you call getActionInfo. Can you attach a mat file with the required variables to reproduce this? Also, which release are you using?
Risposte (2)
Rajesh Siraskar
il 22 Set 2021
1 Commento
Emmanouil Tzorakoleftherakis
il 22 Set 2021
thanks. It is hard to pinpoint the error without a reproduction model, but it seems like you are using a struct somewhere you are not supposed to. Can you doublecheck?
Rajesh Siraskar
il 23 Set 2021
1 Commento
Emmanouil Tzorakoleftherakis
il 23 Set 2021
A couple of suggestions:
1) Make sure DDPG_agent.agent and PPO_agent.agent are the actual agent objects and not structs
2) In the Simulink model, make sure to change the 'Agent object' field in the RL Agent block to be PPO_agent.agent or DDPG_agent.agent as needed (I suspect you may have forgotten to do this)
Categorie
Scopri di più su Environments in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
