Skip to content

Commit

Permalink
Merge branch 'dev' of github.com:cram2/pycram into full-body-giskard
Browse files Browse the repository at this point in the history
  • Loading branch information
Tigul committed May 22, 2024
2 parents e200641 + a0fcebc commit c0f5ec4
Show file tree
Hide file tree
Showing 40 changed files with 1,301 additions and 33 deletions.
15 changes: 15 additions & 0 deletions .devcontainer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# How to use Dev container

- Install Docker and the 'Devcontainer' extension in VSCode

- Clone the repository and open the folder in VSCode

- Use `Ctrl/Cmd + Shift + P` to open the command palette

- Select 'Dev containers: Rebuild and Reopen in Container' Option

- Wait for the container to finish setting up

- Type this command into the terminal `roslaunch pycram ik_and_description.launch` to start roscore

- Note: Bullet world needs a display to be connected; the render mode needs to be set to direct when running on GitHub codespaces or on WindowOS; Otherwise, the kernel will crash
23 changes: 23 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "PyCRAM vscode devcontainer",
"image": "pycram/pycram:dev",
"features": {
"ghcr.io/devcontainers/features/git:1": {},
"ghcr.io/devcontainers/features/sshd:1": {}
},
"postStartCommand": {
"pip": "pip3 install ipykernel pyjpt",
"git": "git config --global --add safe.directory '*'",
"source setup": "./.devcontainer/script.sh"
},
"customizations": {
"vscode": {
"extensions": [
"ms-python.python",
"ms-python.vscode-pylance",
"ms-toolsai.jupyter",
"esbenp.prettier-vscode"
]
}
}
}
7 changes: 7 additions & 0 deletions .devcontainer/script.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

set -e

source /opt/ros/overlay_ws/devel/setup.bash

exec "$@"
2 changes: 1 addition & 1 deletion .github/workflows/new-pycram-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
rm -rf /opt/ros/overlay_ws/src/pycram/*
cd /opt/ros/overlay_ws/src/pycram
rm -rf .git .github .gitignore .gitmodules .readthedocs.yaml
mv /__w/${{ github.event.repository.name }}/${{ github.event.repository.name }}/ros/src/pycram /opt/ros/overlay_ws/src
cp -r /__w/${{ github.event.repository.name }}/${{ github.event.repository.name }}/ros/src/pycram /opt/ros/overlay_ws/src
- name: Remake workspace & start roscore
run: |
Expand Down
36 changes: 36 additions & 0 deletions binder/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
FROM intel4coro/base-notebook:20.04-noetic-full-xpra

# Set environment
ENV PATH=$PATH:/home/user/.local/bin
ENV PYCRAM_WS=/home/${NB_USER}/workspace/ros
WORKDIR ${PYCRAM_WS}/src/
COPY --chown=${NB_USER}:users . pycram/
RUN vcs import --input pycram/binder/pycram-http.rosinstall --recursive

RUN pip install --requirement ${PYCRAM_WS}/src/pycram/binder/requirements.txt --user

COPY --chown=${NB_USER}:users binder/me ${PYCRAM_WS}/src/me

USER root
RUN apt-get update

# Build pycram workspace
WORKDIR ${PYCRAM_WS}
USER root
RUN rosdep update \
&& rosdep install -y --ignore-src --from-paths ./ -r \
&& rosdep fix-permissions
USER ${NB_USER}
RUN catkin build

RUN pip install service_identity

# Jupyter Config
COPY --chown=${NB_USER}:users binder/jupyter-config.json /opt/conda/share/jupyter/lab/settings/overrides.json

WORKDIR ${PYCRAM_WS}/src/pycram
RUN git config --global --add safe.directory ${PWD}
COPY --chown=${NB_USER}:users binder/entrypoint.sh /
ENTRYPOINT ["/entrypoint.sh"]
CMD ["jupyter", "lab", "--allow-root", "--NotebookApp.token=''", "--no-browser", "--ip=0.0.0.0"]
RUN pip install https://raw.githubusercontent.com/yxzhan/jupyterlab-rviz/master/dist/jupyterlab_rviz-0.3.1.tar.gz
Loading

0 comments on commit c0f5ec4

Please sign in to comment.