Skip to content

๐Ÿš€ Simulating quadruped robots with parallel processing! ๐Ÿพ Optimize trajectory planning, visualize in 3D, and benchmark performance. Powered by PyBullet. ๐Ÿ’ปโœจ

License

Notifications You must be signed in to change notification settings

rorosaga/QuadRobotParallelSim

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

92 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

QuadRobotParallelSim ๐Ÿค–๐Ÿพ

QuadRobotParallelSim is a high-performance Python-based simulation framework for trajectory planning and optimization of quadruped robots. Leveraging shared memory parallelism, this project accelerates simulation speed and enhances performance, enabling real-time trajectory tracking and visualization using PyBullet and Matplotlib.

vid1

Table of Contents ๐Ÿ“š

Overview ๐ŸŒ

Quadruped robots are essential for navigating complex terrains in applications like search-and-rescue and agricultural automation. This project explores the benefits of parallelizing trajectory simulations to optimize performance using Python's multiprocessing capabilities. Key goals include:

  • Simulating multiple quadrupeds with independent trajectory planning.
  • Introducing realistic movement through oval trajectories with jitter.
  • Visualizing real-time leg trajectories in 3D.

The project was developed as part of the research "How Can Shared Memory Parallelism Improve Simulation Speed and Overall Performance in Quadruped Robot Trajectory Planning?"

Features ๐Ÿš€

  • Parallelized Simulations: Run multiple PyBullet clients in parallel using Python's multiprocessing library.
  • Oval Trajectory Planning: Generate smooth, oval-shaped trajectories with customizable parameters like radius, height, and jitter for added unpredictability.
  • 3D Real-Time Visualization: Plot leg trajectories in real-time with Matplotlib.
  • Interactive GUI: Adjust trajectory parameters dynamically during the simulation via PyBullet's GUI sliders.
  • Performance Benchmarking: Compare execution times between parallel and serial simulations by running parallel_log.py/serial_log.py, and plot with plot_logs.py.

Installation ๐Ÿ› ๏ธ

Prerequisites

Steps

  1. ๐ŸŒ€ Clone the repository:
    git clone https://github.com/rorosaga/QuadRobotParallelSim
    cd QuadRobotParallelSim
  2. ๐Ÿ“ฆ Install the required packages:
    pip install -r requirements.txt

Usage ๐ŸŽฎ๏ธ

๐Ÿƒโ€โ™€๏ธ Run the parallel simulation:

cd src
python final_parallel.py

๐Ÿ“Š Plot the performance logs:

python parallel_log.py
python serial_log.py
python plot_logs.py

Methodology ๐Ÿ”ฌ

๐Ÿ› ๏ธ Each robot is initialized with independent PyBullet clients. Trajectories are generated using oval equations with added jitter for realism. ๐Ÿ› ๏ธ

โšกTrajectory computations for multiple quadrupeds are parallelized across CPU cores.โšก

๐Ÿ‘€ Shared queues handle inter-process communication for real-time plotting. ๐Ÿ‘€

๐ŸŽฅ Leg positions are plotted in 3D using Matplotlib, showing dynamic updates in real-time. ๐ŸŽฅ

Performance Evaluation โš–๏ธ

No. Simulations Serial Time (s) Parallel Time (s) SpeedUp
3 9.32 3.22 2.89x
4 13.68 5.03 2.72x
... ... ... ...

speedup

Don't hesitate to reach out if you have any questions or suggestions! ๐Ÿฆพ

Acknowledgments

This project is based on LeggedRobotsForBullet by Haruki Takamura. The original project is licensed under the MIT License.

About

๐Ÿš€ Simulating quadruped robots with parallel processing! ๐Ÿพ Optimize trajectory planning, visualize in 3D, and benchmark performance. Powered by PyBullet. ๐Ÿ’ปโœจ

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.9%
  • Shell 0.1%