Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

traffic history issues #769

Merged
merged 2 commits into from
Apr 17, 2021
Merged

traffic history issues #769

merged 2 commits into from
Apr 17, 2021

Conversation

sah-huawei
Copy link
Contributor

Main thing here is a fix for a bug introduced by PR #765: the update to sim_time caused some times to be imprecise, meaning that the "between" query done in the traffic_history_provider.py sometimes misses.

Also a miscellaneous update to give traffic history vehicles an id that will allow them to be colored as social agents (as opposed to ego agents) in Sumo, allowing for the 1 ego agent used by the history replacement script to stand out as red.

also gave traffic history vehicles an id that would allow them to be colored correctly.
@@ -168,7 +168,7 @@ def create_output(self):
self._log.debug("shifting sim_times..")
mcur = dbconxn.cursor()
mcur.execute(
"UPDATE Trajectory SET sim_time = sim_time - (SELECT min(sim_time) FROM Trajectory)"
"UPDATE Trajectory SET sim_time = round(sim_time - (SELECT min(sim_time) FROM Trajectory), 3)"
Copy link
Collaborator

@Gamenot Gamenot Apr 17, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that the digit place argument could at minimum be a descriptive class constant like TIME_DECIMAL_ACCURACY since the rounding decimal has a large impact on the behaviour of the history generator.

@sah-huawei sah-huawei merged commit 8161da4 into develop Apr 17, 2021
@sah-huawei sah-huawei deleted the sqlite-fp-issue branch April 17, 2021 06:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants