Skip to content

Commit

Permalink
Merge branch 'og-develop' into empty-action
Browse files Browse the repository at this point in the history
  • Loading branch information
cgokmen authored Oct 18, 2024
2 parents 5b6ac5a + a35b5cc commit 99c575e
Show file tree
Hide file tree
Showing 28 changed files with 246 additions and 82 deletions.
32 changes: 32 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: hang-yin

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. Ubuntu 22.04]
- Isaac Sim Version [e.g. 4.1.0]
- OmniGibson Version [e.g. 1.1.0]

**Additional context**
Add any other context about the problem here.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: cgokmen

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.
10 changes: 10 additions & 0 deletions .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
name: Question
about: PLEASE POST QUESTIONS IN THE DISCUSSIONS TAB
title: ''
labels: question
assignees: ''

---

**PLEASE POST QUESTIONS IN THE DISCUSSIONS TAB**
32 changes: 28 additions & 4 deletions .github/workflows/build-push-containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,16 @@ jobs:
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
-
name: Metadata for dev Image
id: meta-dev
uses: docker/metadata-action@v5
with:
images: |
stanfordvl/omnigibson-dev
tags: |
type=ref,event=branch
type=semver,pattern={{version}}
-
name: Metadata for vscode Image
id: meta-vscode
Expand All @@ -97,8 +107,22 @@ jobs:
tags: ${{ steps.meta-prod.outputs.tags }}
labels: ${{ steps.meta-prod.outputs.labels }}
file: docker/prod.Dockerfile
cache-from: type=gha
cache-to: type=gha,mode=min
cache-from: type=registry,ref=stanfordvl/omnigibson:og-develop
cache-to: type=inline

-
name: Build and push dev image
id: build-dev
uses: docker/build-push-action@v5
with:
context: .
build-args: "DEV_MODE=1"
push: true
tags: ${{ steps.meta-dev.outputs.tags }}
labels: ${{ steps.meta-dev.outputs.labels }}
file: docker/prod.Dockerfile
cache-from: type=registry,ref=stanfordvl/omnigibson:og-develop # OK to share cache here.
cache-to: type=inline

- name: Update vscode image Dockerfile with prod image tag
run: |
Expand All @@ -113,5 +137,5 @@ jobs:
tags: ${{ steps.meta-vscode.outputs.tags }}
labels: ${{ steps.meta-vscode.outputs.labels }}
file: docker/vscode.Dockerfile
cache-from: type=gha
cache-to: type=gha,mode=min
cache-from: type=registry,ref=stanfordvl/omnigibson:og-develop # OK to share cache here.
cache-to: type=inline
14 changes: 3 additions & 11 deletions .github/workflows/examples-as-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,10 @@ jobs:
with:
submodules: true
path: omnigibson-src

- name: Install dev requirements
working-directory: omnigibson-src
run: pip install -r requirements-dev.txt


- name: Install
working-directory: omnigibson-src
run: pip install -e .
run: pip install -e .[dev]

- name: Generate example tests
working-directory: omnigibson-src
Expand Down Expand Up @@ -78,13 +74,9 @@ jobs:
submodules: true
path: omnigibson-src

- name: Install dev requirements
working-directory: omnigibson-src
run: pip install -r requirements-dev.txt

- name: Install
working-directory: omnigibson-src
run: pip install -e .
run: pip install -e .[dev]

- name: Run tests
working-directory: omnigibson-src
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/profiling.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,9 @@ jobs:
- name: Checkout source
uses: actions/checkout@v3

- name: Install dev requirements
run: pip install -r requirements-dev.txt

- name: Install
run: pip install -e .
working-directory: omnigibson-src
run: pip install -e .[dev]

- name: Run performance benchmark
run: bash scripts/profiling.sh
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,12 @@ jobs:
submodules: true
path: omnigibson-src

- name: Install dev requirements
working-directory: omnigibson-src
run: pip install -r requirements-dev.txt

- name: Install
working-directory: omnigibson-src
run: pip install -e .
run: pip install -e .[dev]

- name: Print env
run: printenv

- name: Run tests
working-directory: omnigibson-src
Expand Down
8 changes: 8 additions & 0 deletions docker/build_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ docker build \
-f docker/prod.Dockerfile \
.

# Pass the DEV_MODE=1 arg to the docker build command to build the development image
docker build \
-t stanfordvl/omnigibson-dev:latest \
-t stanfordvl/omnigibson-dev:$(sed -ne "s/.*version= *['\"]\([^'\"]*\)['\"] *.*/\1/p" setup.py) \
-f docker/prod.Dockerfile \
--build-arg DEV_MODE=1 \
.

docker build \
-t stanfordvl/omnigibson-vscode:latest \
-f docker/vscode.Dockerfile \
Expand Down
4 changes: 2 additions & 2 deletions docker/gh-actions/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM stanfordvl/omnigibson:og-develop
FROM stanfordvl/omnigibson-dev:og-develop

ARG DUMB_INIT_VERSION="1.2.2"
ARG GIT_CORE_PPA_KEY="A1715D88E1DF1F24"
Expand Down Expand Up @@ -99,7 +99,7 @@ RUN echo en_US.UTF-8 UTF-8 >> /etc/locale.gen \
ENV AGENT_TOOLSDIRECTORY=/opt/hostedtoolcache
RUN mkdir -p /opt/hostedtoolcache

ARG GH_RUNNER_VERSION="2.311.0"
ARG GH_RUNNER_VERSION="2.320.0"

ARG TARGETPLATFORM

Expand Down
21 changes: 16 additions & 5 deletions docker/prod.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,28 @@ RUN micromamba run -n omnigibson /bin/bash --login -c 'source /isaac-sim/setup_c
# Test OMPL
RUN micromamba run -n omnigibson python -c "from ompl import base"

# Add setup to be executed on bash launch
RUN echo "OMNIGIBSON_NO_OMNIVERSE=1 python omnigibson/download_datasets.py" >> /root/.bashrc

# Copy over omnigibson source
ADD . /omnigibson-src
WORKDIR /omnigibson-src

# Set the shell
SHELL ["micromamba", "run", "-n", "omnigibson", "/bin/bash", "--login", "-c"]

# Install OmniGibson
RUN micromamba run -n omnigibson pip install -e .
# Optionally install OmniGibson (e.g. unless the DEV_MODE flag is set) or
# remove the OmniGibson source code if we are in dev mode and change the workdir
ARG DEV_MODE
ENV DEV_MODE=${DEV_MODE}
ARG WORKDIR_PATH=/omnigibson-src
RUN if [ "$DEV_MODE" != "1" ]; then \
echo "OMNIGIBSON_NO_OMNIVERSE=1 python omnigibson/download_datasets.py" >> /root/.bashrc; \
micromamba run -n omnigibson pip install -e .[dev]; \
else \
WORKDIR_PATH=/; \
cd / && rm -rf /omnigibson-src; \
fi

# Reset the WORKDIR based on whether or not we are in dev mode
WORKDIR ${WORKDIR_PATH}

ENTRYPOINT ["micromamba", "run", "-n", "omnigibson"]
CMD ["/bin/bash"]
10 changes: 7 additions & 3 deletions omnigibson/examples/robots/robot_control_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,19 @@ def choose_controllers(robot, random_selection=False):
default_config = robot._default_controller_config

# Iterate over all components in robot
for component, controller_options in default_config.items():
controller_names = robot.controller_order
for controller_name in controller_names:
controller_options = default_config[controller_name]
# Select controller
options = list(sorted(controller_options.keys()))
choice = choose_from_options(
options=options, name="{} controller".format(component), random_selection=random_selection
options=options,
name=f"{controller_name} controller",
random_selection=random_selection,
)

# Add to user responses
controller_choices[component] = choice
controller_choices[controller_name] = choice

return controller_choices

Expand Down
6 changes: 3 additions & 3 deletions omnigibson/robots/a1.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ def assisted_grasp_end_points(self):
@property
def disabled_collision_pairs(self):
# some dexhand has self collisions that needs to be filtered out
pairs = [["base_link", "connector"]]
if self.end_effector == "inspire":
return [["base_link", "link12"]]
else:
return []
pairs.append(["base_link", "link12"])
return pairs
2 changes: 1 addition & 1 deletion omnigibson/robots/articulated_trunk_robot.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def __init__(
scale=None,
visible=True,
visual_only=False,
self_collisions=False,
self_collisions=True,
load_config=None,
fixed_base=False,
# Unique to USDObject hierarchy
Expand Down
2 changes: 1 addition & 1 deletion omnigibson/robots/fetch.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def __init__(
scale=None,
visible=True,
visual_only=False,
self_collisions=False,
self_collisions=True,
load_config=None,
fixed_base=False,
# Unique to USDObject hierarchy
Expand Down
2 changes: 1 addition & 1 deletion omnigibson/robots/holonomic_base_robot.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def __init__(
visible=True,
fixed_base=False,
visual_only=False,
self_collisions=False,
self_collisions=True,
load_config=None,
# Unique to USDObject hierarchy
abilities=None,
Expand Down
12 changes: 12 additions & 0 deletions omnigibson/robots/locobot.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,15 @@ def usd_path(self):
@property
def urdf_path(self):
return os.path.join(gm.ASSET_PATH, "models/locobot/locobot.urdf")

@property
def disabled_collision_pairs(self):
# badly modeled gripper collision meshes
return [
["base_link", "arm_base_link"],
["base_link", "plate_2"],
["cam_mount", "forearm_link"],
["cam_mount", "elbow_link"],
["cam_mount", "plate_1"],
["cam_mount", "plate_2"],
]
2 changes: 1 addition & 1 deletion omnigibson/robots/manipulation_robot.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def __init__(
visible=True,
fixed_base=False,
visual_only=False,
self_collisions=False,
self_collisions=True,
load_config=None,
# Unique to USDObject hierarchy
abilities=None,
Expand Down
2 changes: 1 addition & 1 deletion omnigibson/robots/mobile_manipulation_robot.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def __init__(
scale=None,
visible=True,
visual_only=False,
self_collisions=False,
self_collisions=True,
load_config=None,
fixed_base=False,
# Unique to USDObject hierarchy
Expand Down
5 changes: 4 additions & 1 deletion omnigibson/robots/r1.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def __init__(
scale=None,
visible=True,
visual_only=False,
self_collisions=False,
self_collisions=True,
load_config=None,
# Unique to USDObject hierarchy
abilities=None,
Expand Down Expand Up @@ -254,4 +254,7 @@ def disabled_collision_pairs(self):
return [
["left_gripper_link1", "left_gripper_link2"],
["right_gripper_link1", "right_gripper_link2"],
["base_link", "wheel_link1"],
["base_link", "wheel_link2"],
["base_link", "wheel_link3"],
]
2 changes: 1 addition & 1 deletion omnigibson/robots/robot_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def __init__(
visible=True,
fixed_base=False,
visual_only=False,
self_collisions=False,
self_collisions=True,
load_config=None,
# Unique to USDObject hierarchy
abilities=None,
Expand Down
7 changes: 7 additions & 0 deletions omnigibson/robots/stretch.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,14 @@ def disabled_collision_pairs(self):
["link_arm_l4", "link_arm_l3"],
["link_arm_l4", "link_arm_l2"],
["link_arm_l4", "link_arm_l1"],
["link_arm_l4", "link_aruco_inner_wrist"],
["link_arm_l3", "link_arm_l2"],
["link_arm_l3", "link_arm_l1"],
["link_arm_l3", "link_aruco_top_wrist"],
["link_arm_l3", "link_aruco_inner_wrist"],
["link_arm_l2", "link_arm_l1"],
["link_arm_l2", "link_aruco_top_wrist"],
["link_arm_l2", "link_aruco_inner_wrist"],
["link_arm_l0", "link_arm_l1"],
["link_arm_l0", "link_arm_l2"],
["link_arm_l0", "link_arm_l3"],
Expand All @@ -131,6 +136,8 @@ def disabled_collision_pairs(self):
["link_arm_l0", "link_wrist_yaw_bottom"],
["link_arm_l0", "link_wrist_pitch"],
["link_wrist_yaw_bottom", "link_wrist_pitch"],
["link_wrist_yaw_bottom", "link_arm_l4"],
["link_wrist_yaw_bottom", "link_arm_l3"],
["gripper_camera_link", "link_gripper_s3_body"],
["link_gripper_s3_body", "link_aruco_d405"],
["link_gripper_s3_body", "link_gripper_finger_left"],
Expand Down
2 changes: 1 addition & 1 deletion omnigibson/robots/tiago.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def __init__(
scale=None,
visible=True,
visual_only=False,
self_collisions=False,
self_collisions=True,
load_config=None,
# Unique to USDObject hierarchy
abilities=None,
Expand Down
Loading

0 comments on commit 99c575e

Please sign in to comment.