Skip to main content

A package for adding a simulation environment to a tide robot

Project description

Tide Simulation

A Python package for adding a simulation environment to a tide robot using PyBullet. This package provides a simulation node that can be used to simulate robot behavior in a physics environment.

Features

  • PyBullet-based physics simulation
  • Real-time robot joint control
  • Integration with tide robot framework
  • Support for custom URDF models
  • Configurable simulation parameters

Installation

From GitHub

You can install the package directly from GitHub using pip:

pip install git+https://github.com/schreiaj/tide-sim.git

Or with uv:

uv pip install git+https://github.com/schreiaj/tide-sim.git

Usage

The package provides a SimulationNode class that can be used to simulate robot behavior:

It can be used like any other node in your tide project

- type: tide_sim.SimulationNode
    params:
      robot_id: "simbot"
      sim_rate: 60
      update_rate: 20

Configuration Options

  • robot_id: Identifier for the robot (default: "simbot")
  • headless: Run simulation without GUI (default: False)
  • sim_rate: Physics simulation rate in Hz (default: 240)
  • update_rate: Rate at which pose updates will be published
  • urdf_path: Path to the robot's URDF file (default: "assets/simulation/robot.urdf")

Joint Control

The simulation node subscribes to joint state commands and applies them to the simulated robot:

It uses the joint names from the URDF file. If positions are specified it will use a position controller with velocity and effort constraints. If no position but a velocity it will use a velocity controller with effort constraints. If no position or velocity it will use a torque controller.

It is criticl that all arrays are the same length. This may be enforced in the future but for now it will just cause runtime errors.

from tide_sim import JointState

# Create a joint state command
joint_state = JointState(
    name=["joint1", "joint2"],
    position=[0.0, 1.57],  # in radians
    velocity=[],   # in rad/s
    effort=[]      # in N⋅m
)

# The simulation node will automatically apply these joint states

Development

For development, clone the repository and install in editable mode:

# Clone the repository
git clone https://github.com/schreiaj/tide-sim.git
cd tide-sim

# Create virtual environment and install dependencies
make install

# Install pre-commit hooks (optional but recommended)
pip install pre-commit
pre-commit install

The project uses several development tools:

  • black for code formatting
  • isort for import sorting
  • ruff for linting
  • mypy for type checking
  • pytest for testing

To run the development tools:

make test     # Run tests
make lint     # Run linters
make format   # Format code
make clean    # Clean up build artifacts

Dependencies

  • pybullet>=3.2.7: Physics simulation engine
  • tide-sdk>=0.1.5: Tide robot framework integration

License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tide_sim-0.2.0.tar.gz (4.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tide_sim-0.2.0-py3-none-any.whl (7.6 kB view details)

Uploaded Python 3

File details

Details for the file tide_sim-0.2.0.tar.gz.

File metadata

  • Download URL: tide_sim-0.2.0.tar.gz
  • Upload date:
  • Size: 4.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for tide_sim-0.2.0.tar.gz
Algorithm Hash digest
SHA256 6db9eaa3cd0b06f051163ce4b71ab6bccb6392cc5fc847460625974429ef2518
MD5 389ad6d2ea5672503f6f45c8da7061d7
BLAKE2b-256 630dd05df11a64e2bb59dfe6b91847ab7b6afbafee6f84a2e1ad8809346ebdc4

See more details on using hashes here.

Provenance

The following attestation bundles were made for tide_sim-0.2.0.tar.gz:

Publisher: publish.yml on schreiaj/tide-sim

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tide_sim-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: tide_sim-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 7.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for tide_sim-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cb1a4b5e2297cebae7f705433249a5a3393f034bc1dec1a5b5de28334322f2a0
MD5 9a2a02dc4a1b893c1338ec0e7bfb7cdd
BLAKE2b-256 07e76bac8970bbe14e80375c75604ee73b03430fe6c5fab12c4628952a12dc22

See more details on using hashes here.

Provenance

The following attestation bundles were made for tide_sim-0.2.0-py3-none-any.whl:

Publisher: publish.yml on schreiaj/tide-sim

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page