Skip to content
This repository was archived by the owner on Sep 14, 2023. It is now read-only.

Commit

Permalink
dictionary bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pauljhan01 committed Jun 21, 2023
1 parent 5c12609 commit eaba007
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 7 deletions.
Binary file added .main.py.swp
Binary file not shown.
Binary file modified bounding_box/__pycache__/__init__.cpython-39.pyc
Binary file not shown.
Binary file modified bounding_box/__pycache__/bounding_box.cpython-39.pyc
Binary file not shown.
2 changes: 1 addition & 1 deletion bounding_box/bounding_box.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def get_y_center(self):
def get_depth(self):
return self.__depth_value__

def get_coord(self):
def get_position(self):
return self.__coord__

# def get_x_coord(self):
Expand Down
Binary file modified communication/__pycache__/__init__.cpython-39.pyc
Binary file not shown.
Binary file modified communication/__pycache__/communication.cpython-39.pyc
Binary file not shown.
Binary file modified object_detection/__pycache__/__init__.cpython-39.pyc
Binary file not shown.
2 changes: 1 addition & 1 deletion object_detection/object_detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def render_boxes(self, image, output, boundingbox_list):
bounding_box.set_y_value(y1, y2)
bounding_box.calculate_height()
bounding_box.calculate_width()
bounding_box.set_time(time.time())
bounding_box.set_time()
boundingbox_list.append(bounding_box)


Expand Down
3 changes: 2 additions & 1 deletion object_log/armorplate.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import numpy as np
from prediction import prediction as pred
from bounding_box import bounding_box as bb
import time

class ArmorPlate:
MAX_ASSOC_PLATES = 5
Expand Down Expand Up @@ -36,7 +37,7 @@ def __init__(self):
self.plate_seen_this_iter = False
# self.time_buffer = 0
self.next_position = None
self.last_time = None
self.last_time = time.time()
self.assoc_boxes = [] # used for history
self.kf = pred.Prediction()

Expand Down
8 changes: 4 additions & 4 deletions prediction/prediction.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,13 @@ def getVA(self):

vel = {
"x_vel":self.filter.x[1],
"x_acc":self.filter.x[2],
"y_vel":self.filter.x[5],
"y_vel":self.filter.x[2],
"z_vel":self.filter.x[5],
}

acc = {
"y_acc":self.filter.x[6],
"z_vel":self.filter.x[9],
"x_acc":self.filter.x[6],
"y_acc":self.filter.x[9],
"z_acc":self.filter.x[10],
}

Expand Down
7 changes: 7 additions & 0 deletions test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from communication import communication as com
import numpy as np
com.initialize_communication()
com.send_turret_data(xPos = np.float32(1), yPos = np.float32(2), zPos = np.float32(3),
xVel = np.float32(4),yVel = np.float32(5), zVel = np.float32(6),
xAcc = np.float32(7), yAcc = np.float32(8), zAcc = np.float32(9),
hasTarget=True)

0 comments on commit eaba007

Please sign in to comment.