This project implements a robot path planning simulation using CoppeliaSim (V-REP) software. It demonstrates the use of Dijkstra's algorithm and Breadth-First Search (BFS) for path planning, along with obstacle avoidance capabilities. The simulation features an interactive UI for controlling the robot and setting parameters.
- Path planning using Dijkstra's algorithm and BFS
- Interactive obstacle generation
- Real-time obstacle avoidance
- Customizable start and end points
- Visualized path drawing
- Adjustable robot speed and sensor parameters
- CoppeliaSim (V-REP) software
- Python 3.x
- NumPy library
- Clone this repository to your local machine.
- Ensure you have CoppeliaSim installed.
- Install the required Python libraries:
- Open the CoppeliaSim scene file (not provided in the code snippet).
- Run the simulation in CoppeliaSim.
- Use the interactive UI to:
- Set the obstacle percentage
- Define start and end points
- Choose between Dijkstra's algorithm and BFS
- Initiate the path planning and robot movement
sysCall_init(): Initializes the simulation, sets up the environment, and creates the UI._graph(): Defines the Graph class for creating and managing the navigation graph.run_dijkstra()andrun_bfs(): Implement Dijkstra's algorithm and BFS respectively.move_towards_path(): Controls the robot's movement along the planned path.avoid_obstacle(): Implements the obstacle avoidance algorithm.- Various UI callback functions for handling user interactions.
- Graph Generation: Creates a graph representation of the environment, including randomly generated obstacles.
- Path Planning Algorithms:
- Dijkstra's algorithm for finding the shortest path
- BFS for exploring all possible paths
- Robot Control: Functions to move the robot along the planned path and avoid obstacles.
- Sensor Integration: Uses proximity sensors for obstacle detection.
- Visualization: Draws the robot's path and highlights obstacles in the simulation.
You can modify various parameters in the code to adjust the simulation:
x_scaleandy_scale: Change the size of the simulation areavelocity: Adjust the robot's movement speednode_radius: Modify the size of path nodesrandom_percent: Change the density of randomly generated obstacles
Contributions to improve the simulation or add new features are welcome. Please feel free to fork the repository and submit pull requests.
[This Project is Open Sourced]
- CoppeliaSim (V-REP) for providing the simulation environment
- Contributors and maintainers of the NumPy library
linkedin: https://www.linkedin.com/in/humpheryotu/, Email: humpheryufuoma@gmail.com