webots
webots copied to clipboard
recognitionColors to all objects
Description
This PR add the recognitionColors field to all .proto files in projects/objects/ that have a BaseNode of the Type Solid, and dont contain recognitionColors yet or the tag hidden
I added a script scripts\proto_splitter\protoBatchEdit.py which did the conversion as a batch. It is based on the proto2mesh script Olivier and I created a while back. It is not very cleaned up and documented, but it works and might come in handy in the future.
* alignment of newly added PROTO header parameters should be fixed in all the files: field name, default value and description should be correctly aligned with the other existing fields
This will be a bit more tricky, as they are different for every file, but I will try to figure something out.
* Objects documentation should be regenerated by running the script `docs/guide/generate_objects_doc.py`
I simply run the script with no arguments, after the altered Proto files are in projects/objects?
I also included 'Robot' basenodes in this one. Issues should be adressed.
I ran python .\generate_objects_doc.py , however it does not seem to update the proto headers in the .md files. Perhaps you can try it out and see for yourself.
I figured it out. The script uses the WEBOTS_HOME directory, not the directory relative to the script itself. My webots git repository is not my WEBOTS_HOME env_var. Setting it manually before executing the script worked. Perhaps changing the script to do a relative import of proto files might be the better way to go.
Setting it manually before executing the script worked. Perhaps changing the script to do a relative import of proto files might be the better way to go.
It is fundamentally wrong to work on a Webots repository if the WEBOTS_HOME is set to a different location. Many different functionalities relies on WEBOTS_HOME and you will have a set of other issues doing it. So it is not necessary to change the documentation script and use relative import of files.
I am closing this stalled PR for now. Feel free to re-open if needed.