Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Contributing to EmbodiChain

Thank you for your interest in contributing to EmbodiChain! We welcome contributions from the community to help make this project better.

## Bug report and feature requests

### Bug Report

If you encounter a bug, please use the **Bug Report** template to submit an issue.
* Check if the issue has already been reported.
* Use the [Bug Report Template](.github/ISSUE_TEMPLATE/bug.md) when creating a new issue.
* Provide a clear and concise description of the bug.
* Include steps to reproduce the bug, along with error messages and stack traces if applicable.

### Feature Requests

If you have an idea for a new feature or improvement, please use the **Proposal** template.
* Use the [Proposal Template](.github/ISSUE_TEMPLATE/proposal.md).
* Describe the feature and its core capabilities.
* Explain the motivation behind the proposal and the problem it solves.

## Pull requests

We welcome pull requests for bug fixes, new features, and documentation improvements.

1. **Fork the repository** and create a new branch for your changes.
2. **Make your changes**. Please ensure your code is clean and readable.
3. **Run formatters**. We use `black` for code formatting. Please run it before submitting your PR.
```bash
black .
```
> Currently, we use black==24.3.0 for formatting. Make sure to use the same version to avoid inconsistencies.
4. **Submit a Pull Request**.
* Use the [Pull Request Template](.github/PULL_REQUEST_TEMPLATE.md).
* Keep PRs small and focused.
* Include a summary of the changes and link to any relevant issues (e.g., `Fixes #123`).
* Ensure all checks pass.

## Contribute specific robots

TODO: Add instructions for contributing new robot models and its configurations.

## Contribute specific environments

To contribute a new environment:

TODO: Add instructions for contributing new environments.
11 changes: 3 additions & 8 deletions tests/sim/solvers/test_differential_solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,14 +119,9 @@ def test_differential_solver(self, arm_name: str):
assert res[0] == False
assert ik_qpos.shape == (1, dof)

@classmethod
def teardown_class(cls):
if cls.sim is not None:
try:
cls.sim.destroy()
print("sim destroyed successfully")
except Exception as e:
print(f"Error during sim.destroy(): {e}")
def teardown_method(self):
"""Clean up resources after each test method."""
self.sim.destroy()


class TestDifferentialSolver(BaseSolverTest):
Expand Down
11 changes: 3 additions & 8 deletions tests/sim/solvers/test_opw_solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,9 @@ def test_ik(self, arm_name: str):
assert res[0] == False
assert ik_qpos.shape == (1, dof)

@classmethod
def teardown_class(cls):
if cls.sim is not None:
try:
cls.sim.destroy()
print("sim destroyed successfully")
except Exception as e:
print(f"Error during sim.destroy(): {e}")
def teardown_method(self):
"""Clean up resources after each test method."""
self.sim.destroy()


class TestOPWSolver(BaseSolverTest):
Expand Down
11 changes: 3 additions & 8 deletions tests/sim/solvers/test_pink_solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,9 @@ def test_differential_solver(self):
assert res[0] == False
assert ik_qpos.shape == (1, dof)

@classmethod
def teardown_class(cls):
if cls.sim is not None:
try:
cls.sim.destroy()
print("sim destroyed successfully")
except Exception as e:
print(f"Error during sim.destroy(): {e}")
def teardown_method(self):
"""Clean up resources after each test method."""
self.sim.destroy()


@pytest.mark.skip(reason="Skipping Pink tests temporarily")
Expand Down
11 changes: 3 additions & 8 deletions tests/sim/solvers/test_pinocchio_solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,9 @@ def test_ik(self, arm_name: str):
assert res[0] == False
assert ik_qpos.shape == (1, dof)

@classmethod
def teardown_class(cls):
if cls.sim is not None:
try:
cls.sim.destroy()
print("sim destroyed successfully")
except Exception as e:
print(f"Error during sim.destroy(): {e}")
def teardown_method(self):
"""Clean up resources after each test method."""
self.sim.destroy()


class TestPinocchioSolver(BaseSolverTest):
Expand Down
11 changes: 3 additions & 8 deletions tests/sim/solvers/test_pytorch_solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,9 @@ def test_ik(self, arm_name: str):
assert res[0] == False
assert ik_qpos.shape == (1, dof)

@classmethod
def teardown_class(cls):
if cls.sim is not None:
try:
cls.sim.destroy()
print("sim destroyed successfully")
except Exception as e:
print(f"Error during sim.destroy(): {e}")
def teardown_method(self):
"""Clean up resources after each test method."""
self.sim.destroy()


class TestPytorchSolver(BaseSolverTest):
Expand Down
11 changes: 3 additions & 8 deletions tests/sim/solvers/test_srs_solver.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,14 +269,9 @@ def test_robot_ik(self, arm_name: str):
assert res[0] == False
assert ik_qpos.shape == (1, dof)

@classmethod
def teardown_class(cls):
if cls.sim is not None:
try:
cls.sim.destroy()
print("sim destroyed successfully")
except Exception as e:
print(f"Error during sim.destroy(): {e}")
def teardown_method(self):
"""Clean up resources after each test method."""
self.sim.destroy()


class TestSRSCPUSolver(BaseSolverTest):
Expand Down
11 changes: 3 additions & 8 deletions tests/sim/utility/test_workspace_analyze.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,9 @@ def setup_simulation(self):

self.robot: Robot = self.sim.add_robot(cfg=CobotMagicCfg.from_dict(cfg_dict))

@classmethod
def teardown_class(cls):
if cls.sim is not None:
try:
cls.sim.destroy()
print("sim destroyed successfully")
except Exception as e:
print(f"Error during sim.destroy(): {e}")
def teardown_method(self):
"""Clean up resources after each test method."""
self.sim.destroy()


class TestJointWorkspaceAnalyzeTest(BaseWorkspaceAnalyzeTest):
Expand Down
Loading