This collection contains the implementation for the following robot planner algorithms interfaced through the JoystickAPI to the SocNavBench simulator.
- Random (naive) (
python3
) - RandomCpp (naive) (
c++
) - Sampling (naive) (
python3
) - RVO (
c++
) - RVOwCkpt (
c++
) - Social forces (
c++
)
The following require installing the implementation from this repo (see below in SACADRL implementation)
- SACADRL (
python3
) - SACADRLwCkpt (
python3
)
All c++ implementations should have valid makefiles where you can just run make
. This has been tested on Ubuntu 21.04.
NOTE For running the social_force/social_force
executable, you'll first need to run
cd /path/to/SocNavBench/joystick/social_force/
export LD_LIBRARY_PATH=./src
# then you can safely run
./social_force
This is not the case for the RVO2
binary which can simply be executed with
cd /path/to/SocNavBench/joystick/RVO2/
./RVO2
NOTE these binaries require executable permissions, so after compilation you'll need to give these with chmod a+x
.
first off, you'll need to copy the contents of this entire repo and replace the current joystick/
implementation in SocNavBench
cd /path/to/SocNavBench-baselines/
rm -rf /path/to/SocNavBench/joystick/* # clear old directory
cp -r * /path/to/SocNavBench/joystick/ # copy all new files over
IMPORTANT make sure you already integrated this codebase with SocNavBench as described in SocNavBench integration
For all except the randomCpp joystick implementations, you'll be able to run the python joystickAPI interface through the joystick_client.py
file. Eg.
cd /path/to/SocNavBench/
PYTHONPATH='.' python3 joystick/joystick_client.py --algo sampling # sampling planner
You may also be interested in passing specific algorithms to run with the --algo
flag. See the argparser details for all available options.
Note that most of the c++
joystick implementations interface through python
(the exception being joystick_client.cpp
(random c++ joystick)) but will still have separate executables from their respective source code.
- Therefore in order to run the RVO, RVOwCkpt, or SocialForces planners, you'll need three terminals to run:
- the
SocNavBench
simulator itself - the
joystick_client.py
client - the c++ binary (
RVO2
orsocial_force
)
The implementation for SACADRL uses this source code and can be installed as follows:
- Install the dependencies mentioned here
- Clone the repo and copy the
gym_collision_avoidance/
directory tojoystick/
directly (NOTjoystick/sacadrl
) - Then you should be able to run the
joystick_client.py
script with--algo sacadrl
and--also sacadrlwckpt
without issue. (Make sure to keep thePYTHONPATH
set to the socnav base dir)
- Add unit tests
- Refactor c++ implementations and building instructions
- Add full support for both modes of robot motion (system dynamics or positional dynamics)
- currently positional dynamics is 100% supported, but system (velocity control) dynamics is still in development