Hi,
i’ve this script.
The script works fine!
But…
after :foreach {…} statement it doesn’t execute nothing other!
For example a /log info “…” doesn’t works, or a command, or an IF statement… Nothing works after } of the :foreach statement.
I can’t realize what is blocking!
I tried to add { at begin of the script and } to close at the end but nothing.
If you do not need the value utside the script and store it for later user, change from global to local variable:
Semicolon are not needed at the end of the line anymore, only if you have more than one command at same line.
So change to this:
Good that you managed to solve it yourself. I tested
/log info "test"
and it worked. I never use that and use :log because you can call it wherever you are in ROS. I :log very often to debug my code and I use it as flags to see which line is buggy and if I get the correct values in the variables.