Skip to content

Commit

Permalink
DogMode .NET dependencies (#157)
Browse files Browse the repository at this point in the history
* DogMode .NET dependencies and logs
  • Loading branch information
ladatz authored Jul 14, 2023
1 parent f8205ee commit 502d5c0
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 11 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,8 @@ information.
## How to run the examples and interact with Chariott
Refer to individual example applications' documentation for additional setup or dependencies that may be required.

As Chariott's out of the box communication protocol is gRPC, the interaction with the
examples is done through gRPC. To illustrate how to invoke the gRPC methods we
use the [grpcurl](https://github.com/fullstorydev/grpcurl) command line tool with the example application
Expand Down
34 changes: 32 additions & 2 deletions examples/applications/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,34 @@ Based on certain conditions, actions are taken. For example, if the battery is
low, the owner is notified to return to the car immediately. If the temperature
rises, the air conditioning is turned on.

## Setup

You will need the .NET SDK and ASP.NET Core Runtime version 6. As of the writing of this,
installing the .NET SDK on Ubuntu installs the SDK, runtime, and ASP.NET Core runtime.

If you do not have these already, follow the instructions
[here](https://learn.microsoft.com/en-us/dotnet/core/install/linux-ubuntu-2004#add-the-microsoft-package-repository),
but replace the current version of the SDK with version 6 (dotnet-sdk-6.0).

Once the update is done, run:

```bash
dotnet --info
```

to ensure the installation was successful. At the end of the output message, you should see
something like the following. Ensure that they are major version 6, and that you have both the
SDK and ASP.NET Core runtime.

```bash
.NET SDKs installed:
6.0.412 [/usr/share/dotnet/sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.20 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.20 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
```

### Automatic dog mode

You can follow a simulation of this scenario by executing
Expand All @@ -46,6 +74,9 @@ The script will run the following components:
7. Dog Mode Logic Application from `examples/appliations/dog-mode-logic`
8. [Dog Mode UI Application][ui]

Once you have run the script, you can inspect the application logs that are written to
`target/logs`. This is helpful for troubleshooting if you experience unexpected behavior.

After the UI is being served, you can access it under <http://localhost:5079/>.
By default, the UI will also display the stream from the camera used to detect
whether a dog is present. You can access the camera stream at
Expand All @@ -59,8 +90,7 @@ the fallback local object detection.
The simulation will oscillate the temperature between a lower and upper bound.
If the temperature is above a threshold and a dog is detected, you can see the
air conditioning being turned on. If the temperature falls, or the dog has left
the car, the air conditioning will be turned off. You can also inspect the
application logs that are written to `target/logs`.
the car, the air conditioning will be turned off.

### Manual dog mode

Expand Down
29 changes: 20 additions & 9 deletions examples/applications/dog-mode-ui/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,31 @@ the SDV Application Programming Model through the dog mode scenario.

## Setup

The instructions in this section assume the current working directory of the
shell is the same directory where this document.
You will need the .NET SDK and ASP.NET Core Runtime version 6. As of the writing of this,
installing the .NET SDK on Ubuntu installs the SDK, runtime, and ASP.NET Core runtime.

Run the following script to install the required .NET SDK:
If you do not have these already, follow the instructions
[here](https://learn.microsoft.com/en-us/dotnet/core/install/linux-ubuntu-2004#add-the-microsoft-package-repository),
but replace the current version of the SDK with version 6 (dotnet-sdk-6.0).

./install.sh
Once the update is done, run:

When the script ends successfully, it will print how to update the `PATH`
variable so that the .NET CLI (`dotnet`) can be found at its installed
location. Once the update is done, run:
```bash
dotnet --info
```

dotnet --info
to ensure the installation was successful. At the end of the output message, you should see
something like the following. Ensure that they are major version 6, and that you have both the
SDK and ASP.NET Core runtime.

to ensure the installation was successful.
```bash
.NET SDKs installed:
6.0.412 [/usr/share/dotnet/sdk]

.NET runtimes installed:
Microsoft.AspNetCore.App 6.0.20 [/usr/share/dotnet/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 6.0.20 [/usr/share/dotnet/shared/Microsoft.NETCore.App]
```

## Running

Expand Down

0 comments on commit 502d5c0

Please sign in to comment.