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.1.0.tar.gz (9.7 kB 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.1.0-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for tide_sim-0.1.0.tar.gz
Algorithm Hash digest
SHA256 de59089daad6e6eb89f666d2d1bcd92b52eaedbd9b2a3a918387de9425fe3516
MD5 3295d2e4672a3090631b263da34aee98
BLAKE2b-256 7fbe6e50fc0e612d4eba7d019d2cdc6bb4cc4f579c05978d3952adde2b676f17

See more details on using hashes here.

Provenance

The following attestation bundles were made for tide_sim-0.1.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.1.0-py3-none-any.whl.

File metadata

  • Download URL: tide_sim-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.4 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5ddc117c377cee07365841440e23ef7d91d4420b9d52851ec5afe1283cf5023e
MD5 d73bfaf58ac3c08069a303e845137c98
BLAKE2b-256 a6a0fba0cc1a290840aa1f98af99fe379bc95fdd749126b077da3b45a1944198

See more details on using hashes here.

Provenance

The following attestation bundles were made for tide_sim-0.1.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