Errror: Undefined function 'getActionInfo' for input arguments of type 'struct'.
Show older comments
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 Comments
Rajesh Siraskar
on 13 Sep 2021
Edited: Rajesh Siraskar
on 13 Sep 2021
Emmanouil Tzorakoleftherakis
on 13 Sep 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?
Answers (2)
Rajesh Siraskar
on 22 Sep 2021
1 Comment
Emmanouil Tzorakoleftherakis
on 22 Sep 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
on 23 Sep 2021
1 Comment
Emmanouil Tzorakoleftherakis
on 23 Sep 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)
Categories
Find more on Environments in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!