ros2 + lio-sam을 쓰고싶어서 계속 시도해봤는데, 결국 그냥 유니트리가 만든 pointlio 쓰기로 했다.
하루종일 lio-sam 세팅했던게 무색하게 도커에 pointlio 깔자마자 바로 매핑이 되었다.
이제 오프보드컨트롤을 해봐야겠다.
실행 명령어
xhost +si:localuser:root
docker run -it -e DISPLAY --device=/dev/ttyUSB0 --privileged -v /docker_folder:/docker_folder -v /dev:/dev -v /tmp/.X11-unix:/tmp/.X11-unix --network=host soar:2.0
깃허브 링크 참고
unilidar, pointlio 실행 명령어
# run unilidar
cd unilidar_sdk/unitree_lidar_ros
source devel/setup.bash
roslaunch unitree_lidar_ros run_without_rviz.launch
# run pointlio
cd catkin_point_lio_unilidar
source devel/setup.bash
roslaunch point_lio_unilidar mapping_unilidar.launch
도커파일
FROM osrf/ros:noetic-desktop-full-focal
RUN apt-get update \
&& apt-get install -y curl \
&& curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | apt-key add - \
&& apt-get update \
&& apt install -y python3-rosdep \
&& apt install -y python3-rosinstall \
&& apt install -y python3-rosinstall-generator \
&& apt install -y python3-wstool \
&& apt install -y build-essential
RUN apt-get install ros-noetic-pcl-conversions
RUN apt-get install libeigen3-dev
RUN apt-get install -y vim \
&& apt-get install -y git \
&& apt-get install -y python3-pip \
&& apt-get install -y nautilus \
&& apt-get install -y ros-noetic-catkin \
&& apt-get install -y python3-catkin-tools
RUN rm -rf /var/lib/apt/lists/*
RUN echo "source /opt/ros/noetic/setup.bash" >> /root/.bashrc
SHELL ["/bin/bash", "-c"]
WORKDIR /root
RUN git clone https://github.com/unitreerobotics/unilidar_sdk.git
WORKDIR /root/unilidar_sdk/unitree_lidar_ros
RUN source /opt/ros/noetic/setup.bash \
&& catkin_make
WORKDIR /root
RUN mkdir -p ~/catkin_point_lio_unilidar/src
WORKDIR /root/catkin_point_lio_unilidar/src
RUN git clone https://github.com/unitreerobotics/point_lio_unilidar.git
WORKDIR /root/catkin_point_lio_unilidar
RUN source /opt/ros/noetic/setup.bash \
&& catkin_make
WORKDIR /root
빌드 명령어
docker build -t soar:2.0 .