<commit_before>
Use the following commands inside server folder to generate the CPP code:

 $ protoc -I ../proto --grpc_out=. --plugin=protoc-gen-grpc=`which grpc_cpp_plugin` ../proto/dronecore.proto
 $ protoc -I ../proto --cpp_out=. ../proto/dronecore.proto

Use the following command inside python_client folder to generate the Python code:

 $ python -m grpc_tools.protoc -I../proto --python_out=. --grpc_python_out=. ../proto/dronecore.proto

Steps to run:
- make sure dronecore is already built and installed with below command
 $ make default install

- Goto server folder and generate CPP files using above mentioned command
- Run make command to generate dronecore_server application
- Run PX4 sitl
- Run dronecore_server application, which connects to vehicle and listens to localhost:50051
- In another terminal, goto python_client folder and generate python files using above mentioned command
- Run dronecore_client.py
- vehicle takeoff and landing after 10 seconds will be observed on sitl

Things to Remember:
- unset http_proxy if anything is set

## Prerequisites

###Install grpc

sudo apt install grpc # ?

###Install grpcio_tools

sudo pip install grpcio_tools<commit_msg>grpc: make readme more concise and readable<commit_after># DroneCore with GRPC

## Prerequisites

### Install grpc

Follow the instructions on https://github.com/grpc/grpc/blob/v1.6.x/INSTALL.md.

### Install grpcio_tools for Python

```
sudo pip install grpcio_tools
```

## Build

### DroneCore

```
make default install
```

### Server

```
cd grpc/server/
protoc -I ../proto --grpc_out=. --plugin=protoc-gen-grpc=`which grpc_cpp_plugin` ../proto/dronecore.proto
protoc -I ../proto --cpp_out=. ../proto/dronecore.proto
make
cd -
```

### Python client

To test Python client, start PX4 SITL, and run Python test script:

```
./grpc/python_client/dronecore_client.py
```

## Notes

- `unset http_proxy` if set

{'fraction_non_alphanumeric': 0.10404624277456648, 'fraction_numerical': 0.005780346820809248, 'mean_word_length': 4.0237467018469655, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3774273', 'n_tokens_mistral': 617, 'n_tokens_neox': 579, 'n_words': 210}