|
1 | 1 | # Fleet Debugger Tool |
2 | 2 |
|
3 | | -A debugging tool for use with the stateful [Last Mile Fleet Solutions](https://developers.google.com/maps/documentation/transportation-logistics/last-mile-fleet-solution) and [On Demand Rides and |
4 | | -Deliveries](https://developers.google.com/maps/documentation/transportation-logistics/on-demand-rides-deliveries-solution) solutions. Fleet debugger does not yet directly support the [Google Navigation SDK](https://developers.google.com/maps/documentation/navigation-sdk?hl=en) users must integrate with the [Trip and Order Progress SDKs](https://developers.google.com/maps/documentation/transportation-logistics/on-demand-rides-deliveries-solution/trip-order-progress). |
| 3 | +A visualization and debugging tool for Google Maps Platform's Mobility Solutions, supporting [Scheduled tasks](https://developers.google.com/maps/documentation/mobility/fleet-engine/essentials/tasks-intro) and [On-demand trips](https://developers.google.com/maps/documentation/mobility/fleet-engine/essentials/trip-intro). |
5 | 4 |
|
6 | 5 |  |
7 | 6 |
|
8 | | -## Disclaimer |
| 7 | +## Using the Demo Site(s) |
| 8 | + |
| 9 | +The fastest way to get started is using our GitHub hosted site \ |
| 10 | +https://googlemaps.github.io/fleet-debugger/demos/multiple-trips |
| 11 | + |
| 12 | +We also have demo data for: |
| 13 | +- [GPS accuracy issues](https://googlemaps.github.io/fleet-debugger/demos/jump/) |
| 14 | +- [Scheduled task](https://googlemaps.github.io/fleet-debugger/demos/lmfs/) |
| 15 | + |
| 16 | +### Loading Your Data |
| 17 | + |
| 18 | +1. Export your Fleet Engine logs from Cloud Logging using this filter (customize as needed): |
| 19 | +```sql |
| 20 | +resource.type="fleetengine.googleapis.com/Fleet" |
| 21 | +AND (labels.vehicle_id="YOUR_VEHICLE_ID" OR |
| 22 | + labels.trip_id=("TRIP_ID_1" "TRIP_ID_2")) |
| 23 | +AND timestamp >= "START_TIME" -- ISO 8601 format (YYYY-MM-DDTHH:MM:SS) |
| 24 | +AND timestamp <= "END_TIME" -- ISO 8601 format (YYYY-MM-DDTHH:MM:SS) |
| 25 | +AND ( |
| 26 | + logName:"logs/fleetengine.googleapis.com%2Fcreate_vehicle" OR |
| 27 | + logName:"logs/fleetengine.googleapis.com%2Fupdate_vehicle" OR |
| 28 | + logName:"logs/fleetengine.googleapis.com%2Fcreate_trip" OR |
| 29 | + logName:"logs/fleetengine.googleapis.com%2Fupdate_trip" |
| 30 | +) |
| 31 | +``` |
9 | 32 |
|
10 | | -This is not an officially supported Google product |
| 33 | +2. Download the logs in JSON format and optionally zip them |
| 34 | +3. Import the JSON/ZIP file to Fleet Debugger |
11 | 35 |
|
12 | | -## Demos |
| 36 | +> **Note**: All data processing happens client-side. Your logs remain in your browser's Local Storage and are not uploaded to Google/GitHub. |
13 | 37 |
|
| 38 | +### Key Features |
14 | 39 |
|
15 | | -* [Demo with GPS accurracy issues](https://googlemaps.github.io/fleet-debugger/demos/jump/) |
16 | | -* [Demo with multiple trips](https://googlemaps.github.io/fleet-debugger/demos/multiple-trips/) |
17 | | -* [Demo with LMFS tasks](https://googlemaps.github.io/fleet-debugger/demos/lmfs/) |
| 40 | +- Filter & inspect log messages with customizable table views |
| 41 | +- View planned navigation routes with traffic conditions as experienced by drivers |
| 42 | +- [Replay vehicle movement](docs/ReplaceVehicleMovement.md) |
| 43 | +- See requested vs. actual pickup and dropoff points |
| 44 | +- View status changes (vehicle, trip, navigation) |
| 45 | +- Analyze GPS data (location, accuracy, heading) |
| 46 | +- Visualize multiple trips for one vehicle |
| 47 | +- View [GPS accuracy](docs/GPSAccuracy.md), [speed](docs/Speed.md), and [heading](docs/Heading.md) |
| 48 | +- Analyze [dwell times](docs/DwellTimes.md) |
18 | 49 |
|
| 50 | +> **Note**: Planned navigation routes and Pickup/DropOff points requires enablement of [Restricted Use Logs](https://developers.google.com/maps/documentation/mobility/operations/cloud-logging/setup#enable_restricted_use_logs) |
19 | 51 |
|
20 | | -## Getting Started |
| 52 | +### Restoring Demo Data |
| 53 | +To restore the original demo data after overwriting it: |
| 54 | +1. Long press the "Dataset 1" button |
| 55 | +2. When prompted, do NOT upload a file |
| 56 | +3. Refresh the page |
21 | 57 |
|
22 | | -### Dependencies |
| 58 | +## Running Your Own Server |
23 | 59 |
|
24 | | -Download & install node |
25 | | -Download & install gcloud |
| 60 | +### Development Setup |
26 | 61 |
|
27 | | -### Setup authentication |
| 62 | +1. Install dependencies: |
| 63 | + - [Node.js](https://nodejs.org/en/download) |
28 | 64 |
|
29 | | -``` |
30 | | -gcloud config set project <your project id> |
31 | | -gcloud auth login |
32 | | -gcloud auth application-default login |
33 | | -``` |
34 | | - |
35 | | -### Populate ./node_modules directory |
36 | | - |
37 | | -``` |
| 65 | +2. Install node modules: |
| 66 | +```bash |
38 | 67 | npm install |
39 | 68 | ``` |
40 | 69 |
|
41 | | -## Examples |
42 | | - |
43 | | -View historical data from my-vehicle-id via [Trip and Order Progress SDKs](https://developers.google.com/maps/documentation/transportation-logistics/on-demand-rides-deliveries-solution/trip-order-progress) |
44 | | - |
45 | | -``` |
46 | | -# Generate data files |
47 | | -dune-buggy.js historical --apikey <your api key> --vehicle=my-vehicle-id |
48 | | -# start UI (should open up browser to localhost:3000 |
| 70 | +### Start development server |
| 71 | +```bash |
49 | 72 | npm start |
50 | 73 | ``` |
51 | 74 |
|
52 | | -Generate sharable artifact |
| 75 | +### Building and Deploying |
53 | 76 |
|
54 | | -``` |
55 | | -# Generate data files |
56 | | -dune-buggy.js historical --apikey <your api key> --vehicle=my-vehicle-id |
57 | | -# build sharable, static artifact. Any webserver should be able to host this. |
| 77 | +```bash |
| 78 | +# Generate static build |
58 | 79 | npm run build |
59 | | -tar -czf support-dump.tgz build |
60 | | -``` |
61 | | - |
62 | | -## Generating a support bundle |
63 | | - |
64 | | -See [Reporting Issues](docs/reporting-issues.md) for details on how to generate a |
65 | | -support bundle that can be used when reporting bugs or other issues to google. |
66 | | - |
67 | | -## Key Features |
68 | | - |
69 | | -Filter & Inspect log messages |
70 | | - |
71 | | -Customize which fields are shown in table view |
72 | | - |
73 | | -View important status changes: vehicle status, trip status, navigation status |
74 | | - |
75 | | -View raw GPS information, including location, accuracy & heading |
76 | | - |
77 | | -### Comprehensive, Pre-built Visualizations |
78 | | -* Visualize multiple trips for one vehicle |
79 | | -* [Replay Vehicle Movement](docs/ReplaceVehicleMovement.md) |
80 | | -* [GPS Accuracy](docs/GPSAccuracy.md) |
81 | | -* [Vehicle Speed](docs/Speed.md) |
82 | | -* [Vehicle Heading](docs/Heading.md) |
83 | | -* [Dwell Times](docs/DwellTimes.md) |
84 | 80 |
|
| 81 | +# Deploy to firebase |
| 82 | +npm install -g firebase-tools |
| 83 | +firebase deploy --only hosting |
| 84 | +``` |
85 | 85 |
|
86 | | -### Extensibility |
87 | | - * Easily add aditional related data from cloud logging |
| 86 | +## Disclaimer |
88 | 87 |
|
89 | | -# Running On Windows |
| 88 | +This is not an officially supported Google product. |
90 | 89 |
|
91 | | -Fleet debugger has been verified to run on Windows 10 in the command shell. git, node and gcloud |
92 | | -need to be installed first. |
| 90 | +## Additional Resources |
93 | 91 |
|
94 | | -Example |
95 | | -``` |
96 | | -node dune-buggy.js historical --apikey <your api key> --vehicle=my-vehicle-id |
97 | | -# address line ending format issues |
98 | | -npm run format |
99 | | -npm start |
100 | | -``` |
| 92 | +- [Reporting Issues](docs/reporting-issues.md) |
0 commit comments