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 publishedurdf_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:
blackfor code formattingisortfor import sortingrufffor lintingmypyfor type checkingpytestfor 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 enginetide-sdk>=0.1.5: Tide robot framework integration
License
MIT License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
de59089daad6e6eb89f666d2d1bcd92b52eaedbd9b2a3a918387de9425fe3516
|
|
| MD5 |
3295d2e4672a3090631b263da34aee98
|
|
| BLAKE2b-256 |
7fbe6e50fc0e612d4eba7d019d2cdc6bb4cc4f579c05978d3952adde2b676f17
|
Provenance
The following attestation bundles were made for tide_sim-0.1.0.tar.gz:
Publisher:
publish.yml on schreiaj/tide-sim
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tide_sim-0.1.0.tar.gz -
Subject digest:
de59089daad6e6eb89f666d2d1bcd92b52eaedbd9b2a3a918387de9425fe3516 - Sigstore transparency entry: 233768592
- Sigstore integration time:
-
Permalink:
schreiaj/tide-sim@2ab40e7b006ddb62b805538a3bed8030fb909675 -
Branch / Tag:
refs/tags/v0.0.1-alpha - Owner: https://github.com/schreiaj
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2ab40e7b006ddb62b805538a3bed8030fb909675 -
Trigger Event:
release
-
Statement type:
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5ddc117c377cee07365841440e23ef7d91d4420b9d52851ec5afe1283cf5023e
|
|
| MD5 |
d73bfaf58ac3c08069a303e845137c98
|
|
| BLAKE2b-256 |
a6a0fba0cc1a290840aa1f98af99fe379bc95fdd749126b077da3b45a1944198
|
Provenance
The following attestation bundles were made for tide_sim-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on schreiaj/tide-sim
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tide_sim-0.1.0-py3-none-any.whl -
Subject digest:
5ddc117c377cee07365841440e23ef7d91d4420b9d52851ec5afe1283cf5023e - Sigstore transparency entry: 233768596
- Sigstore integration time:
-
Permalink:
schreiaj/tide-sim@2ab40e7b006ddb62b805538a3bed8030fb909675 -
Branch / Tag:
refs/tags/v0.0.1-alpha - Owner: https://github.com/schreiaj
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@2ab40e7b006ddb62b805538a3bed8030fb909675 -
Trigger Event:
release
-
Statement type: