Skip to content

Commit cdd2794

Browse files
Benjamin Délèzestefaniapedrazziomichel
authored
Doc upgrade guide (cyberbotics#6231)
* add guide to convert worlds/protos * fix errors * fix errors * doc * typo * upper case * upper case * update welcome message * update translation * fix references to wiki * update translatioN * clang format * Update docs/guide/upgrading-webots.md Co-authored-by: Stefania Pedrazzi <stefaniapedrazzi@users.noreply.github.com> * Update docs/guide/upgrading-webots.md Co-authored-by: Stefania Pedrazzi <stefaniapedrazzi@users.noreply.github.com> * Update docs/guide/from-2023a-to-2023b.md Co-authored-by: Stefania Pedrazzi <stefaniapedrazzi@users.noreply.github.com> * Update src/webots/gui/WbUpdatedDialog.cpp Co-authored-by: Stefania Pedrazzi <stefaniapedrazzi@users.noreply.github.com> * Update docs/guide/upgrading-webots.md Co-authored-by: Stefania Pedrazzi <stefaniapedrazzi@users.noreply.github.com> * Update docs/guide/from-2023a-to-2023b.md Co-authored-by: Stefania Pedrazzi <stefaniapedrazzi@users.noreply.github.com> * Update docs/guide/from-2023a-to-2023b.md Co-authored-by: Stefania Pedrazzi <stefaniapedrazzi@users.noreply.github.com> * Update docs/guide/from-2023a-to-2023b.md Co-authored-by: Stefania Pedrazzi <stefaniapedrazzi@users.noreply.github.com> * Update docs/guide/from-2023a-to-2023b.md Co-authored-by: Stefania Pedrazzi <stefaniapedrazzi@users.noreply.github.com> * Update docs/guide/from-2023a-to-2023b.md Co-authored-by: Stefania Pedrazzi <stefaniapedrazzi@users.noreply.github.com> * Update docs/guide/from-2023a-to-2023b.md Co-authored-by: Stefania Pedrazzi <stefaniapedrazzi@users.noreply.github.com> * Update docs/guide/from-2023a-to-2023b.md Co-authored-by: Stefania Pedrazzi <stefaniapedrazzi@users.noreply.github.com> * Update docs/guide/from-2023a-to-2023b.md Co-authored-by: Stefania Pedrazzi <stefaniapedrazzi@users.noreply.github.com> * Update docs/guide/from-2023a-to-2023b.md Co-authored-by: Stefania Pedrazzi <stefaniapedrazzi@users.noreply.github.com> * Update docs/guide/from-2023a-to-2023b.md Co-authored-by: Stefania Pedrazzi <stefaniapedrazzi@users.noreply.github.com> * Update docs/guide/from-2023a-to-2023b.md Co-authored-by: Stefania Pedrazzi <stefaniapedrazzi@users.noreply.github.com> * remove notes * Link with general upgrade page * center images * local images * reverse order * mention version in scripts * Update docs/guide/upgrading-webots.md Co-authored-by: Olivier Michel <Olivier.Michel@cyberbotics.com> * Update docs/guide/from-2023a-to-2023b.md Co-authored-by: Olivier Michel <Olivier.Michel@cyberbotics.com> * Update docs/guide/from-2023a-to-2023b.md Co-authored-by: Olivier Michel <Olivier.Michel@cyberbotics.com> * Update docs/guide/from-2023a-to-2023b.md Co-authored-by: Olivier Michel <Olivier.Michel@cyberbotics.com> * Update docs/guide/from-2023a-to-2023b.md Co-authored-by: Olivier Michel <Olivier.Michel@cyberbotics.com> * Update docs/guide/from-2023a-to-2023b.md Co-authored-by: Olivier Michel <Olivier.Michel@cyberbotics.com> * Update docs/guide/from-2023a-to-2023b.md Co-authored-by: Olivier Michel <Olivier.Michel@cyberbotics.com> * Update docs/guide/from-2023a-to-2023b.md Co-authored-by: Olivier Michel <Olivier.Michel@cyberbotics.com> * Update docs/guide/from-2023a-to-2023b.md Co-authored-by: Olivier Michel <Olivier.Michel@cyberbotics.com> * Update docs/guide/from-2023a-to-2023b.md Co-authored-by: Olivier Michel <Olivier.Michel@cyberbotics.com> * Update docs/guide/from-2023a-to-2023b.md Co-authored-by: Olivier Michel <Olivier.Michel@cyberbotics.com> * Update docs/guide/from-2023a-to-2023b.md Co-authored-by: Olivier Michel <Olivier.Michel@cyberbotics.com> * upper * Update docs/guide/upgrading-webots.md Co-authored-by: Olivier Michel <Olivier.Michel@cyberbotics.com> * Update docs/guide/upgrading-webots.md Co-authored-by: Olivier Michel <Olivier.Michel@cyberbotics.com> * upper * Allow small verbs to be lowercase in titles * add mention of changelog * lower * Improved the title capitalization rules * More title capitalization improvements * More title capitalization rules * Minor * Update docs/guide/from-2021b-to-2022a.md Co-authored-by: Olivier Michel <Olivier.Michel@cyberbotics.com> * explain bold * Update docs/guide/from-2021b-to-2022a.md Co-authored-by: Stefania Pedrazzi <stefaniapedrazzi@users.noreply.github.com> * Update docs/guide/from-2022a-to-2022b.md Co-authored-by: Stefania Pedrazzi <stefaniapedrazzi@users.noreply.github.com> * Update docs/guide/from-2022a-to-2022b.md Co-authored-by: Stefania Pedrazzi <stefaniapedrazzi@users.noreply.github.com> --------- Co-authored-by: Stefania Pedrazzi <stefaniapedrazzi@users.noreply.github.com> Co-authored-by: Olivier Michel <Olivier.Michel@cyberbotics.com>
1 parent b1c1809 commit cdd2794

47 files changed

Lines changed: 1394 additions & 1241 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/automobile/openstreetmap-importer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Type in the [Windows Command Prompt](https://en.wikipedia.org/wiki/Cmd.exe) open
4646
%PYTHON_PATH%\Scripts\pip.exe install %HOME%\Downloads\Shapely‑<<version>>‑cp<<python_version>>‑cp<<python_version>>m‑win_amd64.whl
4747
```
4848

49-
## How to Use the Importer
49+
## How to use the Importer
5050

5151
You should use the `importer.py` Python script to generate the `myMap.wbt` webots simulation world from the `myMap.osm` file:
5252

docs/automobile/sumo-exporter.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ If the Webots simulation has been created from the OpenStreetMap importer, then
1717
If it's not the case, you should pay attention on the use of the [Road](https://webots.cloud/run?url={{ url.github_tree }}/projects/objects/road/protos/Road.proto) and the [Crossroad](https://webots.cloud/run?url={{ url.github_tree }}/projects/objects/road/protos/Crossroad.proto) PROTO nodes.
1818
Indeed, their IDs should be unique, and the `Road.startJunction`, the `Road.endJunction` and the `Crossroad.connectedRoadIDs` fields should be filled correctly.
1919

20-
## How to Use the Exporter
20+
## How to use the Exporter
2121

2222
You can use the `exporter.py` Python script to generate the `sumo.nod.xml`, `sumo.edg.xml` and `sumo.sumocfg` SUMO files.
2323
These files can be used by SUMO `netconvert` to generate the `sumo.net.xml` file from the `myMap.wbt` webots simulation world.

docs/blog/Webots-2020-b-release.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ However, it requires higher bandwidth and server CPU/GPU power.
111111

112112
---
113113

114-
### Share Your Project with the Community
114+
### Share your Project with the Community
115115

116116
We created a new [GitHub repository](https://github.com/cyberbotics/community-projects) for the community to share PROTO nodes, controllers, worlds, etc.
117117
Your [contributions](https://github.com/cyberbotics/community-projects/blob/master/CONTRIBUTING.md) are welcome!

docs/blog/Webots-2022-a-release.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Here we are going to present some of the main new features, but for a comprehens
1212

1313
## Conversion to FLU/ENU
1414

15-
### What Is FLU/ENU?
15+
### What is FLU/ENU?
1616

1717
**FLU and ENU are conventions for axis systems.**
1818

@@ -42,7 +42,7 @@ We worked hard to convert all PROTOs and worlds distributed with Webots for you,
4242
A mechanism of backward compatibility has been implemented directly in Webots.
4343
Unfortunately, it was not possible to make it work in every cases.
4444
It will try to convert worlds and PROTOs at runtime, but PROTO changes cannot be saved.
45-
We also wrote a [guide](https://github.com/cyberbotics/webots/wiki/How-to-adapt-your-world-or-PROTO-to-Webots-R2022a) to help you convert your own PROTOs and worlds to use them in Webots R2022a.
45+
We also wrote a [guide](https://cyberbotics.com/doc/guide/from-2021b-to-2022a) to help you convert your own PROTOs and worlds to use them in Webots R2022a.
4646

4747
We are aware that it is a major change and it can be annoying to convert your worlds and PROTOs to the new format.
4848
However, it is a worthwhile effort, especially if you work with ROS.

docs/guide/from-2021b-to-2022a.md

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# Upgrade from R2021b to R2022a
2+
3+
Starting from the R2022a version, all geometries, devices, and PROTOs that come with Webots use the _FLU_ axis orientation (x-**F**orward, y-**L**eft, and z-**U**p).
4+
We introduced the update to be consistent with ROS (see [REP 103](https://www.ros.org/reps/rep-0103.html)) and other robotics systems.
5+
If your Webots world uses Webots geometries, devices, and PROTOs then you will probably need to adapt your world.
6+
7+
| ![spot2021b.png](images/spot_nue.png) | ![spot2022a.png](images/spot_enu.png) |
8+
|:--:|:--:|
9+
| *spot.wbt in 2021b: spot is RUB and the world is NUE.* | *spot.wbt in 2022a: spot is FLU and the world is ENU.* |
10+
11+
Changes breaking the backward compatibility are listed in bold in the [Change Log](../reference/changelog-r2022.md).
12+
13+
## How to Adapt your World or PROTO to Webots R2022a
14+
15+
### Backward Compatibility Mechanism
16+
We introduced a backward compatibility mechanism to adapt worlds automatically.
17+
This mechanism will be launched when you open a world in the R2022a version. It will keep the same axis orientation and objects axis system you had before but it will rotate the geometries and devices to retrieve the old behavior.
18+
Nevertheless, the mechanism has limited capabilities and it is likely you will need to assist the world adaptation.
19+
20+
* If your world or PROTO does not contain too many objects, you should simply adapt them as wanted using the interface and save it.
21+
22+
* If your world or PROTO is too complex to be handled by hand, you should directly use the script to convert it to _ENU/FLU_ (see [automatic conversion to ENU FLU](#automatic-conversion-to-enu-flu)). Instead of the backward compatibility algorithm, this script can perform children nodes conversion and takes in charge some of the Webots PROTOs which can be useful to avoid to rotate them by hand.
23+
24+
In any case, it is important to understand how Webots nodes are affected by the update and how they should be rotated to preserve the old behavior:
25+
26+
| Node | Required rotation to preserve the old behavior | Strategy code |
27+
|---|:---:|:---:|
28+
| [Cylinder](../reference/cylinder.md) | <img src="https://render.githubusercontent.com/render/math?math=\color{gray}\large(-\frac{\pi}{2}, 0, 0)">| B1 |
29+
| [Capsule](../reference/capsule.md) | <img src="https://render.githubusercontent.com/render/math?math=\color{gray}\large(-\frac{\pi}{2}, 0, 0)"> | B1 |
30+
| [ElevationGrid](../reference/elevationgrid.md) | <img src="https://render.githubusercontent.com/render/math?math=\color{gray}\large(-\frac{\pi}{2}, 0, 0)"> | B1 |
31+
| [Cone](../reference/cone.md) | <img src="https://render.githubusercontent.com/render/math?math=\color{gray}\large(-\frac{\pi}{2}, 0, 0)"> | B1 |
32+
| [Plane](../reference/plane.md) | <img src="https://render.githubusercontent.com/render/math?math=\color{gray}\large(-\frac{\pi}{2}, 0, 0)"> | B1 |
33+
| [Camera](../reference/camera.md) | <img src="https://render.githubusercontent.com/render/math?math=\color{gray}\large(-\frac{\pi}{2}, 0, \frac{\pi}{2})"> | A2 |
34+
| [Lidar](../reference/lidar.md) | <img src="https://render.githubusercontent.com/render/math?math=\color{gray}\large(-\frac{\pi}{2}, 0, \frac{\pi}{2})"> | A2 |
35+
| [Radar](../reference/radar.md) | <img src="https://render.githubusercontent.com/render/math?math=\color{gray}\large(-\frac{\pi}{2}, 0, \frac{\pi}{2})"> | A2 |
36+
| [Viewpoint](../reference/viewpoint.md) | <img src="https://render.githubusercontent.com/render/math?math=\color{gray}\large(-\frac{\pi}{2}, 0, \frac{\pi}{2})"> | A1 |
37+
| [Track](../reference/track.md) | <img src="https://render.githubusercontent.com/render/math?math=\color{gray}\large(-\frac{\pi}{2}, 0, \frac{\pi}{2})"> | A2 |
38+
| [Pen](../reference/camera.md) | <img src="https://render.githubusercontent.com/render/math?math=\color{gray}\large(-\frac{\pi}{2}, 0, 0)"> | A2 |
39+
| [Emitter](../reference/emitter.md) | <img src="https://render.githubusercontent.com/render/math?math=\color{gray}\large(-\frac{\pi}{2}, 0, -\frac{\pi}{2})"> | A2 |
40+
| [Receiver](../reference/receiver.md) | <img src="https://render.githubusercontent.com/render/math?math=\color{gray}\large(-\frac{\pi}{2}, 0, -\frac{\pi}{2})"> | A2 |
41+
| [Connector](../reference/connector.md) | <img src="https://render.githubusercontent.com/render/math?math=\color{gray}\large(-\frac{\pi}{2}, 0, -\frac{\pi}{2})"> | A2 |
42+
| [TouchSensor](../reference/touchsensor.md) | <img src="https://render.githubusercontent.com/render/math?math=\color{gray}\large(-\frac{\pi}{2}, 0, -\frac{\pi}{2})"> | A2 |
43+
| Webots PROTOs | <img src="https://render.githubusercontent.com/render/math?math=\color{gray}\large(-\frac{\pi}{2}, 0, \frac{\pi}{2})">, but there are numerous exceptions to this rule as the PROTOs did not followed any specific convention any now | C |
44+
45+
### Automatic Conversion to ENU FLU
46+
47+
This script [convert\_nue\_to\_enu\_rub\_to\_flu.py](https://github.com/cyberbotics/webots/blob/master/scripts/converter/convert_nue_to_enu_rub_to_flu.py) intends to help you to adapt your world or PROTOs from an old version to the new version of Webots.
48+
You can find detailed explanations into the script (dependencies, usage, limitations and conversion process).
49+
50+
| ![village_realistic.png](https://user-images.githubusercontent.com/48200998/145968884-a52c67b0-056c-480b-9a62-d40057b9a01f.png) | ![village_realistic_converted.png](https://user-images.githubusercontent.com/48200998/145969111-507bfca1-0470-4d03-91e4-5e227645ddb9.png) |
51+
|:--:|:--:|
52+
| *Example of a complex world (village_realistic.wbt) after backward compatibility algorithm.* | *Example of a complex world after the execution of the script.* |
53+
54+
This script will convert your world from _NUE_ to _ENU_ and the objects contained in the world from _RUB_ to _FLU_. It could be needed to rotate some parts by hand.
55+
56+
Simple usage:
57+
```
58+
python3 convert_nue_to_enu_rub_to_flu.py /your_path_to_your_projects/worlds/my_world.wbt
59+
```
60+
61+
If your PROTO is _RUB_ (x-**R**ight, y-**U**p, z-**B**ack) and does not contain JavaScript or Lua code, you can convert it to _FLU_ using the same script. You may have to rotate some parts of your PROTOs by hand.
62+
63+
**Notes:** check that the conversion went successfully by displaying the different renderings `View/Optional rendering`. In addition, we advise you to check the differences of your `.wbt` or `.proto` before and after the script with a text comparator.
64+
65+
### Convert Forest to FLU
66+
67+
To meet the [Forest.proto](https://github.com/cyberbotics/webots/blob/master/projects/objects/trees/protos/Forest.proto) R2022a version, you need to convert your `.forest` files. you can use the script [convert\_forest\_flu.py](https://github.com/cyberbotics/webots/blob/master/scripts/converter/convert_forest_flu.py):
68+
```
69+
python convert_forest_flu.py /path/to/forest/file.forest
70+
```
71+
72+
## New Axis System Recommendations (Optional)
73+
74+
Once the world and PROTOs have the desired behavior in Webots R2022a, you can change the object axis system to _FLU_ and the world axis system to _ENU_. Indeed, as of Webots R2022a, we recommend the _FLU_ (x-**F**orward, y-**L**eft, and z-**U**p) axis orientation for objects and _ENU_ (x-**E**ast, y-**N**orth, and z-**U**p, see [Axes conventions](https://en.wikipedia.org/wiki/Axes_conventions)) for worlds.
75+
76+
### Convert PROTOs to FLU
77+
78+
If your PROTO file does not contain JavaScript or Lua code and it follows the _RUB_ axis system (x-**R**ight, y-**U**p, z-**B**ack) then you can use the script [convert\_proto.py](https://github.com/cyberbotics/webots/blob/master/scripts/converter/convert_proto.py):
79+
```
80+
python scripts/converter/convert_proto.py /path/to/PROTO/file.PROTO
81+
```
82+
83+
### Convert Worlds to ENU
84+
85+
You can use the script [convert\_nue\_to\_enu.py](https://github.com/cyberbotics/webots/blob/master/scripts/converter/convert_nue_to_enu.py) to convert _NUE_ worlds to _ENU_ axis system:
86+
```
87+
python scripts/converter/convert_nue_to_enu.py /path/to/world/file.wbt
88+
```

docs/guide/from-2022a-to-2022b.md

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
# Upgrade from R2022a to R2022b
2+
PROTO nodes are a powerful way of describing complex objects or robots.
3+
PROTO files however evolve, bugs are fixed, and given that there is no inherent way of defining a specific version of a PROTO to be used when loading a world, older simulations no longer behave the same way due to these changes.
4+
Moreover, with the addition of JavaScript as a template language for procedural PROTO nodes, having PROTO files as external assets that can be downloaded on the fly opens up, for example, the possibility of rendering PROTO files directly from the web.
5+
6+
For these reasons, from R2022b, all PROTO files used by a world need to be declared using the `EXTERNPROTO` keyword.
7+
Similarly, every PROTO inserted during the execution of the simulation by a supervisor needs to be declared an `IMPORTABLE EXTERNPROTO` prior to import it.
8+
9+
Changes breaking the backward compatibility are listed in bold in the [Change Log](../reference/changelog-r2022.md).
10+
11+
## What is New
12+
### What is EXTERNPROTO
13+
14+
It is a keyword at the top of your world/PROTO file that allows Webots to know where it should search for a defined PROTO. Most of the time it will be on the official GitHub respository of Cyberbotics.
15+
However, it is also possible to define the source as being a PROTO you designed or even one from another person on GitHub.
16+
17+
### Offline Assets
18+
19+
PROTO, texture, mesh and sound assets are downloaded on-the-fly when needed during the loading of a world.
20+
Subsequent loads of the same world, or other worlds that rely in the same assets, does not require them to be downloaded again and they are instead loaded from the cache.
21+
22+
With R2022b, the entirety of these assets is also provided as a zip (`assets-R2022b.zip`) file, which can be downloaded and extracted following the procedure described [here](installation-procedure.md#asset-cache-download).
23+
24+
## Preparing your World for R2022b
25+
26+
If your world was created before R2022b, generally speaking it should be sufficient for you to load it with Webots R2022b.
27+
Upon load however the console will show a long list of declarations that are currently missing both in the world and in your local PROTO if you have defined any.
28+
The world is technically usable at this point as a backwards compatibility mechanism attempts to add these declarations for you, however as long as they are missing from the world file (and PROTO files alike), the messages will persist.
29+
30+
To simplify the procedure of converting your worlds and PROTO to R2022b, a script is provided that does this conversion for you.
31+
To use it, do the following:
32+
33+
1. Download the script: [declare\_externproto.py](https://raw.githubusercontent.com/cyberbotics/webots/master/scripts/converter/declare_externproto.py)
34+
2. Place it at the root level of your project (the same directory that contains the `protos`, `worlds` and `controllers` folders)
35+
3. Run the script by providing the location of your webots installation as argument. For example, on Linux this could be: `python3 declare_externproto.py /usr/local/webots`
36+
4. If all goes well, when loading the world, no warnings or errors should be present.
37+
5. If you open your world file or PROTO with a text editor, you should notice that EXTERNPROTO declarations have been added to the header.
38+
39+
Note that the script only declares PROTO that are used when the world is loaded.
40+
If your controller spawns additional PROTO nodes using a supervisor, you need to declare them as `IMPORTABLE EXTERNPROTO` using the similarly named panel available in the interface.
41+
42+
If you wish to know more about what the script does, or if you wish to do the process manually, you can read the following sections.
43+
44+
### How are EXTERNPROTO (and IMPORTABLE EXTERNPROTO) Declared
45+
46+
When opening a world file using a text editor, declared PROTO will look like:
47+
48+
```
49+
#VRML_SIM R2022b utf8
50+
51+
EXTERNPROTO "https://raw.githubusercontent.com/cyberbotics/webots/R2022b/projects/objects/backgrounds/protos/TexturedBackground.proto"
52+
IMPORTABLE EXTERNPROTO "../protos/RectangleArena.proto"
53+
54+
WorldInfo {
55+
basicTimeStep 16
56+
}
57+
Viewpoint {
58+
}
59+
TexturedBackground {
60+
}
61+
```
62+
63+
In the world above, the PROTO **TexturedBackground** will be retrieved from the corresponding URL.
64+
As shown by the snippet no instances of **RectangleArena** are present at load time however by flagging it as `IMPORTABLE EXTERNPROTO` we denote that this object may appear during the execution.
65+
Similarly, a PROTO may reference another PROTO, and in this case a declaration is also necessary.
66+
For example the following **MyBox** PROTO uses the **Plastic** appearance and therefore needs to declare it.
67+
68+
```
69+
#VRML_SIM R2022b utf8
70+
71+
EXTERNPROTO "https://raw.githubusercontent.com/cyberbotics/webots/R2022b/projects/appearances/protos/Plastic.proto"
72+
73+
PROTO MyBox [
74+
field SFVec3f size 0.1 0.1 0.1 # Defines the size of the box.
75+
]
76+
{
77+
Shape {
78+
appearance Plastic {
79+
}
80+
geometry Box {
81+
size IS size
82+
}
83+
}
84+
}
85+
86+
```
87+
88+
In general, the URL can be defined multiple ways:
89+
90+
```
91+
# remote PROTO
92+
EXTERNPROTO "https://raw.githubusercontent.com/cyberbotics/webots/R2022b/projects/objects/backgrounds/protos/TexturedBackground.proto"
93+
94+
# local PROTO (absolute path)
95+
EXTERNPROTO "/home/user/Documents/my_project/protos/TexturedBackground.proto"
96+
97+
# local PROTO (relative path, be it relative to a world or to the PROTO itself depending on the situation)
98+
EXTERNPROTO "../protos/TexturedBackground.proto"
99+
```
100+
The location (URL) for official PROTO can be found in the file: `WEBOTS_HOME/resources/proto-list.xml`.
101+
When inserting PROTO nodes using the **add-node** button, a declaration is added automatically.
102+
103+
### IMPORTABLE EXTERNPROTO Declaration
104+
105+
PROTO nodes that are spawned by a supervisor and therefore may appear later in the execution need to be declared in the world file in the same manner, using however the key word `IMPORTABLE EXTERNPROTO` rather than just `EXTERNPROTO`.
106+
Note that declaring a node as `IMPORTABLE EXTERNPROTO` automatically implies that the PROTO is also an `EXTERNPROTO`.
107+
In other words, only one declaration suffices.
108+
109+
The list of PROTO nodes that can be spawned using a Supervisor is shown in the `IMPORTABLE EXTERNPROTO` panel, which can be opened by clicking the similarly named button:
110+
111+
%figure
112+
![tutorial_e-puck.png](images/importable_proto_button.jpg)
113+
%end
114+
115+
Doing so will open the panel:
116+
117+
%figure
118+
![tutorial_e-puck.png](images/importable_externproto.png)
119+
%end
120+
121+
Which will allow you to add or remove entries.
122+
Only PROTO in this list can be spawned by a Supervisor.

docs/guide/from-2023a-to-2023b.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Upgrade from R2023a to R2023b
2+
The R2023b version of Webots introduces a new type of node: the [Pose](../reference/pose.md) node.
3+
It has been introduced to solve an issue regarding scale: until R2023b, solid, robots and devices had a scale parameter.
4+
However, scaling such nodes was the cause of a lot of bugs and inconsistencies.
5+
Moreover, in a lot of cases, it did not make sense to scale such nodes: you could scale down a car but motor's power was not scaled down, for example.
6+
7+
The Pose node resolves all these problems.
8+
9+
Changes breaking the backward compatibility are listed in bold in the [Change Log](../reference/changelog-r2023.md).
10+
11+
## What Changes
12+
### What is the Pose Node
13+
14+
The Pose node is a descendant of [Group](../reference/group.md) and replaces [Transform](../reference/transform.md) as the base node of [Solid](../reference/solid.md) and [Fluid](../reference/fluid.md).
15+
It has exactly the same fields as a [Transform](../reference/transform.md) except the `scale`.
16+
You can see the complete node hierarchy [here](../reference/node-chart.md).
17+
18+
### What is Now the Usefulness of the Transform Node?
19+
20+
The Transform node is still there and can be used to scale visual geometries.
21+
22+
*Note*: a Transform node cannot be inserted in a `bounding object` and cannot contain any `Solid` nodes.
23+
24+
## How to Adapt your Projects
25+
### World Files
26+
A backward compatibility mechanism has been implemented to automatically convert old worlds during loading.
27+
It works as follows:
28+
- For each `Transform`, it checks whether or not the scale has the default value: `1 1 1`.
29+
- If it is the case, it replaces the `Transform` with a `Pose`.
30+
31+
Saving the world will save the converted world file.
32+
33+
In several cases, you will need to fix the world by yourself:
34+
- If a non default scale is used by a `Solid` node or a node derived from `Solid`.
35+
- If a non default `scale` is present in a `Transform` that is in a forbidden place like a `bounding object` or that have `Solid` children.
36+
37+
### PROTO Files
38+
39+
The backward compatibility mechanism also works for PROTOs.
40+
However, saving the world will have no effect on the PROTOs, which means that they will be converted every time the world is loaded.
41+
To fix that, you can either convert them by hand or use the [convert\_transform\_to\_pose.py](https://raw.githubusercontent.com/cyberbotics/webots/master/scripts/converter/convert_transform_to_pose.py) script.
42+
43+
> **Note**: the script has several limitations:
44+
- It does not support procedural PROTOs.
45+
- It requires the PROTOs/worlds to be well formatted.
46+
- It does not convert the parameters of the PROTOs.

0 commit comments

Comments
 (0)