Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
a5351e8
scc_contro: a_val=> no jerk limitation.
ajouatom Jan 27, 2026
f260893
fix..
ajouatom Jan 28, 2026
f3c797f
fix..
ajouatom Jan 28, 2026
e985661
fix..
ajouatom Jan 29, 2026
9dbfd20
test. for isg
ajouatom Jan 29, 2026
0dd8689
carrot web server
ajouatom Jan 31, 2026
8090482
fix.. change branches..
ajouatom Feb 1, 2026
c4c73e9
fix..
ajouatom Feb 1, 2026
6d6b174
CD210 model..
ajouatom Feb 1, 2026
3916cb0
fix..
ajouatom Feb 2, 2026
6ede490
fix..
ajouatom Feb 2, 2026
c6f56af
ff
ajouatom Feb 2, 2026
c3261c0
fix..
ajouatom Feb 2, 2026
1c3cd16
test full screen
ajouatom Feb 2, 2026
97bc235
fix..
ajouatom Feb 2, 2026
6c34058
fix..
ajouatom Feb 2, 2026
bba2b81
disable webrtc
ajouatom Feb 2, 2026
4100d79
fix..
ajouatom Feb 2, 2026
a896846
fix.. enableWebRTC,
ajouatom Feb 2, 2026
63b3bfd
fix..
ajouatom Feb 2, 2026
d87935e
revert dm model.
ajouatom Feb 2, 2026
df47cd0
register my ip
ajouatom Feb 4, 2026
b4555fc
fix..
ajouatom Feb 4, 2026
a86e36b
test
ajouatom Feb 4, 2026
8f00762
fix..
ajouatom Feb 4, 2026
ab62642
fix..
ajouatom Feb 4, 2026
df72ea2
fix.. speed TF, more TFs. 0, 10, 20, 30%
ajouatom Feb 4, 2026
f04e755
fix..
ajouatom Feb 4, 2026
0841ba3
fix..
ajouatom Feb 4, 2026
de5b563
fix..
ajouatom Feb 4, 2026
91ae2a7
fix..
ajouatom Feb 4, 2026
acc8a3f
fix..
ajouatom Feb 4, 2026
a457f84
fix
ajouatom Feb 4, 2026
aa8ae0e
fix..
ajouatom Feb 4, 2026
f5b53d3
fix..
ajouatom Feb 4, 2026
a01db9f
ff
ajouatom Feb 4, 2026
43705a7
ff
ajouatom Feb 4, 2026
09b1a37
fix.. quick link
ajouatom Feb 4, 2026
f050e35
fix..
ajouatom Feb 4, 2026
2cc92d0
fix..
ajouatom Feb 4, 2026
65e5926
fix quick link... text..
ajouatom Feb 4, 2026
5ec54cf
fix SCC error (canfd)
ajouatom Feb 5, 2026
26bb6c4
fix.. speed TF < 0
ajouatom Feb 5, 2026
6a2d80d
hud
ajouatom Feb 6, 2026
39fc197
fix..
ajouatom Feb 8, 2026
3506821
fix.. tf..
ajouatom Feb 9, 2026
d6d7772
fleet..
ajouatom Feb 10, 2026
5553227
release..
ajouatom Feb 9, 2026
31ce77a
web cmd
ajouatom Feb 10, 2026
d8f9768
fix run cmd..
ajouatom Feb 10, 2026
b3f9e96
fix cmd
ajouatom Feb 10, 2026
5546998
cmd allow
ajouatom Feb 10, 2026
dc7938b
fix..
ajouatom Feb 11, 2026
fa7ca32
fix.. release..
ajouatom Feb 13, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
Carrot2-v9 (2026-02-xx)
========================
* CD210 model
* web carrot_man (http://ip:7000)
* fix speed based TF

Carrot2-v9 (2026-01-xx)
========================
* WMI model
Expand Down
10 changes: 6 additions & 4 deletions opendbc_repo/opendbc/car/hyundai/hyundaicanfd.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ def create_acc_control_scc2(packer, CAN, enabled, accel_last, accel, stopping, g
a_val, a_raw = 0, 0
else:
a_raw = accel
a_val = np.clip(accel, accel_last - jn, accel_last + jn)
a_val = accel #np.clip(accel, accel_last - jn, accel_last + jn)

values = copy.copy(CS.cruise_info)
values.pop("COUNTER", None)
Expand Down Expand Up @@ -440,6 +440,8 @@ def create_tcs_messages(packer, CAN, CS):
if CS.tcs_info_373 is not None:
values = copy.copy(CS.tcs_info_373)
values["DriverBraking"] = 0
values["NEW_SIGNAL_20"] = 0
values["NEW_SIGNAL_11"] = 0
values["DriverBrakingLowSens"] = 0
#values["NEW_SIGNAL_1"] = 0 # accel과 관련.. 옆두부 꺼지는것과 관련? 확인필요
#values["ACC_REQ"] = 1 # 옆두부 꺼지는것과 관련? 확인필요.. 항상 켜지게함..
Expand Down Expand Up @@ -991,7 +993,7 @@ def create_ccnc_messages(CP, packer, CAN, frame, CC, CS, hud_control,
values["ALERTS_3"] = 0
values["SOUNDS_3"] = 0

if values["ALERTS_5"] in [1, 2, 4, 5]:
if values["ALERTS_5"] in [1, 2, 3, 4, 5]:
values["ALERTS_5"] = 0

if values["ALERTS_5"] in [11] and CS.softHoldActive == 0:
Expand All @@ -1002,13 +1004,13 @@ def create_ccnc_messages(CP, packer, CAN, frame, CC, CS, hud_control,
values["LANELINE_CURVATURE"] = (min(abs(curvature), 15) + (-1 if curvature < 0 else 0)) if lat_active else 0
values["LANELINE_CURVATURE_DIRECTION"] = 1 if curvature < 0 and lat_active else 0

lane_color = 2 if CS.out.leftLaneLine < 20 else 4
lane_color = 4 if CS.out.leftLaneLine >= 20 or CS.out.leftBlindspot else 2
if hud_control.leftLaneDepart:
values["LANELINE_LEFT"] = 4 if (frame // 50) % 2 == 0 else 1
else:
values["LANELINE_LEFT"] = lane_color if hud_control.leftLaneVisible else 0

lane_color = 2 if CS.out.rightLaneLine < 20 else 4
lane_color = 4 if CS.out.rightLaneLine >= 20 or CS.out.rightBlindspot else 2
if hud_control.rightLaneDepart:
values["LANELINE_RIGHT"] = 4 if (frame // 50) % 2 == 0 else 1
else:
Expand Down
13 changes: 12 additions & 1 deletion selfdrive/carrot/carrot_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,11 +205,20 @@ def get_T_FOLLOW(self, personality=log.LongitudinalPersonality.standard, v_ego=0
[self.tFollowGap1, self.tFollowGap2, self.tFollowGap3, self.tFollowGap4]))

self.jerk_factor = float(np.interp(v_kph, bp, [1.0, 0.7, 0.5, 0.5]))
"""
personality = int(np.clip(np.digitize(v_kph, bp[1:], right=False), 0, 3))

if self.params_count % 100 == 0:
self.params.put_int_nonblocking("LongitudinalPersonality", personality)
self.personality = personality
"""
if personality == log.LongitudinalPersonality.moreRelaxed:
tf_target *= 2.0
elif personality == log.LongitudinalPersonality.relaxed:
tf_target *= 1.6
elif personality == log.LongitudinalPersonality.standard:
tf_target *= 1.3
elif personality == log.LongitudinalPersonality.aggressive:
tf_target *= 1.0

else:
tf_target = 1.0
Expand All @@ -233,6 +242,8 @@ def get_T_FOLLOW(self, personality=log.LongitudinalPersonality.standard, v_ego=0
s = float(np.clip(v_ego * CV.MS_TO_KPH / 100.0, 0.0, 1.0))
scale = (1.0 - reduce) + reduce * s
tf_target *= scale
else:
return tf_target

# ------------------------------------------------------------
# 2) Decel-hold only (no smoothing constants)
Expand Down
58 changes: 57 additions & 1 deletion selfdrive/carrot/carrot_man.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@

from ftplib import FTP
from cereal import log
import urllib.request
import urllib.error
import ssl

import cereal.messaging as messaging
from openpilot.common.realtime import Ratekeeper
from openpilot.common.params import Params
Expand Down Expand Up @@ -256,6 +260,55 @@ def get_local_ip(self):
except Exception as e:
return f"Error: {e}"

def register_my_ip(self):
try:
token = "12345678"
local_ip = self.get_local_ip()
version = self.params.get("Version")
github_id = self.params.get("GithubUsername")
port = 7000
is_onroad = self.params.get_bool("IsOnroad")
ts = int(time.time())
url = "https://shind0.synology.me/carrot/api_heartbeat.php"
timeout_s = 3.5
payload = {
"github_id": github_id,
"token": token,
"local_ip": local_ip,
"port": int(port),
"version": version,
"is_onroad": bool(is_onroad),
"ts": int(time.time()),
}
#if extra:
# payload.update(extra)

data = json.dumps(payload).encode("utf-8")
print(data)
req = urllib.request.Request(
url=url,
data=data,
headers={"Content-Type": "application/json"},
method="POST",
)

try:
ctx = ssl._create_unverified_context()
with urllib.request.urlopen(req, timeout=timeout_s, context=ctx) as resp:
body = resp.read().decode("utf-8", errors="replace")
# 서버가 {"ok":true} 같은 JSON을 주는 경우가 많음
return (200 <= resp.status < 300), body
except urllib.error.HTTPError as e:
try:
body = e.read().decode("utf-8", errors="replace")
except Exception:
body = ""
return False, f"HTTPError {e.code}: {body}"
except Exception as e:
return False, f"Exception: {e}"
except Exception as e:
print(f"register_my_ip error: {e}")

# 브로드캐스트 메시지 전송
def broadcast_version_info(self):
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
Expand Down Expand Up @@ -302,6 +355,9 @@ def broadcast_version_info(self):
if carrot_speed_active_count > 0:
self.carrot_speed_serv(carrot_speed, frame)

if frame % (20 * 30) == 0:
ok, msg = self.register_my_ip()
print(f"[heartbeat] ok: {ok}, msg: {msg}")
if frame % 20 == 0 or remote_addr is not None:
try:
self.broadcast_ip = self.get_broadcast_address() if remote_addr is None else remote_addr[0]
Expand All @@ -325,7 +381,7 @@ def broadcast_version_info(self):
# sock.sendto(dat, address)

if remote_addr is None:
print(f"Broadcasting: {self.broadcast_ip}:{msg}")
print(f"Broadcasting: {self.broadcast_ip}") #:{msg}")
if not self.navd_active:
#print("clear path_points: navd_active: ", self.navd_active)
self.navi_points = []
Expand Down
Loading
Loading