Skip to content
This repository is currently being migrated. It's locked while the migration is in progress.

Commit

Permalink
Merge pull request #5 from hsnuhayato/fix_exponential_notation_bug
Browse files Browse the repository at this point in the history
fix exponential notation bug when use csv writer
  • Loading branch information
hsnuhayato authored Nov 3, 2021
2 parents 2366345 + f6bc110 commit 70c7208
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions scripts/collect_imu_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ def imu_cb(data):
if g_count < SAMPLE_NUM:
with open(FILE, 'a') as f:
writer = csv.writer(f)
line = (
f'{data.angular_velocity.x}{data.angular_velocity.y}'
f'{data.angular_velocity.z}{data.linear_acceleration.x}'
f'{data.linear_acceleration.y}{data.linear_acceleration.z}')
line = [
data.angular_velocity.x, data.angular_velocity.y,
data.angular_velocity.z, data.linear_acceleration.x,
data.linear_acceleration.y, data.linear_acceleration.z
]
writer.writerow(line)

if g_count == SAMPLE_NUM:
Expand Down

0 comments on commit 70c7208

Please sign in to comment.