Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Python Project with Drake Installed from Poetry

This installs Drake using poetry, the Python package manager. For an introduction to poetry, see Basic usage.

Instructions

The pyproject.toml file found in this directory contains all that is needed to start a Poetry project using Drake.

First, follow the Installation Instructions to install Poetry using your preferred method.

Run the installation script to perform the following:

  • install the required system packages for Drake (Ubuntu only)
  • set up your Poetry environment and install Drake
    • The poetry.lock file listing all dependencies and their versions is not included with this example in order to reduce confusion and keep the version of Drake up to date. It will be created once the environment is set up, and it is encouraged to include this file in your own project's version control in order to manage your project's dependencies.
setup/install_prereqs

Note: If you have multiple versions of Python installed, you can specify the correct version as an optional argument to the script. For example, to use python3.14, call:

setup/setup_env --python-version 3.14

Refer to the Drake installation documentation for the versions of Python officially supported on each OS when installing via PyPI.

Examples

To run the particle example tests in this directory, navigate to src and call the test file to execute the unit tests:

cd src
poetry run python particle_test.py

For more information on what's available for Drake in Python, see Using Drake from Python and the Python API pydrake.