diff --git a/README.md b/README.md index c40959488..c3c554b97 100644 --- a/README.md +++ b/README.md @@ -26,13 +26,14 @@ You can also start ATOS without the compose file with docker run: If you run Docker Engine you can start ATOS using the computers own network stack with ```bash -docker run --network="host" --ipc=host --privileged -it -v ~/.astazero/ATOS/:/root/.astazero/ATOS/ astazero/atos_docker_env:latest bash -c "source /root/atos_ws/install/setup.sh ; ros2 launch atos launch_basic.py" +docker run --network="host" --ipc=host --privileged -it -v ~/.astazero/ATOS/:/root/.astazero/ATOS/ astazero/atos_docker_env:latest bash -c "source /root/atos_ws/install/setup.sh ; ros2 launch atos launch_basic.py insecure:=True" ``` If you run Docker Desktop you will need to specify the ports to expose to the host computer. ```bash -docker run --ipc=host --privileged -it -v ~/.astazero/ATOS/:/root/.astazero/ATOS/ -p 80:80 -p 8080:8080 -p 8081:8081 -p 8082:8082 -p 3000:3000 -p 3443:3443 -p 55555:55555 -p 443:443 -p 9090:9090 astazero/atos_docker_env:latest bash -c "source /root/atos_ws/install/setup.sh ; ros2 launch atos launch_basic.py" +docker run --ipc=host --privileged -it -v ~/.astazero/ATOS/:/root/.astazero/ATOS/ -p 80:80 -p 8080:8080 -p 8081:8081 -p 8082:8082 -p 3000:3000 -p 3443:3443 -p 55555:55555 -p 443:443 -p 9090:9090 astazero/atos_docker_env:latest bash -c "source /root/atos_ws/install/setup.sh ; ros2 launch atos launch_basic.py insecure:=True" ``` +See the [GUI](../Usage/GUI/foxglove.md) documentation on how to enable secure connections. You might wish to mount the config directory at ~/.astazero/ATOS/ to a different location on your host computer. This can be done by changing the path after the -v flag in the above command. You might also wish to inspect the image with instead of running the launch_basic.py script. This can be done by removing the last "bash -c ..." part of the command. diff --git a/docker-compose.yml b/docker-compose.yml index e1160dd61..46d36b72e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -22,7 +22,7 @@ services: # - "55555:55555" # - "443:443" # - "9090:9090" - command: bash -c "source /root/atos_ws/install/setup.sh ; ros2 launch atos launch_basic.py" + command: bash -c "source /root/atos_ws/install/setup.sh ; ros2 launch atos launch_basic.py insecure:=True" foxglove-studio: image: ghcr.io/foxglove/studio:1.76 network_mode: host diff --git a/docs/Installation/installation.md b/docs/Installation/installation.md index 32da8ecc3..5c17324ef 100644 --- a/docs/Installation/installation.md +++ b/docs/Installation/installation.md @@ -13,8 +13,9 @@ sudo -E docker compose up If you run Docker Engine you can start ATOS using the computers own network stack with ```bash -docker run --network="host" --ipc=host --privileged -it -v ~/.astazero/ATOS/:/root/.astazero/ATOS/ astazero/atos_docker_env:latest bash -c "source /root/atos_ws/install/setup.sh ; ros2 launch atos launch_basic.py" +docker run --network="host" --ipc=host --privileged -it -v ~/.astazero/ATOS/:/root/.astazero/ATOS/ astazero/atos_docker_env:latest bash -c "source /root/atos_ws/install/setup.sh ; ros2 launch atos launch_basic.py insecure:=True" ``` +See the [GUI](../Usage/GUI/foxglove.md) documentation on how to enable secure connections. If you run Docker Desktop, special care must be taken to allow the container running in the Docker Desktop VM to communicate with clients running on the host network. If uncertain about this we suggest installing Docker Engine instead. Note: If no preexisting .astazero/ATOS folder is found, the docker image will create one. This folder will have root user permissions due to the way the docker image is built. For ease of use, change owner to your own user, run the following command on the host machine: @@ -174,6 +175,6 @@ Also add the above line to ~/.bashrc or similar. ## Running ATOS Launch ATOS ```bash -ros2 launch atos launch_basic.py +ros2 launch atos launch_basic.py insecure:=True ``` When running ATOS for the first time and the no pre-existing .astazero/ATOS folder is found, ATOS will create some barebone configuration files which you can read more about in the configuration section [here](../Usage/How-to/configuration.md). diff --git a/docs/Installation/quickstart.md b/docs/Installation/quickstart.md index 17afcf9e7..58959c886 100644 --- a/docs/Installation/quickstart.md +++ b/docs/Installation/quickstart.md @@ -5,14 +5,17 @@ Make sure you have installed ATOS by following the instructions in the [Installa # Quick start -This section will walk you through the steps of starting the ATOS server for the first time. +This section will walk you through the steps of starting ATOS, connecting it with a virtual test object and visualizing the scenario in Foxglove studio. -* Start ATOS by running either one of the docker commands (or with "ros2 launch ..." if you have installed it locally). In this guide, the docker compose command is used.``` +* Start ATOS by running either one of the docker commands (or with "ros2 launch ..." if you have installed it locally). In this guide, the docker compose command is used. //ATOS $ docker compose up (or if you are not in the docker group) //ATOS $ sudo -E docker compose up + + !!! Warning + Running the default docker compose command will run network traffic insecurely between ATOS and Foxglove. See the [GUI](../Usage/GUI/foxglove.md) documentation on how to enable secure connections. * Make sure the folder ~/.astazero/ATOS/ was created on the host machine. Since it was created by docker you will need to change the owner to your own user. Run the following command on the host machine: @@ -21,22 +24,18 @@ This section will walk you through the steps of starting the ATOS server for the sudo chown -R $USER:$USER ~/.astazero/ATOS/ -* Download and build the client software _ISO\_objectDemo_ from the [isoObject repo](https://github.com/RI-SE/isoObject). Follow the build instructions and execute the binary ISO\_objectDemo in the build folder. This client software creates a virtual test object which will respond to control messages from ATOS. This software can be used to verify the correctness of communication between server and client. - - ![Alt text](isoobject_preconnect.png) - -* Open a web browser and go to [https://localhost:3443](https://localhost:3443). You should see a page warning about NET::ERR_CERT_AUTHORITY_INVALID. This is because the certificates we create are self signed. Click on "Advanced" and then "Proceed to localhost (unsafe)". Now you should see the ATOS control panel. +* Start a virtual test object by running -Repeat the above steps for the self-signed WebSocket SSL certificate [https://localhost:9090](https://localhost:9090) - ![Alt text](controlpanel.png) + docker run -it --rm --network host -v ~/.astazero/ATOS/:/root/.astazero/ATOS/ --name iso_object_demo astazero/iso_object_demo:latest -* In your browser, go to [Foxglove studio](https://studio.foxglove.dev/). Press Open connection -> Rosbridge. Enter WebSocket URL wss://localhost:9090. Press Open. You should now see ROS topics in the left panel named "Topics". + This docker command creates a virtual object which will respond to control messages from ATOS. You can find the source code for the _ISO\_objectDemo_ at the [isoObject repo](https://github.com/RI-SE/isoObject). -* Install the foxglove ATOS extensions from the ATOS repo. Do this by draging the .foxe files from the folder /{repo_path}/ATOS/plugins/foxglove/ into the Foxglove studio browser window. +* Open Chrome and go to [http://localhost:8080](http://localhost:8080). -* Install the ATOS layout by chosing Layout -> "Import from file" and select the file /{repo_path}/ATOS/plugins/foxglove/Map, 3D and control layout.json. +* Press Open connection -> Foxglove WebSocket. Enter WebSocket URL ws://localhost:8765. Press Open. You should now see ROS topics in the left panel named "Topics". -* Press the buttons Init and Connect in the control panel. You should now see several trajectories and an object appear in the 3D view. +* Install the foxglove ATOS extensions from the ATOS repo. Do this by dragging the .foxe files from the folder /{repo_path}/ATOS/plugins/foxglove/ into the Foxglove studio browser window. +* Press the buttons Init and Connect in the control panel pane. You should now see several trajectories and an object appear in the 3D view. -![Alt text](connected.gif) +* Now press Arm and Start. The object should now follow one of the trajectories. \ No newline at end of file diff --git a/docs/Usage/GUI/foxglove.md b/docs/Usage/GUI/foxglove.md index fe50c48d4..24f04fe06 100644 --- a/docs/Usage/GUI/foxglove.md +++ b/docs/Usage/GUI/foxglove.md @@ -18,10 +18,10 @@ In order for everything to be displayed correctly, some extensions needs to be a The premade layouts for ATOS are located [here](https://github.com/RI-SE/ATOS/tree/dev/plugins/foxglove). To add a layout in Foxglove Studio, go to `Layouts -> Import layout` and select one of the layouts for ATOS. ## Panels in Foxglove Studio -The panels used in layouts for ATOS are Simple Control, Map, and 3D. To change settings for the panels, press `Settings` that are located at the top right of each panel. +The panels used in layouts for ATOS are Control Panel, Map, and 3D. To change settings for the panels, press `Settings` that are located at the top right of each panel. -### Simple Control -This is a panel for Simple Control as described previously. It has the following settings: +### Control Panel +This is a panel for viewing the Control Panel as described [here](controlpanel.md). It has the following settings: - `ATOS hostname` - The host address of ATOS. - `ATOS port` - The port to connect to. diff --git a/docs/Usage/How-to/configuration.md b/docs/Usage/How-to/configuration.md index dc463a49a..065ceba59 100644 --- a/docs/Usage/How-to/configuration.md +++ b/docs/Usage/How-to/configuration.md @@ -5,7 +5,7 @@ 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 esmini. + - Explanation: Catalog directory containing various OpenSCENARIO-files with settings and parameters used by 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. - **certs** @@ -23,7 +23,7 @@ This directory contains all configuration settings and journals which are locate - **osc** - Explanation: Directory containing the OpenSCENARIO-files. - **pointclouds** - - Explanation: Directory containing site scans as pointclouds. + - Explanation: Directory containing site scans as point clouds. ## Changing ROS parameters diff --git a/plugins/foxglove/Map, 3D and control layout.json b/plugins/foxglove/Map, 3D and control layout.json index 027400c68..b61ec59fa 100644 --- a/plugins/foxglove/Map, 3D and control layout.json +++ b/plugins/foxglove/Map, 3D and control layout.json @@ -1,9 +1,9 @@ { "configById": { - "atos_simple_control.Simple Control!494eifz": { + "atos_control_panel.Control Panel!494eifz": { "atosHostname": "localhost", - "atosPort": "3443", - "atosProtocol": "https" + "atosPort": "3000", + "atosProtocol": "http" }, "map!2s6yzns": { "center": { @@ -171,7 +171,7 @@ }, "layout": { "first": { - "first": "atos_simple_control.Simple Control!494eifz", + "first": "atos_control_panel.Control Panel!494eifz", "second": "map!2s6yzns", "direction": "column", "splitPercentage": 22.626441881100266 diff --git a/plugins/foxglove/astazero.atos_simple_control-0.0.1.foxe b/plugins/foxglove/astazero.atos_control_panel-0.0.1.foxe similarity index 55% rename from plugins/foxglove/astazero.atos_simple_control-0.0.1.foxe rename to plugins/foxglove/astazero.atos_control_panel-0.0.1.foxe index c10ca8bab..08d610fde 100644 Binary files a/plugins/foxglove/astazero.atos_simple_control-0.0.1.foxe and b/plugins/foxglove/astazero.atos_control_panel-0.0.1.foxe differ