question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

## About ego-vehicle reset delay

See original GitHub issue

https://github.com/huawei-noah/SMARTS/issues/1407#issuecomment-1111605607

Then the problem is the following even if we get the traffic_history_provider to move to a different time:

>> ## assuming first agent mission start time is 0
>> start_time = 10
>> traffic_history_provider = smarts.get_provider_by_type(TrafficHistoryProvider)
>> traffic_history_provider.start_time = start_time
>> smarts_obs = smarts.reset(scenario) # <-- issue occurs here and does not return immediately
>> thp_time = start_time + smarts.elapsed_sim_time
>> expected_time = start_time + smarts.fixed_timestep_sec
>> assert thp_time <= expected time
~AssertionError 10.5 <= 10.1```

The ego-vehicle-reset problem still exists after the update https://github.com/huawei-noah/SMARTS/pull/1412.

Why can’t smarts return the ego-vehicle immediately? What is happening during the time?

I also observe that the delay times are different for different ego-vehicles (for about 0.2s ~ 1.xx s). Can we eliminate this delay time? The time delay is harmful since traffic-history-based vehicles are still running.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:14

github_iconTop GitHub Comments

1reaction
Gamenotcommented, May 11, 2022

@YuechengLiu There is a workaround at current which will replace the vehicle at the correct time for any vehicle where elapsed_sim_time>=fixed_timestep_sec. Then the following will be true:

smarts.reset(scenario, max(0, history_start_time-smarts.fixed_timestep_sec))
assert math.isclose(smarts.elapsed_sim_time, history_start_time) # smarts.elapsed_sim_time == history_start_time

This is because SMARTS.reset(..) calls into SMARTS.step(..) which ticks over to the next time at the start of the step, does simulation, and then replaces the vehicle.

1reaction
YuechengLiucommented, May 10, 2022

@Gamenot The PR works. There are no time delay greater than 2 steps in my experiments now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Change Vehicle State - SUMO Documentation
Variable ValueType Description resume (0x19) compound (), see below Resumes from a stop color (0x45) ubyte,ubyte,ubyte,ubyte (RGBA) Sets the vehicle's color. routing mode (0x89) int Sets...
Read more >
CONTROL STRATEGIES FOR AUTONOMOUS VEHICLES
The controlled variables in this case are throttle and brake inputs to the ego vehicle, which govern its motion (velocity, acceleration, jerk and...
Read more >
Driving Scenario Designer - MathWorks
Create road and actor models using a drag-and-drop interface. Configure vision, radar, lidar, INS, and ultrasonic sensors mounted on the ego vehicle.
Read more >
Traffic Manager - CARLA Simulator - Read the Docs
- Reset traffic lights. Collision managing: - Enable/Disable collisions between a vehicle and a specific actor. - Make a vehicle ignore all other...
Read more >
Dreamview Usage Table - ApolloAuto/apollo - GitHub
reset all: turns off all modules. start auto: starts driving the vehicle autonomously. Others: switches and buttons for tools used frequently. Module Delay: ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found