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
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
2 changes: 1 addition & 1 deletion smarts/core/traffic_history_provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def step(self, provider_actions, dt, elapsed_sim_time) -> ProviderState:
default_dims = VEHICLE_CONFIGS[vehicle_type].dimensions
vehicles.append(
VehicleState(
vehicle_id=v_id,
vehicle_id=f"social-agent-history-{v_id}",
vehicle_type=vehicle_type,
pose=Pose.from_center(
[
Expand Down
2 changes: 1 addition & 1 deletion smarts/sstudio/genhistories.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.

)
mcur.close()
dbconxn.commit()
Expand Down