mirror of
https://github.com/MoreTore/openpilot.git
synced 2026-09-15 03:54:03 +08:00
pre-commit: add codespell (#25571)
This commit is contained in:
+2
-2
@@ -2,7 +2,7 @@
|
||||
|
||||
## System Requirements
|
||||
|
||||
openpilot is developed and tested on **Ubuntu 20.04**, which is the primary development target aside from the [supported embdedded hardware](https://github.com/commaai/openpilot#running-on-pc). We also have a CI test to verify that openpilot builds on macOS, but the tools are untested. For the best experience, stick to Ubuntu 20.04, otherwise openpilot and the tools should work with minimal to no modifications on macOS and other Linux systems.
|
||||
openpilot is developed and tested on **Ubuntu 20.04**, which is the primary development target aside from the [supported embedded hardware](https://github.com/commaai/openpilot#running-on-pc). We also have a CI test to verify that openpilot builds on macOS, but the tools are untested. For the best experience, stick to Ubuntu 20.04, otherwise openpilot and the tools should work with minimal to no modifications on macOS and other Linux systems.
|
||||
|
||||
## Setup your PC
|
||||
|
||||
@@ -39,7 +39,7 @@ scons -u -j$(nproc)
|
||||
|
||||
### Windows
|
||||
|
||||
Neither openpilot nor any of the tools are developed or tested on Windows, but the [Windows Subsystem for Linux (WSL)](https://docs.microsoft.com/en-us/windows/wsl/about) should get Windows users a similiar experience to Ubuntu. [WSL 2](https://docs.microsoft.com/en-us/windows/wsl/compare-versions) specifically has been reported by several users to be a seamless experience.
|
||||
Neither openpilot nor any of the tools are developed or tested on Windows, but the [Windows Subsystem for Linux (WSL)](https://docs.microsoft.com/en-us/windows/wsl/about) should get Windows users a similar experience to Ubuntu. [WSL 2](https://docs.microsoft.com/en-us/windows/wsl/compare-versions) specifically has been reported by several users to be a seamless experience.
|
||||
|
||||
Follow [these instructions](https://docs.microsoft.com/en-us/windows/wsl/install) to setup the WSL and install the `Ubuntu-20.04` distribution. Once your Ubuntu WSL environment is setup, follow the Linux setup instructions to finish setting up your environment.
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ def decoder(addr, sock_name, vipc_server, vst, nvidia):
|
||||
print("%2d %4d %.3f %.3f roll %6.2f ms latency %6.2f ms + %6.2f ms + %6.2f ms = %6.2f ms" % (len(msgs), evta.idx.encodeId, evt.logMonoTime/1e9, evta.idx.timestampEof/1e6, frame_latency, process_latency, network_latency, pc_latency, process_latency+network_latency+pc_latency ), len(evta.data), sock_name)
|
||||
|
||||
if __name__ == "__main__":
|
||||
parser = argparse.ArgumentParser(description="Decode video streams and broacast on VisionIPC")
|
||||
parser = argparse.ArgumentParser(description="Decode video streams and broadcast on VisionIPC")
|
||||
parser.add_argument("addr", help="Address of comma three")
|
||||
parser.add_argument("--nvidia", action="store_true", help="Use nvidia instead of ffmpeg")
|
||||
parser.add_argument("--cams", default="0,1,2", help="Cameras to decode")
|
||||
|
||||
@@ -13,7 +13,7 @@ from tools.lib.logreader import logreader_from_route_or_segment
|
||||
DEMO_ROUTE = "9f583b1d93915c31|2022-05-18--10-49-51--0"
|
||||
|
||||
SERVICES = ['camerad', 'modeld', 'plannerd', 'controlsd', 'boardd']
|
||||
# Retrive controlsd frameId from lateralPlan, mismatch with longitudinalPlan will be ignored
|
||||
# Retrieve controlsd frameId from lateralPlan, mismatch with longitudinalPlan will be ignored
|
||||
MONOTIME_KEYS = ['modelMonoTime', 'lateralPlanMonoTime']
|
||||
MSGQ_TO_SERVICE = {
|
||||
'roadCameraState': 'camerad',
|
||||
@@ -79,7 +79,7 @@ def read_logs(lr):
|
||||
if not data['start'][frame_id][service]:
|
||||
data['start'][frame_id][service] = msg_obj.timestampSof
|
||||
elif msg.which() == 'controlsState':
|
||||
# Sendcan is published before controlsState, but the frameId is retrived in CS
|
||||
# Sendcan is published before controlsState, but the frameId is retrieved in CS
|
||||
data['timestamp'][frame_id][service].append(("sendcan published", latest_sendcan_monotime))
|
||||
elif msg.which() == 'modelV2':
|
||||
if msg_obj.frameIdExtra != frame_id:
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
## LogReader
|
||||
|
||||
Route is a class for conviently accessing all the [logs](/selfdrive/loggerd/) from your routes. The LogReader class reads the non-video logs, i.e. rlog.bz2 and qlog.bz2. There's also a matching FrameReader class for reading the videos.
|
||||
Route is a class for conveniently accessing all the [logs](/selfdrive/loggerd/) from your routes. The LogReader class reads the non-video logs, i.e. rlog.bz2 and qlog.bz2. There's also a matching FrameReader class for reading the videos.
|
||||
|
||||
```python
|
||||
from tools.lib.route import Route
|
||||
|
||||
@@ -10,7 +10,7 @@ from tools.lib.logreader import LogReader
|
||||
|
||||
|
||||
class TestReaders(unittest.TestCase):
|
||||
@unittest.skip("skip for bandwith reasons")
|
||||
@unittest.skip("skip for bandwidth reasons")
|
||||
def test_logreader(self):
|
||||
def _check_data(lr):
|
||||
hist = defaultdict(int)
|
||||
@@ -31,7 +31,7 @@ class TestReaders(unittest.TestCase):
|
||||
lr_url = LogReader("https://github.com/commaai/comma2k19/blob/master/Example_1/b0c9d2329ad1606b%7C2018-08-02--08-34-47/40/raw_log.bz2?raw=true")
|
||||
_check_data(lr_url)
|
||||
|
||||
@unittest.skip("skip for bandwith reasons")
|
||||
@unittest.skip("skip for bandwidth reasons")
|
||||
def test_framereader(self):
|
||||
def _check_data(f):
|
||||
self.assertEqual(f.frame_count, 1200)
|
||||
|
||||
@@ -110,8 +110,8 @@ def juggle_route(route_or_segment_name, segment_count, qlog, can, layout, dbc=No
|
||||
logs = logs[segment_start:segment_end]
|
||||
|
||||
if None in logs:
|
||||
ans = input(f"{logs.count(None)}/{len(logs)} of the rlogs in this segment are missing, would you like to fall back to the qlogs? (y/n) ")
|
||||
if ans == 'y':
|
||||
resp = input(f"{logs.count(None)}/{len(logs)} of the rlogs in this segment are missing, would you like to fall back to the qlogs? (y/n) ")
|
||||
if resp == 'y':
|
||||
logs = r.qlog_paths()[segment_start:segment_end]
|
||||
else:
|
||||
print("Please try a different route or segment")
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<plot flip_y="false" style="Lines" flip_x="false" mode="TimeSeries">
|
||||
<range left="0.000450" top="5.384416" right="2483.624998" bottom="-7.503945"/>
|
||||
<limitY/>
|
||||
<curve color="#1ac938" name="roll compenstated lateral acceleration"/>
|
||||
<curve color="#1ac938" name="roll compensated lateral acceleration"/>
|
||||
</plot>
|
||||
</DockArea>
|
||||
<DockArea name="...">
|
||||
@@ -53,7 +53,7 @@
|
||||
<!-- - - - - - - - - - - - - - - -->
|
||||
<!-- - - - - - - - - - - - - - - -->
|
||||
<customMathEquations>
|
||||
<snippet name="roll compenstated lateral acceleration">
|
||||
<snippet name="roll compensated lateral acceleration">
|
||||
<global></global>
|
||||
<function>if (v3 == 0 and v4 == 1) then
|
||||
return (value * v1 ^ 2) - (v2 * 9.81)
|
||||
|
||||
@@ -133,7 +133,7 @@ bool FrameReader::load(const std::byte *data, size_t size, bool no_hw_decoder, s
|
||||
break;
|
||||
}
|
||||
packets.push_back(pkt);
|
||||
// some stream seems to contian no keyframes
|
||||
// some stream seems to contain no keyframes
|
||||
key_frames_count_ += pkt->flags & AV_PKT_FLAG_KEY;
|
||||
}
|
||||
valid_ = valid_ && !packets.empty();
|
||||
|
||||
@@ -81,7 +81,7 @@ void Replay::start(int seconds) {
|
||||
}
|
||||
|
||||
void Replay::updateEvents(const std::function<bool()> &lambda) {
|
||||
// set updating_events to true to force stream thread relase the lock and wait for evnets_udpated.
|
||||
// set updating_events to true to force stream thread release the lock and wait for evnets_udpated.
|
||||
updating_events_ = true;
|
||||
{
|
||||
std::unique_lock lk(stream_lock_);
|
||||
|
||||
@@ -61,7 +61,7 @@ signals:
|
||||
void streamStarted();
|
||||
|
||||
protected slots:
|
||||
void segmentLoadFinished(bool sucess);
|
||||
void segmentLoadFinished(bool success);
|
||||
|
||||
protected:
|
||||
typedef std::map<int, std::unique_ptr<Segment>> SegmentMap;
|
||||
|
||||
+1
-1
@@ -346,7 +346,7 @@ class CarlaBridge:
|
||||
|
||||
vehicle_state = VehicleState()
|
||||
|
||||
# reenable IMU
|
||||
# re-enable IMU
|
||||
imu_bp = blueprint_library.find('sensor.other.imu')
|
||||
imu = world.spawn_actor(imu_bp, transform, attach_to=vehicle)
|
||||
imu.listen(lambda imu: imu_callback(imu, vehicle_state))
|
||||
|
||||
Reference in New Issue
Block a user