docker updated.
This commit is contained in:
parent
0d7708ddbd
commit
a5749756c4
|
@ -1,70 +0,0 @@
|
||||||
FROM ros:humble
|
|
||||||
ENV DEBIAN_FRONTEND noninteractive
|
|
||||||
ARG CONDA_VER=latest
|
|
||||||
ARG OS_TYPE=x86_64
|
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y -qq --no-install-recommends \
|
|
||||||
libglvnd-dev \
|
|
||||||
libgl1-mesa-dev \
|
|
||||||
libegl1-mesa-dev \
|
|
||||||
libgles2-mesa-dev \
|
|
||||||
libxext6 \
|
|
||||||
libx11-6 \
|
|
||||||
freeglut3-dev \
|
|
||||||
git \
|
|
||||||
python3-pip \
|
|
||||||
python3-tk \
|
|
||||||
curl \
|
|
||||||
vim \
|
|
||||||
libcgal-dev \
|
|
||||||
libcgal-demo \
|
|
||||||
ros-humble-rmw-cyclonedds-cpp ros-humble-rosidl-generator-dds-idl \
|
|
||||||
libyaml-cpp-dev \
|
|
||||||
ros-humble-xacro \
|
|
||||||
libboost-all-dev\
|
|
||||||
build-essential \
|
|
||||||
cmake \
|
|
||||||
git \
|
|
||||||
wget \
|
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
|
||||||
|
|
||||||
RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash
|
|
||||||
RUN apt-get install git-lfs
|
|
||||||
# Install Miniconda
|
|
||||||
RUN wget https://github.com/conda-forge/miniforge/releases/${CONDA_VER}/download/Miniforge3-Linux-${OS_TYPE}.sh -O ~/miniconda.sh \
|
|
||||||
&& /bin/bash ~/miniconda.sh -b -p /opt/conda \
|
|
||||||
&& rm ~/miniconda.sh \
|
|
||||||
&& ln -s /opt/conda/etc/profile.d/conda.sh /etc/profile.d/conda.sh \
|
|
||||||
&& echo ". /opt/conda/etc/profile.d/conda.sh" >> ~/.bashrc \
|
|
||||||
&& echo "conda activate base" >> ~/.bashrc
|
|
||||||
|
|
||||||
ENV PATH /opt/conda/bin:$PATH
|
|
||||||
SHELL ["conda", "run", "-n", "base", "/bin/bash", "-c"]
|
|
||||||
ENV CONDA_PREFIX /opt/conda
|
|
||||||
|
|
||||||
# Cheange the ROS2 RMW to CycloneDDS as instructed by Unitree
|
|
||||||
# RUN cd / && git clone https://github.com/unitreerobotics/unitree_ros2 && cd /unitree_ros2/cyclonedds_ws/src && \
|
|
||||||
# git clone https://github.com/ros2/rmw_cyclonedds -b humble && git clone https://github.com/eclipse-cyclonedds/cyclonedds -b releases/0.10.x &&\
|
|
||||||
# cd .. && colcon build --packages-select cyclonedds && source /opt/ros/humble/setup.bash && colcon build
|
|
||||||
|
|
||||||
# Install Python dependencies
|
|
||||||
RUN pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
|
|
||||||
RUN pip install matplotlib opencv-python proxsuite scipy isort black
|
|
||||||
RUN pip install warp-lang scikit-learn casadi
|
|
||||||
RUN pip install onnx onnxruntime
|
|
||||||
# RUN pip install cyclonedds pygame pynput jupyter ipykernel
|
|
||||||
RUN pip install meshcat mujoco
|
|
||||||
RUN conda install -y -c conda-forge \
|
|
||||||
pinocchio \
|
|
||||||
crocoddyl \
|
|
||||||
mim-solvers
|
|
||||||
|
|
||||||
# Set environmental variables required for using ROS
|
|
||||||
RUN echo 'source /opt/ros/humble/setup.bash' >> ~/.bashrc
|
|
||||||
RUN echo 'source /unitree_ros2/cyclonedds_ws/install/setup.bash' >> ~/.bashrc
|
|
||||||
RUN echo 'export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp' >> ~/.bashrc
|
|
||||||
RUN echo 'export CYCLONEDDS_URI=file:///home/Go2py/Go2Py/assets/cyclonedds.xml' >> ~/.bashrc
|
|
||||||
|
|
||||||
# Env vars for the nvidia-container-runtime.
|
|
||||||
ENV NVIDIA_VISIBLE_DEVICES all
|
|
||||||
ENV NVIDIA_DRIVER_CAPABILITIES graphics,utility,compute
|
|
|
@ -0,0 +1 @@
|
||||||
|
Dockerfile.go2
|
|
@ -3,9 +3,10 @@ ENV DEBIAN_FRONTEND noninteractive
|
||||||
ARG CONDA_VER=latest
|
ARG CONDA_VER=latest
|
||||||
ARG OS_TYPE=aarch64
|
ARG OS_TYPE=aarch64
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y -qq --no-install-recommends \ cuda \
|
RUN apt-get update && apt-get install -y -qq --no-install-recommends cuda \
|
||||||
wget \
|
wget \
|
||||||
ros-humble-rmw-cyclonedds-cpp ros-humble-rosidl-generator-dds-idl \
|
ros-humble-rmw-cyclonedds-cpp ros-humble-rosidl-generator-dds-idl \
|
||||||
|
ros-humble-pcl-ros \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# MID360 Lidar Drivers
|
# MID360 Lidar Drivers
|
||||||
|
@ -20,18 +21,22 @@ cd .. && colcon build --packages-select cyclonedds && source /opt/ros/humble/set
|
||||||
|
|
||||||
|
|
||||||
RUN echo "export CYCLONEDDS_HOME=/unitree_ros2/cyclonedds_ws/install/cyclonedds/" >> ~/.bashrc
|
RUN echo "export CYCLONEDDS_HOME=/unitree_ros2/cyclonedds_ws/install/cyclonedds/" >> ~/.bashrc
|
||||||
|
ENV CYCLONEDDS_HOME "/unitree_ros2/cyclonedds_ws/install/cyclonedds"
|
||||||
RUN cd /root && git clone https://github.com/eclipse-cyclonedds/cyclonedds-python -b releases/0.10.x && cd cyclonedds-python && pip install .
|
RUN cd /root && git clone https://github.com/eclipse-cyclonedds/cyclonedds-python -b releases/0.10.x && cd cyclonedds-python && pip install .
|
||||||
|
|
||||||
# CycloneDDS-cxx
|
# CycloneDDS-cxx
|
||||||
RUN cd /root && git clone https://github.com/eclipse-cyclonedds/cyclonedds-cxx -b releases/0.10.x &&\
|
# RUN cd /root && git clone https://github.com/eclipse-cyclonedds/cyclonedds-cxx -b releases/0.10.x &&\
|
||||||
cd cyclonedds-cxx && mkdir build install && cd build && cmake .. && \
|
# cd cyclonedds-cxx && mkdir build install && cd build && cmake .. && \
|
||||||
cmake --build . --target install
|
# cmake --build . --target install
|
||||||
|
|
||||||
# Install Python dependencies
|
# Install Python dependencies
|
||||||
RUN pip install matplotlib opencv-python scipy isort black onnx onnxruntime
|
RUN pip install matplotlib opencv-python scipy isort black onnx onnxruntime
|
||||||
RUN pip install https://github.com/NVIDIA/warp/releases/download/v1.5.1/warp_lang-1.5.1+cu11-py3-none-manylinux2014_aarch64.whl
|
RUN pip install https://github.com/NVIDIA/warp/releases/download/v1.5.1/warp_lang-1.5.1+cu11-py3-none-manylinux2014_aarch64.whl
|
||||||
RUN pip install cyclonedds pygame pynput jupyter ipykernel meshcat
|
RUN pip install pygame pynput jupyter ipykernel meshcat
|
||||||
|
|
||||||
|
RUN echo "export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp" >> ~/.bashrc
|
||||||
|
|
||||||
|
# RUN echo "export CYCLONEDDS_URI='<CycloneDDS><Domain><General><Interfaces><NetworkInterface name="eth0" priority="default" multicast="default" /></Interfaces></General></Domain></CycloneDDS>'" >> ~/.bashrc
|
||||||
# RUN echo 'source /unitree_ros2/cyclonedds_ws/install/setup.bash' >> ~/.bashrc
|
# RUN echo 'source /unitree_ros2/cyclonedds_ws/install/setup.bash' >> ~/.bashrc
|
||||||
# RUN echo 'export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp' >> ~/.bashrc
|
# RUN echo 'export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp' >> ~/.bashrc
|
||||||
# RUN echo 'export CYCLONEDDS_URI=file:///home/Go2py/Go2Py/assets/cyclonedds.xml' >> ~/.bashrc
|
# RUN echo 'export CYCLONEDDS_URI=file:///home/Go2py/Go2Py/assets/cyclonedds.xml' >> ~/.bashrc
|
||||||
|
|
|
@ -0,0 +1,70 @@
|
||||||
|
FROM ros:humble
|
||||||
|
ENV DEBIAN_FRONTEND noninteractive
|
||||||
|
ARG CONDA_VER=latest
|
||||||
|
ARG OS_TYPE=x86_64
|
||||||
|
|
||||||
|
RUN apt-get update && apt-get install -y -qq --no-install-recommends \
|
||||||
|
libglvnd-dev \
|
||||||
|
libgl1-mesa-dev \
|
||||||
|
libegl1-mesa-dev \
|
||||||
|
libgles2-mesa-dev \
|
||||||
|
libxext6 \
|
||||||
|
libx11-6 \
|
||||||
|
freeglut3-dev \
|
||||||
|
git \
|
||||||
|
python3-pip \
|
||||||
|
python3-tk \
|
||||||
|
curl \
|
||||||
|
vim \
|
||||||
|
libcgal-dev \
|
||||||
|
libcgal-demo \
|
||||||
|
ros-humble-rmw-cyclonedds-cpp ros-humble-rosidl-generator-dds-idl \
|
||||||
|
libyaml-cpp-dev \
|
||||||
|
ros-humble-xacro \
|
||||||
|
libboost-all-dev\
|
||||||
|
build-essential \
|
||||||
|
cmake \
|
||||||
|
git \
|
||||||
|
wget \
|
||||||
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
RUN curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash
|
||||||
|
RUN apt-get install git-lfs
|
||||||
|
# Install Miniconda
|
||||||
|
RUN wget https://github.com/conda-forge/miniforge/releases/${CONDA_VER}/download/Miniforge3-Linux-${OS_TYPE}.sh -O ~/miniconda.sh \
|
||||||
|
&& /bin/bash ~/miniconda.sh -b -p /opt/conda \
|
||||||
|
&& rm ~/miniconda.sh \
|
||||||
|
&& ln -s /opt/conda/etc/profile.d/conda.sh /etc/profile.d/conda.sh \
|
||||||
|
&& echo ". /opt/conda/etc/profile.d/conda.sh" >> ~/.bashrc \
|
||||||
|
&& echo "conda activate base" >> ~/.bashrc
|
||||||
|
|
||||||
|
ENV PATH /opt/conda/bin:$PATH
|
||||||
|
SHELL ["conda", "run", "-n", "base", "/bin/bash", "-c"]
|
||||||
|
ENV CONDA_PREFIX /opt/conda
|
||||||
|
|
||||||
|
# Cheange the ROS2 RMW to CycloneDDS as instructed by Unitree
|
||||||
|
# RUN cd / && git clone https://github.com/unitreerobotics/unitree_ros2 && cd /unitree_ros2/cyclonedds_ws/src && \
|
||||||
|
# git clone https://github.com/ros2/rmw_cyclonedds -b humble && git clone https://github.com/eclipse-cyclonedds/cyclonedds -b releases/0.10.x &&\
|
||||||
|
# cd .. && colcon build --packages-select cyclonedds && source /opt/ros/humble/setup.bash && colcon build
|
||||||
|
|
||||||
|
# Install Python dependencies
|
||||||
|
RUN pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
|
||||||
|
RUN pip install matplotlib opencv-python proxsuite scipy isort black
|
||||||
|
RUN pip install warp-lang scikit-learn casadi
|
||||||
|
RUN pip install onnx onnxruntime
|
||||||
|
# RUN pip install cyclonedds pygame pynput jupyter ipykernel
|
||||||
|
RUN pip install meshcat mujoco
|
||||||
|
RUN conda install -y -c conda-forge \
|
||||||
|
pinocchio \
|
||||||
|
crocoddyl \
|
||||||
|
mim-solvers
|
||||||
|
|
||||||
|
# Set environmental variables required for using ROS
|
||||||
|
RUN echo 'source /opt/ros/humble/setup.bash' >> ~/.bashrc
|
||||||
|
RUN echo 'source /unitree_ros2/cyclonedds_ws/install/setup.bash' >> ~/.bashrc
|
||||||
|
RUN echo 'export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp' >> ~/.bashrc
|
||||||
|
RUN echo 'export CYCLONEDDS_URI=file:///home/Go2py/Go2Py/assets/cyclonedds.xml' >> ~/.bashrc
|
||||||
|
|
||||||
|
# Env vars for the nvidia-container-runtime.
|
||||||
|
ENV NVIDIA_VISIBLE_DEVICES all
|
||||||
|
ENV NVIDIA_DRIVER_CAPABILITIES graphics,utility,compute
|
|
@ -10,9 +10,12 @@ services:
|
||||||
- /tmp/.X11-unix:/tmp/.X11-unix
|
- /tmp/.X11-unix:/tmp/.X11-unix
|
||||||
- ../:/home/Go2py
|
- ../:/home/Go2py
|
||||||
- /dev/input:/dev/input
|
- /dev/input:/dev/input
|
||||||
|
- /dev/shm:/dev/shm
|
||||||
|
- /dev:/dev
|
||||||
environment:
|
environment:
|
||||||
- DISPLAY=${DISPLAY}
|
- DISPLAY=${DISPLAY}
|
||||||
- QT_X11_NO_MITSHM=1
|
- QT_X11_NO_MITSHM=1
|
||||||
runtime: nvidia
|
runtime: nvidia
|
||||||
stdin_open: true
|
stdin_open: true
|
||||||
tty: true
|
tty: true
|
||||||
|
ipc: host
|
|
@ -27,7 +27,8 @@ SHELL ["/bin/bash", "-c"]
|
||||||
COPY docker/scripts/MID360_config.json /root/ws_livox/src/livox_ros_driver2/config/MID360_config.json
|
COPY docker/scripts/MID360_config.json /root/ws_livox/src/livox_ros_driver2/config/MID360_config.json
|
||||||
COPY launch_files/msg_MID360_launch.py /root/ws_livox/src/livox_ros_driver2/launch_ROS2/msg_MID360_launch.py
|
COPY launch_files/msg_MID360_launch.py /root/ws_livox/src/livox_ros_driver2/launch_ROS2/msg_MID360_launch.py
|
||||||
RUN cd /root/ws_livox/src/livox_ros_driver2 && source /opt/ros/humble/setup.sh && /bin/bash build.sh humble
|
RUN cd /root/ws_livox/src/livox_ros_driver2 && source /opt/ros/humble/setup.sh && /bin/bash build.sh humble
|
||||||
|
# Clone and compile FAST-LIO
|
||||||
|
RUN cd /root && mkdir -p fastlio-ws/src && cd fastlio-ws/src && git clone https://github.com/Ericsii/FAST_LIO.git --recursive && cd FAST_LIO && git checkout ros2 && cd /root/fastlio-ws && source /root/ws_livox/install/setup.bash && colcon build --symlink-install
|
||||||
# Copy the script to start the nodes
|
# Copy the script to start the nodes
|
||||||
COPY docker/scripts/mid360_start.sh /root/mid360_start.sh
|
COPY docker/scripts/mid360_start.sh /root/mid360_start.sh
|
||||||
# set the entrypoint to bash
|
# set the entrypoint to bash
|
||||||
|
|
|
@ -2,6 +2,6 @@ source /opt/ros/humble/setup.bash
|
||||||
source /unitree_ros2/cyclonedds_ws/install/setup.bash
|
source /unitree_ros2/cyclonedds_ws/install/setup.bash
|
||||||
export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
|
export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
|
||||||
export CYCLONEDDS_URI='<CycloneDDS><Domain><General><Interfaces>
|
export CYCLONEDDS_URI='<CycloneDDS><Domain><General><Interfaces>
|
||||||
<NetworkInterface name="enx00e04c006390" priority="default" multicast="default" />
|
<NetworkInterface name="eth0" priority="default" multicast="default" />
|
||||||
</Interfaces></General></Domain></CycloneDDS>'
|
</Interfaces></General></Domain></CycloneDDS>'
|
||||||
source /bridge_ws/install/setup.bash && ros2 launch /root/launch/bridge.launch.py
|
source /bridge_ws/install/setup.bash && ros2 launch /root/launch/bridge.launch.py
|
|
@ -1,7 +1,7 @@
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=ROS2 device driver container
|
Description=ROS2 device driver container
|
||||||
Requires=multi-user.target
|
Requires=go2py-robot-description.service
|
||||||
After=multi-user.target
|
After=go2py-robot-description.service
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Restart=always
|
Restart=always
|
||||||
|
|
Loading…
Reference in New Issue