Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
yijiangh committed Mar 8, 2022
2 parents 0ca5e92 + cc90e86 commit 884b338
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 4 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/deploy-and-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: deploy-and-publish

on:
push:
branches:
- dev
tags:
- 'v*'
pull_request:
branches:
- dev

jobs:
build:
name: build and deploy docs
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: 🔗 Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install wheel
- name: 💎 Install
run: |
python -m pip install --no-cache-dir -r requirements-dev.txt
- name: 💃 Build release
if: success() && startsWith(github.ref, 'refs/tags')
run: |
python setup.py clean --all sdist bdist_wheel
- name: 📦 Publish release to PyPI
if: success() && startsWith(github.ref, 'refs/tags')
run: |
twine check dist/*
twine upload dist/* --skip-existing
with:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.pypi_password }}
10 changes: 6 additions & 4 deletions src/pybullet_planning/interfaces/env_manager/simulation.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def restore(self):
set_renderer(enable=self.state)


def connect(use_gui=True, shadows=True, color=None, width=None, height=None):
def connect(use_gui=True, shadows=True, color=None, width=None, height=None, mp4=None):
# Shared Memory: execute the physics simulation and rendering in a separate process
# https://github.com/bulletphysics/bullet3/blob/master/examples/pybullet/examples/vrminitaur.py#L7
# make sure to compile pybullet with PYBULLET_USE_NUMPY enabled
Expand All @@ -85,11 +85,13 @@ def connect(use_gui=True, shadows=True, color=None, width=None, height=None):
# options="--mp4=\"test.mp4\" --mp4fps=240"
options = ''
if color is not None:
options += '--background_color_red={} --background_color_green={} --background_color_blue={}'.format(*color)
options += ' --background_color_red={} --background_color_green={} --background_color_blue={}'.format(*color)
if width is not None:
options += '--width={}'.format(width)
options += ' --width={}'.format(width)
if height is not None:
options += '--height={}'.format(height)
options += ' --height={}'.format(height)
if mp4 is not None:
options += ' --mp4={}'.format(mp4)
sim_id = p.connect(method, options=options) # key=None,
#sim_id = p.connect(p.GUI, options="--opengl2") if use_gui else p.connect(p.DIRECT)
assert 0 <= sim_id
Expand Down

0 comments on commit 884b338

Please sign in to comment.