Official Implementation of Dyn-NPField
Paper | Video | Models | Dataset
We address local trajectory planning for a mobile robot in the presence of static and dynamic obstacles. The trajectory is computed as a numerical solution to a Model Predictive Control (MPC) problem, with collision avoidance incorporated by adding obstacle repulsive potential to the MPC cost function. Our approach estimates this repulsive potential using a neural model. We explore three strategies for handling dynamic obstacles: treating them as a sequence of static environments, predicting a full sequence of repulsive potentials at once, and predicting future potentials step by step in an autoregressive mode.
- Docker: Ensure Docker is installed on your machine. You can download it from Docker's official site.
- NVIDIA GPU: Since this Dockerfile is based on NVIDIA CUDA, having an NVIDIA GPU and ensuring NVIDIA Docker Toolkit is installed are necessary for GPU acceleration.
-
Clone the Repository: Begin by cloning the repository containing the Dockerfile to your local machine.
git clone https://github.com/CognitiveAISystems/Dynamic-Neural-Potential-Field cd Dynamic-Neural-Potential-Field
-
Build the Docker Image: Use the following command to build the Docker image from the Dockerfile in your repository. Replace
<your-image-name>
with a name of your choice for the Docker image.docker build -t dyn_npfield .
-
Run the Docker Container: After the image is built, run a container from it. Replace
<your-image-name>
with the name you used in the previous step.docker run -it --gpus all --name dyn_npfield -p 80:80 dyn_npfield
The
--gpus all
flag enables GPU support in the container, and-p 80:80
forwards port 80 from the container to the host, enabling any web service running inside the container to be accessible on the host machine. -
Accessing the Container: You can access the running container via:
docker exec -it dyn_npfield /bin/bash
This will open a bash shell inside the container where you can interact with the software and run commands.
- Ensure CUDA-compatible drivers are installed on your host machine.
- Check for any Docker-related errors during image building or container running by examining the Docker logs.
- Ubuntu 22.04: Ensure you are running on an Ubuntu 22.04 environment.
- NVIDIA GPU: A compatible NVIDIA GPU is necessary since the software relies on CUDA libraries.
- Python, Git, and Build Tools: Install Python, Git, CMake, GCC, and other necessary tools.
-
Install CUDA and NVIDIA Drivers: Install CUDA 12.4.1 and corresponding NVIDIA drivers if they are not already installed.
sudo apt-get install nvidia-cuda-toolkit
-
Clone the Repository: Clone the repository that contains your project.
git clone https://github.com/CognitiveAISystems/Dynamic-Neural-Potential-Field cd Dynamic-Neural-Potential-Field
-
Set Up Python Environment: It's recommended to use a virtual environment.
python3 -m venv env source env/bin/activate pip install --upgrade pip
-
Third Party Libraries: Compile and install the following libraries and their dependencies (PyTorch, CMake etc):
-
Run the Application: Navigate to NPField directory, choose the required version (d1, d2 or d3) and run:
python test_solver.py
- Ensure all dependencies and their versions are correctly installed.
- Verify CUDA and GPU drivers are properly installed and recognized by your system.
If you use this framework please cite the following two papers:
@misc{staroverov2024dynamicneuralpotentialfield,
title={Dynamic Neural Potential Field: Online Trajectory Optimization in Presence of Moving Obstacles},
author={Aleksey Staroverov and Muhammad Alhaddad and Aditya Narendra and Konstantin Mironov and Aleksandr Panov},
year={2024},
eprint={2410.06819},
archivePrefix={arXiv},
primaryClass={cs.RO},
url={https://arxiv.org/abs/2410.06819},
}
@misc{alhaddad2023neuralpotentialfieldobstacleaware,
title={Neural Potential Field for Obstacle-Aware Local Motion Planning},
author={Muhammad Alhaddad and Konstantin Mironov and Aleksey Staroverov and Aleksandr Panov},
year={2023},
eprint={2310.16362},
archivePrefix={arXiv},
primaryClass={cs.RO},
url={https://arxiv.org/abs/2310.16362},
}