rodrigoqueiroz / geoscenarioserver

9 stars 1 forks source link

Fix Collisions in Co-Simulation #75

Closed mchlswyr closed 3 years ago

mchlswyr commented 3 years ago

Changes

Testing

Setup

cd ~/anm_unreal_test_suite/
bash ~/anm_unreal_sim/submodules/base_unreal_project/package.sh
bash scripts/wise_sim_switch.bash dev
bash scripts/gss_switch.bash release

Test 1

Test 2

mchlswyr commented 3 years ago

I also repeated test 2 with master (wise-sim on release) and I also got the same collision

Collision between vehicles 99 3

which confuses me. In any case, we are getting the collisions with both the ego and among the GSS vehicles too, which is good.

This collision is a collision detected by GSServer, not by GSClient. In GSServer, when the unit circles overlap, you see

...
Collision between vehicles x y
...

That's why it is reported when using this branch and when using master. When GSClient detects the collision, it gets reported to GSServer, and you will see

...
VID X:
   state       DISABLED
   position    (0.0, 0.0)
   speed       0.0
 ...
VID Y:
   state       DISABLED
   position    (0.0, 0.0)
   speed       0.0
...

I had a lot of trouble getting the ego and vehicle 3 to collide in GSClient, but I was able to get it eventually. I don't think it's a big deal to get the vehicles to crash. The main thing is that both scenarios work now and collisions are enabled. Getting GSClient to detect the crash was just to make sure that collisions are fixed and not somehow still disabled.