mirror of https://github.com/commaai/openpilot.git
replay: new demo route (#29215)
* new demo route
* replace other references (except gps test)
* Apply suggestions from code review
* it's 13 segments
old-commit-hash: acc732efbb
This commit is contained in:
parent
989c79d8d3
commit
d78ebfdc45
|
@ -7,7 +7,7 @@
|
|||
#include "tools/cabana/streams/abstractstream.h"
|
||||
|
||||
// demo route, first segment
|
||||
const std::string TEST_RLOG_URL = "https://commadata2.blob.core.windows.net/commadata2/4cf7a6ad03080c90/2021-09-29--13-46-36/0/rlog.bz2";
|
||||
const std::string TEST_RLOG_URL = "https://commadata2.blob.core.windows.net/commadata2/a2a0ccea32023010/2023-07-27--13-01-19/0/rlog.bz2";
|
||||
|
||||
TEST_CASE("DBCFile::generateDBC") {
|
||||
QString fn = QString("%1/%2.dbc").arg(OPENDBC_FILE_PATH, "tesla_can");
|
||||
|
|
|
@ -6,7 +6,7 @@ Route is a class for conveniently accessing all the [logs](/system/loggerd/) fro
|
|||
from tools.lib.route import Route
|
||||
from tools.lib.logreader import LogReader
|
||||
|
||||
r = Route("4cf7a6ad03080c90|2021-09-29--13-46-36")
|
||||
r = Route("a2a0ccea32023010|2023-07-27--13-01-19")
|
||||
|
||||
# get a list of paths for the route's rlog files
|
||||
print(r.log_paths())
|
||||
|
@ -41,7 +41,7 @@ from tools.lib.route import Route
|
|||
from tools.lib.logreader import MultiLogIterator
|
||||
|
||||
# setup a MultiLogIterator to read all the logs in the route
|
||||
r = Route("4cf7a6ad03080c90|2021-09-29--13-46-36")
|
||||
r = Route("a2a0ccea32023010|2023-07-27--13-01-19")
|
||||
lr = MultiLogIterator(r.log_paths())
|
||||
|
||||
# print all the steering angles values from all the logs in the route
|
||||
|
|
|
@ -8,13 +8,13 @@ class TestRouteLibrary(unittest.TestCase):
|
|||
def test_segment_name_formats(self):
|
||||
Case = namedtuple('Case', ['input', 'expected_route', 'expected_segment_num', 'expected_data_dir'])
|
||||
|
||||
cases = [ Case("4cf7a6ad03080c90|2021-09-29--13-46-36", "4cf7a6ad03080c90|2021-09-29--13-46-36", -1, None),
|
||||
Case("4cf7a6ad03080c90/2021-09-29--13-46-36--1", "4cf7a6ad03080c90|2021-09-29--13-46-36", 1, None),
|
||||
Case("4cf7a6ad03080c90|2021-09-29--13-46-36/2", "4cf7a6ad03080c90|2021-09-29--13-46-36", 2, None),
|
||||
Case("4cf7a6ad03080c90/2021-09-29--13-46-36/3", "4cf7a6ad03080c90|2021-09-29--13-46-36", 3, None),
|
||||
Case("/data/media/0/realdata/4cf7a6ad03080c90|2021-09-29--13-46-36", "4cf7a6ad03080c90|2021-09-29--13-46-36", -1, "/data/media/0/realdata"),
|
||||
Case("/data/media/0/realdata/4cf7a6ad03080c90|2021-09-29--13-46-36--1", "4cf7a6ad03080c90|2021-09-29--13-46-36", 1, "/data/media/0/realdata"),
|
||||
Case("/data/media/0/realdata/4cf7a6ad03080c90|2021-09-29--13-46-36/2", "4cf7a6ad03080c90|2021-09-29--13-46-36", 2, "/data/media/0/realdata") ]
|
||||
cases = [ Case("a2a0ccea32023010|2023-07-27--13-01-19", "a2a0ccea32023010|2023-07-27--13-01-19", -1, None),
|
||||
Case("a2a0ccea32023010/2023-07-27--13-01-19--1", "a2a0ccea32023010|2023-07-27--13-01-19", 1, None),
|
||||
Case("a2a0ccea32023010|2023-07-27--13-01-19/2", "a2a0ccea32023010|2023-07-27--13-01-19", 2, None),
|
||||
Case("a2a0ccea32023010/2023-07-27--13-01-19/3", "a2a0ccea32023010|2023-07-27--13-01-19", 3, None),
|
||||
Case("/data/media/0/realdata/a2a0ccea32023010|2023-07-27--13-01-19", "a2a0ccea32023010|2023-07-27--13-01-19", -1, "/data/media/0/realdata"),
|
||||
Case("/data/media/0/realdata/a2a0ccea32023010|2023-07-27--13-01-19--1", "a2a0ccea32023010|2023-07-27--13-01-19", 1, "/data/media/0/realdata"),
|
||||
Case("/data/media/0/realdata/a2a0ccea32023010|2023-07-27--13-01-19/2", "a2a0ccea32023010|2023-07-27--13-01-19", 2, "/data/media/0/realdata") ]
|
||||
|
||||
def _validate(case):
|
||||
route_or_segment_name = case.input
|
||||
|
|
|
@ -38,11 +38,11 @@ optional arguments:
|
|||
|
||||
Examples using route name:
|
||||
|
||||
`./juggle.py "4cf7a6ad03080c90|2021-09-29--13-46-36"`
|
||||
`./juggle.py "a2a0ccea32023010|2023-07-27--13-01-19"`
|
||||
|
||||
Examples using segment name:
|
||||
|
||||
`./juggle.py "4cf7a6ad03080c90|2021-09-29--13-46-36--1"`
|
||||
`./juggle.py "a2a0ccea32023010|2023-07-27--13-01-19--1"`
|
||||
|
||||
## Streaming
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@ from urllib.parse import urlparse, parse_qs
|
|||
|
||||
juggle_dir = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
DEMO_ROUTE = "4cf7a6ad03080c90|2021-09-29--13-46-36"
|
||||
DEMO_ROUTE = "a2a0ccea32023010|2023-07-27--13-01-19"
|
||||
RELEASES_URL="https://github.com/commaai/PlotJuggler/releases/download/latest"
|
||||
INSTALL_DIR = os.path.join(juggle_dir, "bin")
|
||||
PLOTJUGGLER_BIN = os.path.join(juggle_dir, "bin/plotjuggler")
|
||||
|
|
|
@ -12,7 +12,7 @@ python tools/lib/auth.py
|
|||
tools/replay/replay <route-name>
|
||||
|
||||
# Example:
|
||||
tools/replay/replay '4cf7a6ad03080c90|2021-09-29--13-46-36'
|
||||
tools/replay/replay 'a2a0ccea32023010|2023-07-27--13-01-19'
|
||||
# or use --demo to replay the default demo route:
|
||||
tools/replay/replay --demo
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
#include "tools/replay/camera.h"
|
||||
#include "tools/replay/route.h"
|
||||
|
||||
const QString DEMO_ROUTE = "4cf7a6ad03080c90|2021-09-29--13-46-36";
|
||||
const QString DEMO_ROUTE = "a2a0ccea32023010|2023-07-27--13-01-19";
|
||||
|
||||
// one segment uses about 100M of memory
|
||||
constexpr int MIN_SEGMENTS_CACHE = 5;
|
||||
|
|
|
@ -144,7 +144,7 @@ TEST_CASE("Route") {
|
|||
auto flags = GENERATE(REPLAY_FLAG_DCAM | REPLAY_FLAG_ECAM, REPLAY_FLAG_QCAMERA);
|
||||
Route route(DEMO_ROUTE);
|
||||
REQUIRE(route.load());
|
||||
REQUIRE(route.segments().size() == 11);
|
||||
REQUIRE(route.segments().size() == 13);
|
||||
for (int i = 0; i < 2; ++i) {
|
||||
read_segment(i, route.at(i), flags);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue