Commit 254bf114 authored by stanlew's avatar stanlew
Browse files


parent c70be89d
import sys
import numpy as np
import matplotlib.pyplot as plt
import lcm
from lcmtypes import odometry_t
if len(sys.argv) < 2:
sys.stderr.write("usage: <logfile>")
log = lcm.EventLog(sys.argv[1],"r")
data = np.empty((0,4), dtype=float)
init = 0
for event in log:
if == "ODOMETRY":
msg = odometry_t.decode(
if init==0:
start_utime = msg.utime
init = 1
data = np.append(data, np.array([[ \
(msg.utime-start_utime)/1.0E6, \
msg.x, \
msg.y, \
]]), axis=0)
plt.plot(data[:,1], data[:,2], 'r')
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment