plotjuggler (#20063)
	
		
	
				
					
				
			* we're jugglin * install.sh works + README * new readme * new readme * better readme * fixes * more fixes * fix Co-authored-by: iejMac <gig13omb@gmail.com>pull/214/head
							parent
							
								
									1cd9105e96
								
							
						
					
					
						commit
						e5cc110081
					
				
				 4 changed files with 47 additions and 0 deletions
			
			
		| @ -0,0 +1 @@ | |||||||
|  | bin/ | ||||||
| @ -0,0 +1,18 @@ | |||||||
|  | # PlotJuggler | ||||||
|  | We've extended [PlotJuggler](https://github.com/facontidavide/PlotJuggler) to plot all of your openpilot logs | ||||||
|  | 
 | ||||||
|  | Here's our fork: https://github.com/commaai/PlotJuggler  | ||||||
|  | 
 | ||||||
|  | ## Installation | ||||||
|  | 
 | ||||||
|  | Once you've cloned openpilot, run this command inside this directory: | ||||||
|  | 
 | ||||||
|  | `./install.sh` | ||||||
|  | 
 | ||||||
|  | ## Usage | ||||||
|  | 
 | ||||||
|  | `./juggle.py <route> <segment number>` | ||||||
|  | 
 | ||||||
|  | Example: | ||||||
|  | 
 | ||||||
|  | `./juggle.py "0982d79ebb0de295|2021-01-17--17-13-08" 0` | ||||||
| @ -0,0 +1,5 @@ | |||||||
|  | #!/bin/bash | ||||||
|  | 
 | ||||||
|  | wget https://github.com/commaai/PlotJuggler/releases/download/1.0/bin.tar.gz | ||||||
|  | tar -xf bin.tar.gz | ||||||
|  | rm bin.tar.gz | ||||||
| @ -0,0 +1,23 @@ | |||||||
|  | #!/usr/bin/env python3 | ||||||
|  | 
 | ||||||
|  | import sys | ||||||
|  | import subprocess | ||||||
|  | from tools.lib.route import Route | ||||||
|  | from tools.lib.url_file import URLFile | ||||||
|  | 
 | ||||||
|  | def juggle_segment(route_name, segment_nr): | ||||||
|  |    | ||||||
|  |   r = Route(route_name) | ||||||
|  |   lp = r.log_paths()[segment_nr] | ||||||
|  | 
 | ||||||
|  |   if lp is None: | ||||||
|  |     print("This segment does not exist, please try a different one") | ||||||
|  |     return | ||||||
|  | 
 | ||||||
|  |   uf = URLFile(lp) | ||||||
|  |    | ||||||
|  |   subprocess.call(f"bin/plotjuggler -d {uf.name}", shell=True) | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | if __name__ == "__main__": | ||||||
|  |   juggle_segment(sys.argv[1], int(sys.argv[2])) | ||||||
					Loading…
					
					
				
		Reference in new issue