Skip to content
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

Merge develop into feature web proto #5710

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
ff4da45
Fix infinite dictionary update (#5676)
stefaniapedrazzi Dec 20, 2022
4218f49
Disable Select button in WbExtendedStringEditor for restricted fields…
stefaniapedrazzi Dec 20, 2022
951681f
Merge branch 'develop' into sync-master-4218f492a
Dec 21, 2022
c83b40e
Merge pull request #5682 from cyberbotics/sync-master-4218f492a
Dec 21, 2022
b108cb3
Fix wrong assertion failure for console redirection (#5671)
ygoumaz Dec 21, 2022
a6bd63f
Improve automobile documentation (#5653)
stefaniapedrazzi Dec 21, 2022
bc15875
Improve robustness to NaN values in robot window plots (#5680)
stefaniapedrazzi Dec 21, 2022
2609331
Better working directory on Windows (#5685)
omichel Dec 21, 2022
bea8342
Merge branch 'develop' into sync-master-26093316c
Dec 22, 2022
1b36fe3
Merge pull request #5688 from cyberbotics/sync-master-26093316c
Dec 22, 2022
2e5ebd5
Add a troubleshooting section for macOS installation with respect to …
omichel Dec 23, 2022
c96239e
Fix infinite loop updating ODE geometries (#5686)
stefaniapedrazzi Dec 23, 2022
3f872d9
remove libcontroller sync in test suite (#5689)
ygoumaz Dec 23, 2022
b9b03d7
Add necessary first line in proto file examples (#5692)
stepkun Dec 23, 2022
6f5751c
Merge released into master (#5696)
github-actions[bot] Dec 24, 2022
a0ac1b1
Merge master into develop (#5698)
github-actions[bot] Dec 26, 2022
5371b35
Documented units for spring and damping constants (#5704)
omichel Jan 3, 2023
4a25df9
Fixed crash in Python API when using several cameras with different r…
omichel Jan 3, 2023
22b5c97
Merge pull request #5706 from cyberbotics/sync-released-5371b353a
Jan 4, 2023
9bdb3ef
Merge pull request #5707 from cyberbotics/sync-master-4a25df94c
Jan 4, 2023
5b4c176
fix conflict
Jan 4, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions .github/workflows/test_suite_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,6 @@ jobs:
export LIBGL_ALWAYS_SOFTWARE=true
export ROS_DISTRO=${{ matrix.ROS_DISTRO }}
xvfb-run --auto-servernum make distrib -j4
- name: Prepare Webots Controller Deployment
if: ${{ (github.event_name == 'schedule' || contains(github.event.pull_request.labels.*.name, 'deploy libcontroller')) && matrix.os == 'ubuntu-20.04' }}
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.WEBOTS_CONTROLLER_DEPLOY_KEY }}
- name: Deploy Webots Controller
if: ${{ (github.event_name == 'schedule' || contains(github.event.pull_request.labels.*.name, 'deploy libcontroller')) && matrix.os == 'ubuntu-20.04' }}
run: scripts/packaging/sync_controller_lib.sh
- name: Create/Update GitHub release
if: ${{ matrix.os == 'ubuntu-20.04' && (github.event_name == 'push' || github.event_name == 'schedule') }}
run: |
Expand Down
8 changes: 0 additions & 8 deletions .github/workflows/test_suite_linux_develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,6 @@ jobs:
export LIBGL_ALWAYS_SOFTWARE=true
export ROS_DISTRO=${{ matrix.ROS_DISTRO }}
xvfb-run --auto-servernum make distrib -j4
- name: Prepare Webots Controller Deployment
if: ${{ (github.event_name == 'schedule' || contains(github.event.pull_request.labels.*.name, 'deploy libcontroller')) && matrix.os == 'ubuntu-20.04' }}
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.WEBOTS_CONTROLLER_DEPLOY_KEY }}
- name: Deploy Webots Controller
if: ${{ (github.event_name == 'schedule' || contains(github.event.pull_request.labels.*.name, 'deploy libcontroller')) && matrix.os == 'ubuntu-20.04' }}
run: scripts/packaging/sync_controller_lib.sh
- name: Create/Update GitHub release
if: ${{ matrix.os == 'ubuntu-20.04' && (github.event_name == 'push' || github.event_name == 'schedule') }}
run: |
Expand Down
8 changes: 0 additions & 8 deletions .github/workflows/test_suite_mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,6 @@ jobs:
export JAVA_HOME="$(/usr/libexec/java_home -v 16)"
export PATH=/Library/Frameworks/Python.framework/Versions/3.11/bin:/usr/local/bin/:$PATH
make distrib -j4
- name: Prepare Webots Controller Deployment
if: ${{ github.event_name == 'schedule' || contains(github.event.pull_request.labels.*.name, 'deploy libcontroller') }}
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.WEBOTS_CONTROLLER_DEPLOY_KEY }}
- name: Deploy Webots Controller
if: ${{ github.event_name == 'schedule' || contains(github.event.pull_request.labels.*.name, 'deploy libcontroller') }}
run: scripts/packaging/sync_controller_lib.sh
- name: Create/Update GitHub release
if: ${{ (github.event_name == 'push' || github.event_name == 'schedule') }}
run: |
Expand Down
8 changes: 0 additions & 8 deletions .github/workflows/test_suite_mac_develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,6 @@ jobs:
export JAVA_HOME="$(/usr/libexec/java_home -v 16)"
export PATH=/Library/Frameworks/Python.framework/Versions/3.11/bin:/usr/local/bin/:$PATH
make distrib -j4
- name: Prepare Webots Controller Deployment
if: ${{ github.event_name == 'schedule' || contains(github.event.pull_request.labels.*.name, 'deploy libcontroller') }}
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.WEBOTS_CONTROLLER_DEPLOY_KEY }}
- name: Deploy Webots Controller
if: ${{ github.event_name == 'schedule' || contains(github.event.pull_request.labels.*.name, 'deploy libcontroller') }}
run: scripts/packaging/sync_controller_lib.sh
- name: Create/Update GitHub release
if: ${{ (github.event_name == 'push' || github.event_name == 'schedule') }}
run: |
Expand Down
9 changes: 0 additions & 9 deletions .github/workflows/test_suite_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,6 @@ jobs:
run: |
export WEBOTS_HOME=$GITHUB_WORKSPACE
make distrib -j4
- name: Deploy Webots Controller
if: ${{ github.event_name == 'schedule' || contains(github.event.pull_request.labels.*.name, 'deploy libcontroller') }}
run: |
export SSH_AUTH_SOCK=/tmp/ssh_agent.sock
mkdir ~/.ssh
ssh-keyscan -H github.com > ~/.ssh/known_hosts
ssh-agent -a $SSH_AUTH_SOCK > /dev/null
ssh-add - <<< "${{ secrets.WEBOTS_CONTROLLER_DEPLOY_KEY }}"
scripts/packaging/sync_controller_lib.sh
- name: Create/Update GitHub release
if: ${{ (github.event_name == 'push' || github.event_name == 'schedule') }}
run: |
Expand Down
9 changes: 0 additions & 9 deletions .github/workflows/test_suite_windows_develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,6 @@ jobs:
run: |
export WEBOTS_HOME=$GITHUB_WORKSPACE
make distrib -j4
- name: Deploy Webots Controller
if: ${{ github.event_name == 'schedule' || contains(github.event.pull_request.labels.*.name, 'deploy libcontroller') }}
run: |
export SSH_AUTH_SOCK=/tmp/ssh_agent.sock
mkdir ~/.ssh
ssh-keyscan -H github.com > ~/.ssh/known_hosts
ssh-agent -a $SSH_AUTH_SOCK > /dev/null
ssh-add - <<< "${{ secrets.WEBOTS_CONTROLLER_DEPLOY_KEY }}"
scripts/packaging/sync_controller_lib.sh
- name: Create/Update GitHub release
if: ${{ (github.event_name == 'push' || github.event_name == 'schedule') }}
run: |
Expand Down
Binary file added docs/guide/images/rosetta_setting.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions docs/guide/installation-procedure.md
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,24 @@ open ~/Applications/Webots.app # to launch Webots using the open command

Alternatively, you can double-click on the Webots icon to launch it.

#### Troubleshooting for Apple Silicon Users

If you are getting errors like these:
```bash
...(mach-o file, but is an incompatible architecture (have (arm64), need (x86_64)))
```

This is likely caused by Rosetta loading Webots under the x86 architecture instead of the native ARM. Unless you really want to use x86 binaries with your Webots simulation, make sure to turn off Rosetta. Sometimes macOS may try to open the app using Rosetta by default, which may cause issues when it comes to run robot controllers with dependencies on ARM libraries.

To check if it's opened using Rosetta, right click on the Webots application in Finder and select Get Info.

Make sure that the "Open using Rosetta" setting is unchecked, like in the picture below:

%figure "Rosetta setting"

![rosetta_setting.png](images/rosetta_setting.png)

%end

#### From the Homebrew Package

Expand Down
3 changes: 3 additions & 0 deletions docs/guide/tutorial-7-your-first-proto.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ Create a new empty text file in the `protos` folder of your project called `Four

Any PROTO file should at least respect the following structure:
```
#VRML_SIM {{ webots.version.major }} utf8
PROTO protoName [
protoFields
]
Expand All @@ -30,6 +31,7 @@ Finally, save the PROTO file.
**Solution**: You should have something like this:

```
#VRML_SIM {{ webots.version.major }} utf8
PROTO FourWheelsRobot [

]
Expand Down Expand Up @@ -80,6 +82,7 @@ And the `mass` field of the [Physics](../reference/physics.md) node of the [Robo
```
Save your PROTO file, it should now look like this:
```
#VRML_SIM {{ webots.version.major }} utf8
PROTO FourWheelsRobot [
field SFVec3f translation 0 0 0
field SFRotation rotation 0 0 1 0
Expand Down
2 changes: 2 additions & 0 deletions docs/reference/changelog-r2023.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Released on ??
- Disable `Select..` button in SFString editor if the field has restricted values ([5663](https://github.com/cyberbotics/webots/pull/5663)).
- Improved plot representation in default robot window when a NaN value is received from a device ([#5680](https://github.com/cyberbotics/webots/pull/5680)).
- Bug Fixes
- Fixed crash in Python API when a robot controller was using several cameras with different resolutions ([#5705](https://github.com/cyberbotics/webots/pull/5705)).
- Fixed Python API `Supervisor.setSimulationMode` which was failing ([#5603](https://github.com/cyberbotics/webots/pull/5603)).
- Fixed Python API `Node.enableContactPointsTracking` which was failing ([#5633](https://github.com/cyberbotics/webots/pull/5633)).
- Fixed Python API field getters sometimes returning an invalid Field object ([#5633](https://github.com/cyberbotics/webots/pull/5633)).
Expand All @@ -30,6 +31,7 @@ Released on ??
- Fixed a crash when setting the `Robot.battery` after the simulation start ([#5669](https://github.com/cyberbotics/webots/pull/5669)).
- Fixed crashes resulting from converting to base nodes a PROTO containing DEF and USE nodes ([#5676](https://github.com/cyberbotics/webots/pull/5676)).
- Fixed crashes resulting from updating a DEF node whose USE node is contained in a PROTO field triggering the regeneration ([#5676](https://github.com/cyberbotics/webots/pull/5676)).
- Fixed crashes resulting from copy or DEF/USE update in [`Solid.boundingObject`](solid.md) field ([#5686](https://github.com/cyberbotics/webots/pull/5686)).

## Webots R2023a
Released on November 29th, 2022.
Expand Down
6 changes: 4 additions & 2 deletions docs/reference/jointparameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,9 @@ The `springConstant` field specifies the value of the spring constant (or spring
The `springConstant` must be positive or zero.
If the `springConstant` is zero (the default), no spring torque/force will be applied to the joint.
If the `springConstant` is greater than zero, then a spring force will be computed and applied to the joint in addition to the other forces (i.e., motor force, damping force).
The spring force is calculated according to Hooke's law: *F = -Kx*, where *K* is the `springConstant` and *x* is the current joint position as represented by the `position` field.
In case of a linear joint it is expressed in *N/m* and the spring force is calculated according to Hooke's law: *F = -Kx*, where *K* is the `springConstant` and *x* is the current joint position as represented by the `position` field.
Therefore, the spring force is computed so as to be proportional to the current joint position, and to move the joint back to its initial position.
Similarly, in case of a rotational joint, the spring constant is expressed in *N.m/rad* and the resulting torque *T* is computed in from this formula: *T = -Kx*.
When designing a robot model that uses springs, it is important to remember that the spring's resting position for each joint will correspond to the initial position of the joint.
The only exception arises when the closest upper [Solid](solid.md) of the [Joint](joint.md) is passive, i.e. the `physics` field is not defined.
In this case the spring force direction is inverted.
Expand All @@ -100,7 +101,8 @@ The `dampingConstant` field specifies the value of the joint damping constant.
The value of `dampingConstant` must be positive or zero.
If `dampingConstant` is zero (the default), no damping torque/force will be added to the joint.
If `dampingConstant` is greater than zero, a damping torque/force will be applied to the joint in addition to the other forces (i.e., motor force, spring force).
This damping torque/force is proportional to the effective joint velocity: *F = -Bv*, where *B* is the damping constant, and *v = dx/dt* is the effective joint velocity computed by the physics simulator.
This damping torque/force *F* is proportional to the effective joint velocity: *F = -Bv*, where *B* is the damping constant, and *v = dx/dt* is the effective joint velocity computed by the physics simulator.
The unit of the damping constant for a rotational joint is expressed in *N.m.s/rad* whereas the unit of the damping constant for a linear joint is expressed in *N.s/m*.

%figure "Mechanical Diagram of a Slider Joint"

Expand Down
6 changes: 2 additions & 4 deletions lib/controller/python/controller/camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,6 @@ def __init__(self, name: Union[str, int], sampling_period: int = None):
self._enable = wb.wb_camera_enable
self._get_sampling_period = wb.wb_camera_get_sampling_period
super().__init__(name, sampling_period)
width = self.width
height = self.height
wb.wb_camera_get_image.restype = ctypes.POINTER(ctypes.c_ubyte * (4 * width * height))
wb.wb_camera_recognition_get_segmentation_image.restype = ctypes.POINTER(ctypes.c_ubyte * (4 * width * height))

def getExposure(self) -> float:
return self.exposure
Expand Down Expand Up @@ -161,10 +157,12 @@ def setFov(self, f: float):

@property
def image(self) -> bytes:
wb.wb_camera_get_image.restype = ctypes.POINTER(ctypes.c_ubyte * (4 * self.width * self.height))
return bytes(wb.wb_camera_get_image(self._tag).contents)

@property
def segmentation_image(self) -> bytes:
wb.wb_camera_recognition_get_segmentation_image.restype = ctypes.POINTER(ctypes.c_ubyte * (4 * self.width * self.height))
return bytes(wb.wb_camera_recognition_get_segmentation_image(self._tag).contents)

@property
Expand Down
76 changes: 0 additions & 76 deletions scripts/packaging/sync_controller_lib.sh

This file was deleted.

3 changes: 3 additions & 0 deletions src/webots/nodes/WbGeometry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -470,7 +470,10 @@ void WbGeometry::setOdeData(dGeomID geom, WbMatter *matterAncestor) {
if (!areOdeObjectsCreated())
createOdeObjects();

if (mOdeGeom)
dGeomDestroy(mOdeGeom);
mOdeGeom = geom;

WbSolid *s = dynamic_cast<WbSolid *>(matterAncestor);
if (s)
dGeomSetData(geom, new WbOdeGeomData(s, this));
Expand Down