CMU-TBD / SocNavBench

A Grounded Simulation Testing Framework for Evaluating Social Navigation: https://arxiv.org/abs/2103.00047
MIT License
34 stars 6 forks source link

Existing Algorithms #6

Closed AshwiniUthir closed 2 years ago

AshwiniUthir commented 3 years ago

Hi, I was wondering if you could share the details for how the three candidate social navigation algorithms (SFM, ORCA, SA-CADRL) were evaluated on SocNavBench? I can see the results of the evaluation of those algorithms in your paper. But I couldn't find the implementation of the algorithms using your SocNavBench.

AshwiniUthir commented 3 years ago

@ajdroid Did you get a chance to have a look at my request ?

ajdroid commented 3 years ago

Hi, I'm currently OOO, but I can try to share the joystick API examples for how we interfaced those algorithms with SocNavBench. I don't think we can distribute the actual algorithms publicly but we can try to point you to the implementations we used which should work together with the interface examples.

AshwiniUthir commented 3 years ago

@ajdroid Sounds good! Can you please share the joystick API examples for how your algorithms were interfaced with SocNavBench?

ajdroid commented 3 years ago

Hi, sorry for the delay on this. Most of our code for interfacing candidate algorithms with SocNavBench can be found at this drive link

The easiest to follow is probably SA-CADRL since it is implemented all in Python. I would start at exp.py and joystick_sacadrl.py and follow the function calls for more details. For SA-CADRL to work, you'll need to install the original SA-CADRL authors' repo that contains their nav algorithm from here

Hope this helps and lmk if you have further questions

AshwiniUthir commented 2 years ago

@ajdroid I am trying to run the baseline algorithms and I am running into a few errors. Can you help me resolve this ?

Error 1: Can you give me some details about sim_delta_t? I am running into the below error for all 3 baselines.

PYOPENGL_PLATFORM=egl PYTHONPATH='.' python3 joystick/joystick_client_RVO.py
Joystick running RVO algorithm
Joystick using positional dynamics
Initiated joystick locally (AF_UNIX) at "/tmp/socnavbench_joystick_recv" & "/tmp/socnavbench_joystick_send"
Robot <-- Joystick (sender) connection established
Robot --> Joystick (receiver) connection established
Received episodes: ['test_socnav_univ']
Waiting for episode: test_socnav_univ
Running test for test_socnav_univ
Traceback (most recent call last):e = 0.400 out of 30.000
  File "joystick/joystick_client_RVO.py", line 32, in <module>
    J.update_loop()
  File "/home/ashwini/Documents/SocNavBench/joystick/joystick_RVO.py", line 181, in update_loop
    self.joystick_sense()
  File "/home/ashwini/Documents/SocNavBench/joystick/joystick_RVO.py", line 144, in joystick_sense
    self.robot_v = (self.robot - robot_prev) / self.sim_delta_t
AttributeError: 'JoystickRVO' object has no attribute 'sim_delta_t'

Error 2:

PYOPENGL_PLATFORM=egl PYTHONPATH='.' python3 joystick/joystick_client_RVO.py
Joystick running RVO algorithm
Joystick using positional dynamics
Initiated joystick locally (AF_UNIX) at "/tmp/socnavbench_joystick_recv" & "/tmp/socnavbench_joystick_send"
Robot <-- Joystick (sender) connection established
Robot --> Joystick (receiver) connection established
Received episodes: ['t_univ1', 't_univ2', 't_zara1_t2', 't_zara2']
Waiting for episode: t_univ1
Running test for t_univ1
Traceback (most recent call last):e = 0.400 out of 25.000
  File "joystick/joystick_client_RVO.py", line 32, in <module>
    J.update_loop()
  File "/home/ashwini/Documents/SocNavBench/joystick/joystick_RVO.py", line 184, in update_loop
    self.joystick_plan()
  File "/home/ashwini/Documents/SocNavBench/joystick/joystick_RVO.py", line 164, in joystick_plan
    self.data = self.socket.recv(1024)
ConnectionResetError: [Errno 104] Connection reset by peer
ajdroid commented 2 years ago

Hi as I said before these are codes meant to be a guideline since they are based on an older version of SocNavBench. You can replace self.sim_delta_t with self.sim_dt which is the new version of that variable which just measures the difference in simulator time between two simulator ticks.