Skip to content

Commit 28eaf4c

Browse files
committed
Merge branch 's2025_planning_PR' of https://github.com/krishauser/GEMstack into s2025_planning_PR
2 parents cc7949e + 5046446 commit 28eaf4c

31 files changed

Lines changed: 2135 additions & 614 deletions
Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
1-
cameras:
2-
front:
3-
K:
4-
- [684.83331299, 0.0, 573.37109375]
5-
- [0.0, 684.60968018, 363.70092773]
6-
- [0.0, 0.0, 1.0]
7-
D: [0.0, 0.0, 0.0, 0.0, 0.0]
8-
T_l2c:
9-
- [ 0.0289748006, -0.999580136, 0.0000368439, -0.0307300513]
10-
- [-0.0094993062, -0.0003122155, -0.999954834, -0.386689354 ]
11-
- [ 0.999534999, 0.0289731321, -0.0095043721, -0.671425124 ]
12-
- [ 0.0, 0.0, 0.0, 1.0 ]
13-
T_l2v:
14-
- [ 0.99939639, 0.02547917, 0.023615, 1.1 ]
15-
- [ -0.02530848, 0.99965156, -0.00749882, 0.03773583 ]
16-
- [ -0.02379784, 0.00689664, 0.999693, 1.95320223 ]
17-
- [ 0.0, 0.0, 0.0, 1.0 ]
18-
19-
front_right:
20-
K:
21-
- [1176.25545, 0.0, 966.432645]
22-
- [0.0, 1175.14569, 608.580326]
23-
- [0.0, 0.0, 1.0 ]
24-
D: [-0.270136325, 0.164393255, -0.00160720782, -0.0000741246708, -0.0619939758]
25-
T_l2c:
26-
- [-0.71836368, -0.69527204, -0.02346088, 0.05718003]
27-
- [-0.09720448, 0.13371206, -0.98624154, -0.15983010]
28-
- [ 0.68884317, -0.70619960, -0.16363744, -1.04767285]
29-
- [ 0.0, 0.0, 0.0, 1.0 ]
30-
T_l2v:
31-
- [0.99939639, 0.02547917, 0.023615, 1.1]
32-
- [-0.02530848, 0.99965156, -0.00749882, 0.03773583]
33-
- [-0.02379784, 0.00689664, 0.999693, 1.95320223]
34-
- [0.0, 0.0, 0.0, 1.0 ]
35-
1+
cameras:
2+
front:
3+
K:
4+
- [684.83331299, 0.0, 573.37109375]
5+
- [0.0, 684.60968018, 363.70092773]
6+
- [0.0, 0.0, 1.0]
7+
D: [0.0, 0.0, 0.0, 0.0, 0.0]
8+
T_l2c:
9+
- [ 0.0289748006, -0.999580136, 0.0000368439, -0.0307300513]
10+
- [-0.0094993062, -0.0003122155, -0.999954834, -0.386689354 ]
11+
- [ 0.999534999, 0.0289731321, -0.0095043721, -0.671425124 ]
12+
- [ 0.0, 0.0, 0.0, 1.0 ]
13+
T_l2v:
14+
- [ 0.99939639, 0.02547917, 0.023615, 1.1 ]
15+
- [ -0.02530848, 0.99965156, -0.00749882, 0.03773583 ]
16+
- [ -0.02379784, 0.00689664, 0.999693, 1.95320223 ]
17+
- [ 0.0, 0.0, 0.0, 1.0 ]
18+
19+
front_right:
20+
K:
21+
- [1176.25545, 0.0, 966.432645]
22+
- [0.0, 1175.14569, 608.580326]
23+
- [0.0, 0.0, 1.0 ]
24+
D: [-0.270136325, 0.164393255, -0.00160720782, -0.0000741246708, -0.0619939758]
25+
T_l2c:
26+
- [-0.71836368, -0.69527204, -0.02346088, 0.05718003]
27+
- [-0.09720448, 0.13371206, -0.98624154, -0.15983010]
28+
- [ 0.68884317, -0.70619960, -0.16363744, -1.04767285]
29+
- [ 0.0, 0.0, 0.0, 1.0 ]
30+
T_l2v:
31+
- [0.99939639, 0.02547917, 0.023615, 1.1]
32+
- [-0.02530848, 0.99965156, -0.00749882, 0.03773583]
33+
- [-0.02379784, 0.00689664, 0.999693, 1.95320223]
34+
- [0.0, 0.0, 0.0, 1.0 ]
35+

GEMstack/knowledge/defaults/computation_graph.yaml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,12 +61,24 @@ components:
6161
- driving_logic:
6262
inputs:
6363
outputs: intent
64+
<<<<<<< HEAD
65+
- parking_component: # one way
66+
inputs: all
67+
outputs: mission_plan
68+
- summon_component: # one way
69+
inputs: all
70+
outputs: route
71+
- route_planning_component: # one way
72+
inputs: [vehicle,agents,mission_plan, obstacles]
73+
outputs: route
74+
=======
6475
- _mission_planner: # one way
6576
inputs: all
6677
outputs: mission_plan
6778
- _route_planner: # one way
6879
inputs: all
6980
outputs: route
81+
>>>>>>> c2672669e19024ddf6f0ec39238970f2bbca80ed
7082
- motion_planning:
7183
inputs: all
7284
outputs: trajectory
@@ -75,4 +87,8 @@ components:
7587
outputs:
7688
- signaling:
7789
inputs: [intent]
78-
outputs:
90+
<<<<<<< HEAD
91+
outputs:
92+
=======
93+
outputs:
94+
>>>>>>> c2672669e19024ddf6f0ec39238970f2bbca80ed

GEMstack/onboard/execution/execution.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,12 @@ def validate_sensors(self,numsteps=None):
609609

610610
#check for vehicle faults
611611
self.check_for_hardware_faults()
612-
612+
for name,c in perception_components.items():
613+
if not c.healthy():
614+
if c.essential:
615+
executor_debug_print(1,"Sensor {} not working, entering recovery mode",name)
616+
else:
617+
executor_debug_print(1,"Warning, sensor {} not working, ignoring",name)
613618
self.update_components(perception_components,self.state)
614619
sensors_working = all([c.healthy() for c in perception_components.values()])
615620

GEMstack/onboard/interface/gem_gazebo.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,7 @@ def model_states_callback(self, msg: ModelStates):
223223
# Check if this model should be tracked as an agent or obstacle
224224
agent_type = None
225225
for prefix in self.tracked_model_prefixes:
226+
226227
if model_name.lower().startswith(prefix.lower()):
227228
for key, value in MODEL_PREFIX_TO_AGENT_TYPE.items():
228229
if prefix.lower().startswith(key.lower()):

GEMstack/onboard/perception/agent_detection.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ def __init__(self,vehicle_interface : GEMInterface):
1313
self.lock = threading.Lock()
1414

1515
def rate(self):
16-
return 4.0
16+
return 10.0
1717

1818
def state_inputs(self):
1919
return []
@@ -25,6 +25,7 @@ def initialize(self):
2525
self.vehicle_interface.subscribe_sensor('agent_detector',self.agent_callback, AgentState)
2626

2727
def agent_callback(self, name : str, agent : AgentState):
28+
print(f"AGENT detected: {name}")
2829
with self.lock:
2930
self.agents[name] = agent
3031

GEMstack/onboard/perception/state_estimation.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ class GNSSStateEstimator(Component):
1515
"""Just looks at the GNSS reading to estimate the vehicle state"""
1616
def __init__(self, vehicle_interface : GEMInterface):
1717
self.vehicle_interface = vehicle_interface
18+
print("GNSSStateEstimator", vehicle_interface.sensors())
1819
if 'gnss' not in vehicle_interface.sensors():
1920
raise RuntimeError("GNSS sensor not available")
2021
vehicle_interface.subscribe_sensor('gnss',self.gnss_callback,GNSSReading)
@@ -26,6 +27,7 @@ def __init__(self, vehicle_interface : GEMInterface):
2627

2728
# Get GNSS information
2829
def gnss_callback(self, reading : GNSSReading):
30+
# print("GNSS callback",reading)
2931
self.gnss_pose = reading.pose
3032
self.gnss_speed = reading.speed
3133
self.status = reading.status

GEMstack/onboard/perception/test_yolo_gazebo_simulation.py

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -118,36 +118,37 @@ def front_camera_callback(self, image: cv2.Mat):
118118

119119
boxes = track_result[0].boxes
120120
for box in boxes:
121-
121+
# print("BOXES: ", box)
122122

123123
class_id = int(box.cls.item())
124124
label_text = class_names[class_id]
125125
xywh = box.xywh[0].tolist()
126126
x, y, w, h = xywh
127-
id = box.id.item()
127+
if box.id!=None:
128+
id = box.id.item()
128129

129-
# Draw bounding box
130-
cv2.rectangle(image, (int(x - w / 2), int(y - h / 2)), (int(x + w / 2), int(y + h / 2)), (255, 0, 255), 3)
130+
# Draw bounding box
131+
cv2.rectangle(image, (int(x - w / 2), int(y - h / 2)), (int(x + w / 2), int(y + h / 2)), (255, 0, 255), 3)
131132

132-
# Define text label
133-
x = int(x - w / 2)
134-
y = int(y - h / 2)
135-
label = label_text + str(id) + " : " + str(round(box.conf.item(), 2))
133+
# Define text label
134+
x = int(x - w / 2)
135+
y = int(y - h / 2)
136+
label = label_text + str(id) + " : " + str(round(box.conf.item(), 2))
136137

137-
# Get text size
138-
text_size, baseline = cv2.getTextSize(label, font, font_scale, line_type)
139-
text_w, text_h = text_size
138+
# Get text size
139+
text_size, baseline = cv2.getTextSize(label, font, font_scale, line_type)
140+
text_w, text_h = text_size
140141

141-
# Position text above the bounding box
142-
text_x = x
143-
text_y = y - 10 if y - 10 > 10 else y + h + text_h
142+
# Position text above the bounding box
143+
text_x = x
144+
text_y = y - 10 if y - 10 > 10 else y + h + text_h
144145

145-
# Draw text outline for better visibility
146-
for dx, dy in [(-1, -1), (-1, 1), (1, -1), (1, 1)]:
147-
cv2.putText(image, label, (text_x + dx, text_y - baseline + dy), font, font_scale, outline_color, outline_thickness)
146+
# Draw text outline for better visibility
147+
for dx, dy in [(-1, -1), (-1, 1), (1, -1), (1, 1)]:
148+
cv2.putText(image, label, (text_x + dx, text_y - baseline + dy), font, font_scale, outline_color, outline_thickness)
148149

149-
# Draw main text on top of the outline
150-
cv2.putText(image, label, (text_x, text_y - baseline), font, font_scale, font_color, text_thickness)
150+
# Draw main text on top of the outline
151+
cv2.putText(image, label, (text_x, text_y - baseline), font, font_scale, font_color, text_thickness)
151152

152153

153154

GEMstack/onboard/planning/collision.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import numpy as np
21
from scipy.ndimage import distance_transform_edt
32

43
def build_collision_lookup(grid, safety_margin=2, vehicle_width=1.0):
@@ -21,7 +20,6 @@ def build_collision_lookup(grid, safety_margin=2, vehicle_width=1.0):
2120
"margin": margin,
2221
}
2322

24-
2523
def fast_collision_check(x, y, lookup):
2624
"""
2725
Check if a point is in collision using the precomputed lookup table.
@@ -39,7 +37,6 @@ def fast_collision_check(x, y, lookup):
3937
return True # Out of bounds is considered collision
4038
return cm[xi, yi]
4139

42-
4340
def path_collision_check(path, lookup, x_off=0, y_off=0):
4441
"""
4542
Check if a path is collision-free.
2.64 MB
Binary file not shown.

0 commit comments

Comments
 (0)