-
Notifications
You must be signed in to change notification settings - Fork 1
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
Add parameters to visual states tool. #1
Conversation
It also checks for duplicate parameters and asks user to resolve them. Shows the parameters imported after the import.
Hi @sudo-panda . I was trying testing the above changes. I am facing the error below -
What might be the issue? |
Seems like ROS doesn't allow absolute imports. It should be fixed now. |
Yes, it works now. please follow this convention in other files too. |
Please share the most recent XML file of Kobuki Obstacle Avoidance behavior which is supporting parameters. |
The file is available as a gist here |
Dear @sudo-panda, there is a small error in handling the id based parameters. To reproduce the error:
You assume that the initial ids are same always and add new variables based on the size of the list. However, if you remove a parameter in the list and add a new parameter, you have two parameters having the same id. I think it could be better strategy to keep paremeter objects indexed/keyed by the parameter name which is supposed to be unique. That way you will have a unique key to access all parameters and you will get rid of struggling of integer ids that you make up. |
@sudo-panda your fix handles the crash, but after removing all the parameters and closing the dialog and reopening the dialog shows me the parameters that are supposed to be deleted. As I said in my previous comment, can you reimplement handling of the parameters. You do not need artificial integer indexes as id. They complicate the code. Since the parameter name is supposed to be unique, you can use them to store parameters in dict keyed with name. |
The dictionary of parameters seems odd as parameter is an object which already has a name property so I changed only the Namespace Dialog to use a dictionary to store parameters. It makes sense there due to the need of accessing each parameter separately in random order. Whereas everywhere else it makes no difference as to them being accessed serially or in random order as all of them are accessed one after the other. |
Found a minor bug in the PR. #6 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, please remove the .idea files or add them to .gitignore.
|
This solves #6.
@sudo-panda The .idea files are still redundant. These files are software dependent files and we don't need it in the tool. Could you please remove them. |
I am working on it right now. |
Also @sudo-panda , we need to display the naming conventions for the parameters while displaying the parameter name error. Rest the PR seems great. Good work! Could you sum up the parametrization and the import-export library PRs and make a comprehensive PR on the main VisualStates repository. https://github.com/jderobot/VisualStates |
This feature includes the following: