-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge develop in feature-web-proto (#5693)
* Fix infinite dictionary update (#5676) * Port changes to master branch * Check if field triggers regeneration before using it after changing the value * Fix brackets * Update changelog * Disable Select button in WbExtendedStringEditor for restricted fields (#5663) * Update WbExtendedStringEditor.hpp * Disable select button for restricted fields * Update changelog-r2023.md * Fix wrong assertion failure for console redirection (#5671) * Add null if nothing was read * Update src/controller/c/robot.c Co-authored-by: Olivier Michel <[email protected]> Co-authored-by: Olivier Michel <[email protected]> * Improve automobile documentation (#5653) * Add vehicles documentation * Improve PROTO descriptions and fix default translations * update icon_creator * Update images * Update generated sources * Update model image * Add image thumbnails * Reuse script for generating vehicles doc * Reuse script for generating vehicles doc * Fix image path * Update car.md * Fix anchors * Update vehicle-citroen.md * Update vehicle-lincoln.md * Update vehicle-range-rover.md * Update vehicle-tesla.md * Update vehicle-toyota.md * Update ToyotaPrius.proto * Update vehicle-toyota.md * Update car.md * Update vehicle-generic.md * Update BusWheel.proto * Update vehicle-bmw.md * Update vehicle-citroen.md * Update vehicle-toyota.md * Update BmwX5Wheel.proto * Update CitroenCZeroFrontWheel.proto * Update CitroenCZeroRearWheel.proto * Update ToyotaPrius.proto * Fix documentation generated from PROTO files * Fix pep8 error * Update car.md * Add car PROTO field descriptions * Add description to generic vehicle fields * Regenerate documentation * Remove duplicated util file * Add entry in Changelog * Improve robustness to NaN values in robot window plots (#5680) * Ignore NaN values when adjusting the plot range * Add ChangeLog entry * Better working directory on Windows (#5685) Co-authored-by: Stefania Pedrazzi <[email protected]> Co-authored-by: Yannick Goumaz <[email protected]> Co-authored-by: Olivier Michel <[email protected]>
- Loading branch information
1 parent
c9e3af4
commit 992c706
Showing
151 changed files
with
2,873 additions
and
832 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
|
||
# Copyright 1996-2023 Cyberbotics Ltd. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
import os | ||
from io import open | ||
import sys | ||
sys.path.append('../') | ||
from generate_doc_util import get_proto_files_in_directory, generate_doc_for_proto_files # noqa: E402 | ||
|
||
|
||
def get_category(proto_file): | ||
category = os.path.basename(os.path.dirname(proto_file)) | ||
return category, 'vehicles' | ||
|
||
|
||
# look for all the PROTO files | ||
vehiclesDir = os.path.join(os.environ['WEBOTS_HOME'], 'projects', 'vehicles', 'protos') | ||
carsDirNames = ['bmw', 'citroen', 'lincoln', 'mercedes_benz', 'range_rover', 'tesla', 'toyota', 'generic'] | ||
fileList = [] | ||
for dirName in carsDirNames: | ||
fileList += get_proto_files_in_directory(os.path.join(vehiclesDir, dirName)) | ||
fileList = sorted(fileList) | ||
|
||
# make sure that if a PROTO has the same name than the title it appears first | ||
prioritaryProtoList = [] | ||
for proto in fileList: | ||
protoName = os.path.basename(proto).split('.')[0] | ||
categoryName = os.path.basename(os.path.dirname(os.path.dirname(proto))) | ||
upperCategoryName = os.path.basename(os.path.dirname(os.path.dirname(os.path.dirname(proto)))) | ||
if protoName.lower() == categoryName and upperCategoryName == 'objects': | ||
prioritaryProtoList.append(proto) | ||
fileList.remove(proto) | ||
|
||
upperCategories = generate_doc_for_proto_files( | ||
prioritaryProtoList + fileList, | ||
{}, | ||
'vehicle-', | ||
get_category | ||
) | ||
|
||
# write the menu in 'object.md' | ||
upperCategoriesList = sorted(upperCategories.keys()) | ||
categoriesList = [] | ||
with open('proto-nodes.md', 'w', encoding='utf-8', newline='\n') as file: | ||
file.write(u'# PROTO Nodes\n\n') | ||
file.write(u'This section presents the set of PROTO nodes developed specifically for automobile related simulations, ' + | ||
'from the PROTO of a wheel to the PROTO of a complete car.\n\n') | ||
file.write(u'## Sections\n\n') | ||
file.write(u'- [AckermannVehicle](ackermannvehicle.md)\n') | ||
file.write(u'- [VehicleWheel](vehiclewheel.md)\n') | ||
file.write(u'- [Car](car.md)\n') | ||
for upperCategory in upperCategoriesList: | ||
categories = sorted(upperCategories[upperCategory]) | ||
for category in categories: | ||
categoriesList.append(category) | ||
file.write(u'- [%s](vehicle-%s.md)\n' % (category.replace('_', ' ').title(), category.replace('_', '-'))) | ||
file.write(u'\n') | ||
|
||
# print the updated part of 'menu.md' | ||
categoriesList = sorted(categoriesList) | ||
print("Please update the 'PROTO Nodes' part in 'menu.md' with:") | ||
print(' - [AckermannVehicle](ackermannvehicle.md)') | ||
print(' - [VehicleWheel](vehiclewheel.md)') | ||
print(' - [Car](car.md)') | ||
print(' - [Car](car.md)') | ||
for category in categoriesList: | ||
print(' - [%s](vehicle-%s.md)' % (category.replace('_', ' ').title(), category.replace('_', '-'))) |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Binary file added
BIN
+105 KB
docs/automobile/images/mercedes_benz/MercedesBenzSprinter.thumbnail.png
Oops, something went wrong.
Oops, something went wrong.
Binary file added
BIN
+105 KB
docs/automobile/images/mercedes_benz/MercedesBenzSprinterSimple.thumbnail.png
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Binary file added
BIN
+106 KB
docs/automobile/images/range_rover/RangeRoverSportSVRSimple.thumbnail.png
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,175 @@ | ||
# Bmw | ||
|
||
## BmwX5 | ||
|
||
Model of an BMW X5 car using the [Car](car.md) PROTO as a base. | ||
The vehicle is modelled with realistic physics properties: motor torques, body mass, friction forces, suspensions, etc. | ||
This model was sponsored by the CTI project RO2IVSim ([http://transport.epfl.ch/simulator-for-mobile-robots-and-intelligent-vehicles](http://transport.epfl.ch/simulator-for-mobile-robots-and-intelligent-vehicles)). | ||
For the last 6 fields to have any effect, the 'interior' has to be enabled. | ||
|
||
%figure | ||
|
||
![BmwX5](images/bmw/BmwX5.thumbnail.png) | ||
|
||
%end | ||
|
||
Derived from [Robot](../reference/robot.md). | ||
|
||
``` | ||
BmwX5 { | ||
SFVec3f translation 0 0 0.4 | ||
SFRotation rotation 0 0 1 0 | ||
SFColor color 0.43 0.11 0.1 | ||
SFString engineSound "sounds/engine.wav" | ||
SFString name "vehicle" | ||
SFString controller "<generic>" | ||
MFString controllerArgs [] | ||
SFBool supervisor FALSE | ||
SFBool synchronization TRUE | ||
SFBool windshieldWipers TRUE | ||
SFBool frontSpotLights FALSE | ||
SFBool rearMirror FALSE | ||
SFBool leftWingMirror FALSE | ||
SFBool rightWingMirror FALSE | ||
SFFloat mirrorFar 200.0 | ||
MFNode sensorsSlotFront [] | ||
MFNode sensorsSlotRear [] | ||
MFNode sensorsSlotTop [] | ||
MFNode sensorsSlotCenter [] | ||
SFBool interior TRUE | ||
SFBool dynamicSpeedDisplay TRUE | ||
SFBool indicatorLevers TRUE | ||
SFNode steeringWheel CarSteeringWheel {} | ||
SFBool completeInterior TRUE | ||
SFBool shifter TRUE | ||
SFFloat outerWindowTransparency 0.4 | ||
SFFloat innerWindowTransparency 0.7 | ||
SFBool innerWindowDust FALSE | ||
SFString window "automobile" | ||
} | ||
``` | ||
|
||
> **File location**: "[WEBOTS\_HOME/projects/vehicles/protos/bmw/BmwX5.proto]({{ url.github_tree }}/projects/vehicles/protos/bmw/BmwX5.proto)" | ||
> **License**: Copyright Cyberbotics Ltd. Licensed for use only with Webots. | ||
[More information.](https://cyberbotics.com/webots_assets_license) | ||
|
||
### BmwX5 Field Summary | ||
|
||
- `color`: Defines the car body color. | ||
|
||
- `windshieldWipers`: Defines whether the car should have windshiel wipers. | ||
|
||
- `frontSpotLights`: Defines whether the car should have front spot lights. | ||
|
||
- `rearMirror`: Defines whether the car should have a rear mirror. | ||
|
||
- `leftWingMirror`: Defines whether the car should have a left wing mirror. | ||
|
||
- `rightWingMirror`: Defines whether the car should have a right wing mirror. | ||
|
||
- `mirrorFar`: Defines the far clipping plane for the rear, left and right mirrors. | ||
|
||
- `sensorsSlotFront`: Extends the robot with new nodes on the front of the car. | ||
|
||
- `sensorsSlotRear`: Extends the robot with new nodes on the back of the car. | ||
|
||
- `sensorsSlotTop`: Extends the robot with new nodes on the roof of the car. | ||
|
||
- `sensorsSlotCenter`: Extends the robot with new nodes at the center of the car. | ||
|
||
- `interior`: Defines whether the car should have the interior walls and the dashboard. | ||
|
||
- `dynamicSpeedDisplay`: Defines whether the current speed can be displaed in the dashboard. | ||
|
||
- `indicatorLevers`: Defines whether the car has indicator levers. | ||
|
||
- `steeringWheel`: Defines the car steering wheel. | ||
|
||
- `completeInterior`: Defines whether the interior of the car should have seats, armrests, and handbrake. | ||
|
||
- `shifter`: Defines whether the interior of the car should have the gear shifter. | ||
|
||
- `outerWindowTransparency`: Defines the transparency level of the windows seen from outside. | ||
|
||
- `innerWindowTransparency`: Defines the transparency level of the windows seen from inside. | ||
|
||
- `innerWindowDust`: Defines whether there is dust on windows seen from inside. | ||
|
||
## BmwX5Simple | ||
|
||
Simple kinematic model of the BMW X5 to be moved with a Supervisor. | ||
This model was sponsored by the CTI project RO2IVSim ([http://transport.epfl.ch/simulator-for-mobile-robots-and-intelligent-vehicles](http://transport.epfl.ch/simulator-for-mobile-robots-and-intelligent-vehicles)). | ||
|
||
%figure | ||
|
||
![BmwX5Simple](images/bmw/BmwX5Simple.thumbnail.png) | ||
|
||
%end | ||
|
||
Derived from [Robot](../reference/robot.md). | ||
|
||
``` | ||
BmwX5Simple { | ||
SFVec3f translation 0 0 0.4 | ||
SFRotation rotation 0 0 1 0 | ||
SFColor color 0.43 0.11 0.1 | ||
MFColor recognitionColors [ 0.43 0.11 0.1 ] | ||
SFString name "vehicle" | ||
SFString controller "<none>" | ||
MFString controllerArgs [ ] | ||
SFString window "<none>" | ||
MFNode sensorsSlotFront [ ] | ||
MFNode sensorsSlotRear [ ] | ||
MFNode sensorsSlotTop [ ] | ||
MFNode sensorsSlotCenter [ ] | ||
SFBool wheelBoundingObject FALSE | ||
} | ||
``` | ||
|
||
> **File location**: "[WEBOTS\_HOME/projects/vehicles/protos/bmw/BmwX5Simple.proto]({{ url.github_tree }}/projects/vehicles/protos/bmw/BmwX5Simple.proto)" | ||
> **License**: Copyright Cyberbotics Ltd. Licensed for use only with Webots. | ||
[More information.](https://cyberbotics.com/webots_assets_license) | ||
|
||
### BmwX5Simple Field Summary | ||
|
||
- `color`: Defines the car body color. | ||
|
||
- `sensorsSlotFront`: Extends the robot with new nodes on the front of the car. | ||
|
||
- `sensorsSlotRear`: Extends the robot with new nodes on the back of the car. | ||
|
||
- `sensorsSlotTop`: Extends the robot with new nodes on the roof of the car. | ||
|
||
- `sensorsSlotCenter`: Extends the robot with new nodes at the center of the car. | ||
|
||
- `wheelBoundingObject`: Defines whether the wheels should have a bounding object. | ||
|
||
## BmwX5Wheel | ||
|
||
Model of the BMW X5 wheels using the generic [VehicleWheel](vehiclewheel.md) PROTO including physic properties and baseColorMaps. | ||
This model was sponsored by the CTI project RO2IVSim ([http://transport.epfl.ch/simulator-for-mobile-robots-and-intelligent-vehicles](http://transport.epfl.ch/simulator-for-mobile-robots-and-intelligent-vehicles)). | ||
|
||
%figure | ||
|
||
![BmwX5Wheel](images/bmw/BmwX5Wheel.thumbnail.png) | ||
|
||
%end | ||
|
||
Derived from [Slot](../reference/slot.md). | ||
|
||
``` | ||
BmwX5Wheel { | ||
SFString name "BMW X5 wheel" | ||
SFNode physics NULL | ||
SFBool boundingObject TRUE | ||
SFBool wheelSide FALSE | ||
} | ||
``` | ||
|
||
> **File location**: "[WEBOTS\_HOME/projects/vehicles/protos/bmw/BmwX5Wheel.proto]({{ url.github_tree }}/projects/vehicles/protos/bmw/BmwX5Wheel.proto)" | ||
> **License**: Copyright Cyberbotics Ltd. Licensed for use only with Webots. | ||
[More information.](https://cyberbotics.com/webots_assets_license) | ||
|
Oops, something went wrong.