Skip to content

Commit

Permalink
fix: devcontainer setup install pinocchio their apt mirror
Browse files Browse the repository at this point in the history
expose env variables accordingly
  • Loading branch information
BarisYazici committed Sep 12, 2024
1 parent d3d0fb4 commit bf215df
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 6 deletions.
17 changes: 14 additions & 3 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ RUN apt-get update && \
ros-humble-joint-state-publisher-gui \
ros-humble-launch-testing \
ros-humble-moveit \
ros-humble-pinocchio \
ros-humble-realtime-tools \
ros-humble-ros2-control \
ros-humble-ros2-control-test-assets \
Expand All @@ -53,14 +52,26 @@ RUN apt-get update && \
ros-humble-ros-gz \
&& rm -rf /var/lib/apt/lists/*


RUN mkdir -p /etc/apt/keyrings

RUN curl http://robotpkg.openrobots.org/packages/debian/robotpkg.asc | sudo tee /etc/apt/keyrings/robotpkg.asc

RUN echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/robotpkg.asc] http://robotpkg.openrobots.org/packages/debian/pub $(lsb_release -cs) robotpkg" \
| sudo tee /etc/apt/sources.list.d/robotpkg.list

RUN apt-get update \
&& apt-get install -qqy robotpkg-pinocchio


RUN mkdir ~/source_code
RUN cd ~/source_code && git clone https://github.com/frankaemika/libfranka.git \
&& cd libfranka \
&& git checkout 0.13.3 \
&& git checkout 0.14.1 \
&& git submodule init \
&& git submodule update \
&& mkdir build && cd build \
&& cmake -DBUILD_EXAMPLES=OFF -DBUILD_TESTS=OFF -DCMAKE_BUILD_TYPE=Release .. \
&& cmake -DBUILD_EXAMPLES=OFF -DBUILD_TESTS=OFF -DCMAKE_BUILD_TYPE=Release -DCMAKE_LIBRARY_PATH=/opt/openrobots/lib -DCMAKE_PREFIX_PATH=/opt/openrobots/ .. \
&& make franka -j$(nproc) \
&& cpack -G DEB \
&& sudo dpkg -i libfranka*.deb
Expand Down
5 changes: 2 additions & 3 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
},
"mounts": [
"source=/tmp/.X11-unix,target=/tmp/.X11-unix,type=bind,consistency=cached",
"source=/dev/dri,target=/dev/dri,type=bind,consistency=cached",
],
"postCreateCommand": "rosdep update && sudo rosdep install --from-paths src --ignore-src -y && sudo chown -R user /workspaces"
"source=/dev/dri,target=/dev/dri,type=bind,consistency=cached"
]
}
5 changes: 5 additions & 0 deletions .devcontainer/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ services:
environment:
QT_X11_NO_MITSHM: 1
DISPLAY: $DISPLAY
PATH: /opt/openrobots/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
PKG_CONFIG_PATH: /opt/openrobots/lib/pkgconfig:/usr/local/lib/pkgconfig:/usr/lib/pkgconfig
LD_LIBRARY_PATH: /opt/openrobots/lib:/usr/local/lib:/usr/lib
PYTHONPATH: /opt/openrobots/lib/python3.10/site-packages:/usr/local/lib/python3.10/site-packages
CMAKE_PREFIX_PATH: /opt/openrobots:/usr/local
user: $UID:$UID
cap_add:
- SYS_NICE
Expand Down

0 comments on commit bf215df

Please sign in to comment.