Skip to content

Commit

Permalink
fix: update setup.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
ChandimaFernando committed Apr 2, 2024
1 parent fa0782a commit 9af7e0d
Show file tree
Hide file tree
Showing 4 changed files with 66 additions and 8 deletions.
16 changes: 16 additions & 0 deletions docker/erobs-common-img/99-k4a.rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

# Bus 002 Device 116: ID 045e:097a Microsoft Corp. - Generic Superspeed USB Hub
# Bus 001 Device 015: ID 045e:097b Microsoft Corp. - Generic USB Hub
# Bus 002 Device 118: ID 045e:097c Microsoft Corp. - Azure Kinect Depth Camera
# Bus 002 Device 117: ID 045e:097d Microsoft Corp. - Azure Kinect 4K Camera
# Bus 001 Device 016: ID 045e:097e Microsoft Corp. - Azure Kinect Microphone Array

BUS!="usb", ACTION!="add", SUBSYSTEM!=="usb_device", GOTO="k4a_logic_rules_end"

ATTRS{idVendor}=="045e", ATTRS{idProduct}=="097a", MODE="0666", GROUP="plugdev"
ATTRS{idVendor}=="045e", ATTRS{idProduct}=="097b", MODE="0666", GROUP="plugdev"
ATTRS{idVendor}=="045e", ATTRS{idProduct}=="097c", MODE="0666", GROUP="plugdev"
ATTRS{idVendor}=="045e", ATTRS{idProduct}=="097d", MODE="0666", GROUP="plugdev"
ATTRS{idVendor}=="045e", ATTRS{idProduct}=="097e", MODE="0666", GROUP="plugdev"

LABEL="k4a_logic_rules_end"
52 changes: 45 additions & 7 deletions docker/erobs-common-img/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,65 @@ RUN apt-get update \
ros-${ROS_DISTRO}-rclpy \
ros-${ROS_DISTRO}-ur \
build-essential \
cmake \
usbutils \
libgtk2.0-dev \
libusb-1.0\
ffmpeg \
mlocate \
wget \
curl \
ros-${ROS_DISTRO}-joint-state-publisher \
software-properties-common \
python3-colcon-common-extensions

# For vnc viewer
RUN apt-get install -y x11vnc xvfb
# Clean up
RUN apt-get autoremove -y \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/*
RUN pip3 install rosdep && \
rosdep update

# Get necessary repos set for Azure-Kinect
RUN curl -sSL https://packages.microsoft.com/keys/microsoft.asc | sudo tee /etc/apt/trusted.gpg.d/microsoft.asc
RUN sudo apt-add-repository https://packages.microsoft.com/ubuntu/20.04/prod

RUN curl -sSL https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
RUN sudo apt-add-repository https://packages.microsoft.com/ubuntu/18.04/prod
RUN curl -sSL https://packages.microsoft.com/config/ubuntu/18.04/prod.list | sudo tee /etc/apt/sources.list.d/microsoft-prod.list
RUN curl -sSL https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -

# || true forces through the errors without breaking the apt-get update
RUN sudo apt-get update || true

# End user license agreement (EULA) parameter is necessary. -y won't trigger a EULA answer
RUN ACCEPT_EULA=Y apt-get install -y libk4a1.4 libk4a1.4-dev

RUN wget mirrors.kernel.org/ubuntu/pool/universe/libs/libsoundio/libsoundio1_1.1.0-1_amd64.deb
RUN sudo dpkg -i libsoundio1_1.1.0-1_amd64.deb
RUN sudo apt install -y k4a-tools

# Copy the rules
COPY 99-k4a.rules /etc/udev/rules.d/99-k4a.rules

RUN pip3 install xacro

RUN mkdir /root/ws -p

WORKDIR /root/ws

RUN git clone https://github.com/maffettone/erobs.git -b humble
RUN git clone https://github.com/ChandimaFernando/erobs.git -b azure-kinect
# RUN git clone https://github.com/maffettone/erobs.git -b humble

WORKDIR /root/ws/erobs/
RUN /bin/bash -c ". ./setup.sh"

WORKDIR /root/ws/
RUN /bin/bash -c ". ./erobs/build.sh"

# Clean up
RUN apt-get autoremove -y \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/*
RUN pip3 install rosdep && \
rosdep update

ENV ROBOT_IP=192.168.56.101
ENV REVERSE_IP=192.168.56.102
ENV UR_TYPE="ur3e"
Expand Down
2 changes: 1 addition & 1 deletion setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
set -e

vcs import < src/ros2.repos src
sudo apt-get update
sudo apt-get update || true
rosdep update
rosdep install --from-paths src --ignore-src -y
4 changes: 4 additions & 0 deletions src/ros2.repos
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,7 @@ repositories:
type: git
url: https://github.com/PickNikRobotics/serial-release.git
version: release/humble/serial
kinect:
type: git
url: https://github.com/microsoft/Azure_Kinect_ROS_Driver.git
version: humble

0 comments on commit 9af7e0d

Please sign in to comment.