Skip to content

Commit

Permalink
small refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
ReykCS committed Feb 2, 2023
1 parent cd53c08 commit 567cdc8
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 8 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@ test.ipynb
*/**/params.yaml
/**/__pycache__
/data/**
!/data/.gitkeep
!/data/.gitkeep
/plots/**
!/plots/.gitkeep
5 changes: 0 additions & 5 deletions create_plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,14 @@
import numpy as np
import argparse
import matplotlib.pyplot as plt
from matplotlib.path import Path
import matplotlib.patches as patches
import json
import yaml

from utils import Utils

"""
TODO:
- Create plot titles
- Check if all legends are added
- Add collisions to path map
- Add support for declaration file to declare which data should be plotted and what plots should be used
"""


Expand Down
File renamed without changes.
5 changes: 3 additions & 2 deletions data_recorder_node.py → scripts/data_recorder_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
from rosgraph_msgs.msg import Clock
from rospy.core import traceback
import rostopic
import rospkg
import subprocess
from datetime import datetime
import rosparam
Expand Down Expand Up @@ -107,7 +108,7 @@ class Recorder:
def __init__(self):
self.model = rospy.get_param(os.path.join(rospy.get_namespace(), "model"), "")

self.dir = os.path.dirname(os.path.abspath(__file__))
self.dir = rospkg.RosPack().get_path("arena-evaluation")
self.result_dir = os.path.join(self.dir, "data", datetime.now().strftime("%d-%m-%Y_%H-%M-%S")) + "_" + rospy.get_namespace().replace("/", "")

try:
Expand Down Expand Up @@ -232,7 +233,7 @@ def write_params(self):


if __name__=="__main__":
rospy.init_node("data_recorder")
rospy.init_node("data_recorder", anonymous=True)

time.sleep(5)

Expand Down

0 comments on commit 567cdc8

Please sign in to comment.