rodrigoqueiroz / geoscenarioserver

8 stars 1 forks source link

GSS Vehicles disappear in anm_unreal_sim simulation #55

Closed WAEliasmith closed 3 years ago

WAEliasmith commented 3 years ago

This seems to just be a lag issue since only some cars disappearing, and those that aren't are lagging. More cars can be seen using -n mode, so it is likely this is the case.

Steps to reproduce: All git branches are on master master but test suite is on gss_scenarios

$ source $HOME/anm_unreal_sim/install/opt/ros/ros_unreal/setup.bash
$ bash $HOME/anm_unreal_sim/submodules/base_unreal_project/package.sh
Packaging successfully completed.
$ cd $HOME/anm_unreal_test_suite
$ bash scripts/wise_sim_switch.bash dev
Test suite configured to use the development simulator from /home/ae/anm_unreal_sim/submodules/base_unreal_project/opt/anm_unreal_simulator
$ source $HOME/anm_unreal_sim/submodules/anm_sim_platform/scripts/short_launch.bash

Now to test slaunching:

$ slaunch ring_road_ccw
Starting GeoScenario server for ...

This can see the new geoscenario server changes, but doesn't run the simulator since the old gss is being used.

change $HOME/anm_unreal_sim/submodules/anm_sim_platform/scripts/launch.bash line 357 to gsserver="source /opt/ros/lanelet2/setup.bash --extend && %HOME/anm_unreal_sim/submodules/geoscenarioserver/GSServer.py"

Now when slaunching gss tab opens, but there still are no other cars in simulation, despite them showing up in the gss window

changed $HOME/anm_unreal_sim/submodules/geoscenarioserver/SimConfig.py line 63 to CLIENT_SHM = True This connects the server and client using shared memory. Now when slaunching, gss tab opens, The message "Connected to gss server" appears in the simulation window and the simulation window shows other cars for the first frame after connecting, then they disappear, but in the gss window everything looks fine. Once the simulation has been ran for a while, some cars make it all the way down the track, but are only rendered once every few frames.

When run in no simulator mode, and launched as a standalone game in unreal, the first car appears and disappears the same, but then other cars fade in and out a few frames later, leading me to believe that this is a server-client communication lag issue

WAEliasmith commented 3 years ago

This has been figured out, the vehicles are disappearing because they are loaded at 0,0 before teleporting to their proper positions. The fading in and out seems to be the server publishing too slowly. Newer changes lag less, making this less of a problem.