-
Does anyone know how to convert the action from a np.array() to the Alpyne Action with "Double_Array"? I keep getting an error that I need a "Double Array", but the received type is an "Object". I tried a list, generator, etc. but I seem to get an error each time regarding the type of the variable. Code:
Error:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I was able to resolve this issue by adding a DOUBLE_ARRAY in constants.py Additionally, when using Action(), I used the optional dictionary instead of the kwargs to specify the name of the variable, the type (aka ~ "DOUBLE_ARRAY"), value, and I left the units blank. Also, I would note that improperly defining the observation or action space sometimes resulted in an infinite loop with "wait_for_sim" function. The status would always return "FRESH". Additionally, when improperly setting up the observation or action space, I sometimes received an error "Sequence is off: 0". |
Beta Was this translation helpful? Give feedback.
I was able to resolve this issue by adding a DOUBLE_ARRAY in constants.py
Within the Enum InputTypes, I added a DOUBLE_ARRAY type, added DOUBLE_ARRAY return for from_value() function, and DOUBLE_ARRAY check for validate() function.
Additionally, when using Action(), I used the optional dictionary instead of the kwargs to specify the name of the variable, the type (aka ~ "DOUBLE_ARRAY"), value, and I left the units blank.
Also, I would note that improperly defining the observation or action space sometimes resulted in an infinite loop with "wait_for_sim" function. The status would always return "FRESH". Additionally, when improperly setting up the observation or action space, I sometimes r…