Skip to content

Commit

Permalink
Merge branch 'dev' into feature/extend_osc_support
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert108 committed Sep 17, 2024
2 parents d1127ca + 0d39f21 commit a57a904
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 15 deletions.
2 changes: 1 addition & 1 deletion atos/launch/launch_utils/validate_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def validate_certs(directory_path):

def validate_atos_dir():
atos_dir = os.path.join(os.path.expanduser('~'), '.astazero', 'ATOS')
dirs_to_validate = ["conf", "pointclouds", "logs", "odr", "osc", "Catalogs", "objects"]
dirs_to_validate = ["conf", "pointclouds", "logs", "odr", "osc", "Catalogs"]
for dir_to_validate in dirs_to_validate:
validate_directory(get_package_prefix('atos') / Path("etc") / Path(dir_to_validate), atos_dir / Path(dir_to_validate))

Expand Down
4 changes: 2 additions & 2 deletions atos/modules/OpenScenarioGateway/openscenariogateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ def update_active_scenario_objects(self, active_objects_name: List[str]):
self.get_logger().error("Active object names contain duplicates")
scenario_objects = self.get_all_objects_in_scenario(self.getScenarioFilePath())

# If the active_objects_name is empty, enable all objects
if not active_objects_name:
# If the active_objects_name is "empty", enable all objects
if active_objects_name == [""]:
active_objects_name = [obj.name for obj in scenario_objects.values()]

# Remove any object that are (now) inactive
Expand Down
4 changes: 2 additions & 2 deletions conf/conf/atos-param-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
"items": {
"type": "string"
},
"default": [1],
"description": "String array of object names from the vehicle catalog that should be used in the scenario."
"default": [""],
"description": "String array of object names from the vehicle catalog that should be used in the scenario. A single empty string will enable all"
},
"open_scenario_file": {
"type": "file",
Expand Down
8 changes: 2 additions & 6 deletions docs/Usage/How-to/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,15 @@ After starting ATOS the first time, you will find the test directory `.astazero/
This directory contains all configuration settings and journals which are located in the following directories:

- **Catalogs**
- Explanation: Catalog directory containing various OpenSCENARIO-files with settings and parameters used by scenario engine esmini.
- Explanation: Catalog directory containing various OpenSCENARIO-files with settings and parameters used by the scenario engine esmini.
- Vehicle/VehicleCatalog.xosc - Contains object details about vehicles that can be used in a test.
Mandatory properties are the "ip" and "model_id". The "ip" is the IP-address of the vehicle and the "model_id" is the ID which must be the same as the ID in the object .opro file in the objects folder.
Mandatory properties are the "ip". The "ip" is the IP-address of ISO22133 interface in the test object.
- **certs**
- Explanation: Directory containing the certificates used by e.g. the web-gui.
- **conf**
- Explanation: Directory containing the configuration files used to configure ATOS, i.e. the ROS parameters located in the file params.yaml. Find more information below.
- **journal**
- Explanation: Directory containing the journal files, i.e. recorded configuration/state/position of each object for the duration of a test.
- **objects**
- Explanation: Directory containing all objects that should be used in a test.
- Each object present in the test must have a corresponding .opro file in this directory. Each .opro file contains a row with the format
`ID={objetcID}` where `{objectID}` must be the same as the "model_id" in the VehicleCatalog.xosc file.
- **odr**
- Explanation: Directory containing OpenDRIVE-files.
- **osc**
Expand Down
4 changes: 2 additions & 2 deletions docs/Usage/Modules/OpenScenarioGateway.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This is module load and holds the chosen scenario in memory and contains various

## Features

*IP settings*
## IP settings
ScenarioModule reads the IP address for each object from the ASAM Vehicle Catalog file (located in the ~/.astazero/ATOS/Catalogs/Vehicles/VehicleCatalog directory).
The IP address must be defined as a property in the Vehicle Catalog file for each object. The property must be named `ip` and have the IP address as its value.

Expand Down Expand Up @@ -64,4 +64,4 @@ my_event = xosc.Event(
my_event.add_trigger(car_reached_trigger_position)
my_event.add_action("MyCustomAction", my_action)
car_maneuver.add_event(my_event)
```
```
4 changes: 2 additions & 2 deletions scripts/installation/install_deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ source "${ATOS_REPO_PATH}/scripts/installation/install_functions.sh"
apt_deps=$(cat ${ATOS_REPO_PATH}/scripts/installation/dependencies.txt | tr '\n' ' ')
echo "Installing dependencies... $apt_deps"
sudo apt update && sudo apt install -y ${apt_deps}
pip install -r ${ATOS_REPO_PATH}/scripts/installation/requirements.txt
python3 -m pip install -r ${ATOS_REPO_PATH}/scripts/installation/requirements.txt

# Check if apt failed to install dependencies
check_command_failed $? "Failed to install dependencies."
Expand Down Expand Up @@ -67,7 +67,7 @@ check_command_failed $? "Failed to install ROS2 dependencies."
######## Install ATOS GUI dependencies ########
###############################################

pip install -r ${ATOS_REPO_PATH}/atos_gui/requirements.txt
python3 -m pip install -r ${ATOS_REPO_PATH}/atos_gui/requirements.txt

###########################################
###### Install some deps from source ######
Expand Down
1 change: 1 addition & 0 deletions scripts/installation/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
pre-commit
pyOpenSSL >= 23.2.0
numpy<2.0
scenariogeneration

0 comments on commit a57a904

Please sign in to comment.