[PYTHON] Try using PyODE

I need to calculate the spring damper system and try PyODE. It seems that there is also a similar thing called Pybullet. (Please let me know if you have other alternative options)

The author has run the C / C ++ version of ODE about 5 years ago (around 2015). But ... I can't remember almost anything. I usually use Python now, so I'll try using PyODE.

1 PyODE installation

1.1 Environment etc.

Work time: April 2020 ・ Windows 10 ・ Python 3.8.0 64bit version

↓ I proceeded with reference to here. https://algorithm.joho.info/programming/python/pyode-install/

Remarks

There is a Windows installer on sourceforge, but it must be Python2 (2.5 or 2.6) and it is the 2010 version, so it is excluded from the options. (Link → http://pyode.sourceforge.net/#download) The conclusion is "no need to use the installer".

1.2 Download

Get the whl file according to reference site mentioned above File name: ode-0.15.2-cp38-cp38-win_amd64.whl

1.3 Installation

Open PowerShell in the save destination of whl. (For example, "Shift" + right click) Install with pip command:

Installation with pip


C:\Python380\python.exe -m pip install .\ode-0.15.2-cp38-cp38-win_amd64.whl

(I'm going to call pip with the "-m" option)

Result: "Successfully installed ode-0.15.2" I didn't have any trouble.

2 About visualization tools

PyODE does not have a visualization function. (How was C ++ ODE? I think that OpenGL-like drawing could be used as standard)

For visualization packages combined with PyODE ・ VPython ・ Pygame ・ PyOpenGL ・ PyOgre There are four candidates. (Not famous) The classic one in the past seems to be "VPython". I tried this "VPython" at first, but there was a problem After all, I moved to "Pygame"

2.1 About VPython I installed the latest "version 7" and tried it. -There was a big change when changing from version "5" to "6", and it seems that there is also a considerable change from "6" to "7". There are few samples and articles that can be used in the current version. -The current version is output on the Web browser like "WebGL"

It turns out that. It was hard to handle I gave up using "VPython" and moved to "Pygame".

2.2 pygame I will use this for the time being. Compared to PyOpenGL and PyOgre, I think the amount of description will be smaller. I was able to install the latest version with pip.

2.3 PyOpenGL The installation took a lot of work. (I couldn't get it from pip → See Tutorial 3) More description than VPython or Pygame.

2.4 PyOgre I haven't tried it yet. There is a story that ODE is built in PyOgre.

3 tutorial

There are three tutorials on the original PyODE site. Please also see the article conducted in the foreground.

PyODE Tutorial 1 Description: "Falling object" (without ground)

PyODE Tutorial 2 Summary: "2D drawing with joints and pygame"

PyODE Tutorial 3 Summary: "Many objects falling and stacking and 3D drawing with PyOpenGL" Ground, contact

Recommended Posts

Try using PyODE
Try using Tkinter
Try using docker-py
Try using cookiecutter
Try using geopandas
Try using Selenium
Try using scipy
Try using pandas.DataFrame
Try using django-swiftbrowser
Try using matplotlib
Try using tf.metrics
Try using virtualenv (virtualenvwrapper)
Try using virtualenv now
[Kaggle] Try using LGBM
Try using Python's feedparser.
Try using Python's Tkinter
Try using Tweepy [Python2.7]
Try using Pytorch's collate_fn
Try using PythonTex with Texpad.
[Python] Try using Tkinter's canvas
Try using Jupyter's Docker image
Try using scikit-learn (1) --K-means clustering
Try using matplotlib with PyCharm
Try using Azure Logic Apps
Try using Kubernetes Client -Python-
Try using the Twitter API
Try using OpenCV on Windows
Try using Jupyter Notebook dynamically
Try using AWS SageMaker Studio
Try tweeting automatically using Selenium.
Try using SQLAlchemy + MySQL (Part 1)
Try using the Twitter API
Try using SQLAlchemy + MySQL (Part 2)
Try using the PeeringDB 2.0 API
Try using Pelican's draft feature
Try using pytest-Overview and Samples-
Try doubling the PyODE slider
Try using folium with anaconda
Try using Janus gateway's Admin API
Try using Spyder included in Anaconda
Try using design patterns (exporter edition)
Try using Pillow on iPython (Part 1)
Try using Pillow on iPython (Part 2)
Try using Pleasant's API (python / FastAPI)
Try using LevelDB in Python (plyvel)
Try using pynag to configure Nagios
Try using PyCharm's remote debugging feature
Try using ArUco on Raspberry Pi
Try using cheap LiDAR (Camsense X1)
[Sakura rental server] Try using flask.
Try to get statistics using e-Stat
Try using the Python Cmd module
Try using Python's networkx with AtCoder
Try using Leap Motion in Python
Try using GCP Handwriting Recognition (OCR)
Try using Amazon DynamoDB from Python
code-server Local environment (3) Try using VSCode Plugin
Try using the Wunderlist API in Python
Try mathematical formulas using Σ with python
Try using the web application framework Flask
Try using Bash on Windows 10 2 (TensorFlow installation)