Metadata-Version: 2.1
Name: apollo_modules
Version: 7.0.2
Summary: This is a package including baidu apollo' proto modules
Home-page: https://github.com/MingfeiCheng/ApolloPyProto
Author: MingfeiCheng
Author-email: snowbirds.mf@gmail.com
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
Requires-Dist: protobuf==3.20.1

## Apollo Python Protobuf

This project provides Python bindings for the Apollo modules' protobufs, enabling seamless integration and usage of Apollo’s protobuf definitions in Python.

### Installation

#### Option 1: Install via pip
```bash
pip install apollo_modules==[version]  # Supported versions: '7.0.1', '8.0.1', '9.0.1'
```
Note that, to accommodate changes across different versions of Apollo, we provide multiple versions of our package.

#### Option 2: Build from Source
```bash
git clone -b [version] https://github.com/MingfeiCheng/ApolloPyProto.git
cd ApolloPyProto
pip install -e .
```

### Usage

#### 1. Verify Installation
To verify the installation, open a Python shell and run the following:
```python
python
>>> import apollo_modules
>>> from apollo_modules.modules.planning.proto.planning_pb2 import ADCTrajectory
```
If there are no errors, the installation was successful, and the package is ready to use.

#### 2. Example Usage
Here’s an example of importing the `planning_pb2` protobuf used in Apollo’s planning module:
```python
from apollo_modules.modules.planning.proto.planning_pb2 import ADCTrajectory
```

### (Optional) Generate Python Protobuf Files from the Apollo Project
We provide a shell script to automatically generate the Python versions of the protobufs from Apollo’s modules. Use the following command:

```bash
bash proto_generate.sh /path/to/apollo_root /path/to/output
```
