How to add new object - moevm/mse_visual_map_editor_for_duckietown GitHub Wiki

Adding new object

Two steps:

  1. Adding image of object
  2. Adding info about object

Adding image of object

Place image of object to directory in https://github.com/moevm/mse_visual_map_editor_for_duckietown/tree/devel/img with filename == <kind of object>.*

Adding info about object

Information about object stored in doc/info.json in the following format:

  • categories contains description of group of objects: group id and kinds of objects that are included in the group

Categories are used to form the menu on the left side of the application.

Note: if the object is not specified in any group, it cannot be accessed from the UI.

"categories": [
        {
            "lang": {"en": {"name": "Apriltag"}},
            "id": "apriltag", # "watchtower"/"objects"
            "elements": [...]
        }
]
  • info сontains information about the object and translations

Note: Objects not defined in this field are not recognized by the application.

"info": {
        "duckie": {
            "type": "object", # "watchtower"/"sing"/"apriltag"
            "icon": "img/objects/duckie.png",
            lang": {"en": {"name": "Duckie", "info": "Cute duckie"}},
}

More about info translation: Multi-language support. Elements info translation