Closed RPRKLR closed 1 week ago
Can you upload a screen shot of the relevant screens (dashboard, statemachine, and state properties) with data as you enter it? The WebUI attempts to validate and detect variable types, and clearly there are some special cases that are not handled. If you prefer not to upload, you can email me at https://flexbe.readthedocs.io/en/latest/contactinfo.html
I used an example with using BEStatus.RUNNING as text field for LogState.
I had to add the import to manual section of behavior before I could run the behavior.
# [MANUAL_IMPORT]
from flexbe_msgs.msg import BEStatus
# [/MANUAL_IMPORT]
but after doing so it ran fine.
@RPRKLR I'll need some more details if this is still an issue for you.
Thanks for the testing and reports. Keep them coming.
When I load in the behavior, I still get the Error in the terminal:
Unknown variable for parameter of LogStatus
Invalid parameter 'Statuses.IDLE' (reference) of LogStatus
But when I run the behavior, it can run with the custom interfaces.
The unknown variable is flagged and reported to terminal but it does not invalidate the state machine, so you can still run.
I will need to add any classes from manual imports to the list of potential matches for variables. The checks were put in place to flag when people forget to define userdata or constants in dashboard.
I understand, thank you for your help.
I'm going to leave this open until I make changes that will improve the handling of imported class definitions
My plan is to add a panel to the dashboard to display manual manual imports and to allow the user to directly add them to the class. I will then use that information in the checking routine. The import information is already loaded, but I think it will be helpful to allow the user to directly access the information instead of requiring the user to edit the source files.
Once that is in, I will consider any variable that uses an imported class as valid. That is if user specifies MyStatus.MY_STATUS_CONSTANT
in a field, I will assume it is a valid reference if they have imported MyStatus
class.
The beta-enhanced
branch should address most of this issue.
I have tested, and it does solves the issue, and also it is a great addition, that I can add the imports in flexbe.
This is fixed in flexbe_behavior_engine 4.0.0 in latest jazzy and ros2-devel branches and flexbe_webui in main branch
I have created a custom message type for ROS2, which I will refer to as
Statuses
. This custom message type consists of different constant integers and bytes, each representing a different state. For example,1
isIDLE
,2
isEXECUTION
, etc.When using these constants in FlexBE Web UI, I encounter an issue where the constants are not recognized, and I am forced to use the actual integer values instead. This makes it difficult to keep track of the different states in a larger project. Specifically, I receive the following error:
Unknown variable for parameter of LogStatus
Invalid parameter 'Statuses.IDLE' (reference) of LogStatus
Steps to Reproduce:
Statuses
.Expected Behavior:
Statuses.IDLE
instead of the integer1
.Actual Behavior:
I only encountered this issue with
webui
.Environment: