(시행 착오 중) REALSENSE D435i를 ROS2로 표시해보십시오.

(의견 수시 접수 중)

하고 싶은 일



Docker 컨테이너에 ROS2와 CUDA를 사용할 수 있도록 하고 D435i를 사용할 수 있도록 해 보려고 했는데 잘 움직이지 않으므로 호스트 측에도 ROS2를 철저히 조사해 보겠습니다.
이전 기사 (조사 중) Docker에서 REALSENSE D435i를 연결하고 ROS2로 표시해보십시오.

교과서는 이것.
「ROS2로 시작하자 차세대 로봇 프로그래밍」을 보면서, ROS2를 인스톨 해 움직여 봅니다.

ROS 색인
ROS2 설치 옵션

terminal
sudo locale-gen en_US en_US.UTF-8
sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
export LANG=en_US.UTF-8

sudo apt update && sudo apt install curl gnupg2 lsb-release
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -
sudo sh -c 'echo "deb http://packages.ros.org/ros2/ubuntu `lsb_release -cs` main" > /etc/apt/sources.list.d/ros2-latest.list'

sudo apt update
sudo apt install ros-dashing-desktop

source /opt/ros/dashing/setup.bash
sudo apt install python3-argcomplete

환경 설정 등록.
export ROS_DISTRO=dashing
echo "source /opt/ros/$ROS_DISTRO/setup.bash" >> ~/.bashrc
echo "source /opt/ros/$ROS_DISTRO/setup.zsh" >> ~/.zshrc
export RMW_IMPLEMENTATION=rmw_opensplice_cpp

실행해 보겠습니다.

terminal
ros2 run demo_nodes_cpp talker
ros2 run demo_nodes_py listener

네, 정상적으로 움직였습니다.
그 밖에도 여러가지 넣어 움직여 봅니다.
교과서 샘플을 실행할 수 있도록 설정합니다.

terminal
sudo apt update
sudo apt install ros-dashing-rmw-opensplice-cpp # for OpenSplice
sudo apt install ros-dashing-rmw-connext-cpp # for RTI Connext (requires license agreement)

cd ~/ && git clone https://github.com/youtalk/get-started-ros2.git
cd get-started-ros2 && git submodule update --init
mkdir ~/ros2 && cd ~/ros2
ln -s ~/get-started-ros2/ros2 src

sudo apt install python3-colcon-common-extensions
sudo apt install python3-rosdep
sudo rosdep init
rosdep update
rosdep install --from-paths src --ignore-src -r -y
colcon build
. ~/ros2/install/setup.bash

Hello_world에서 이상이 나오지만, 잘 모르기 때문에, 우선 두고 있어.
sudo apt install ros-$ROS_DISTRO-realsense-camera-msgs ros-$ROS_DISTRO-realsense-ros2-camera
ros2 launch realsense_ros2_camera ros2_intel_realsense.launch.py

오야?
Docker 컨테이너뿐만 아니라 호스트 PC에서도 RealSense가 보이지 않는다!


또한 문제가 계속됩니다.

화면이 반전



D435i를 움직이면 갑자기 화면이 뒤집혀? ? ? ? 뭐야?


아무래도, 태블릿 등 디스플레이의 방향을 가속도 센서로 검출하는 기능이 D435i와 연동해 버리고 있습니다.
다음 명령으로 화면을 고정할 수 있었습니다.

terminal
gsettings set org.gnome.settings-daemon.peripherals.touchscreen orientation-lock true

가속도 데이터의 디바이스를 취할 때에 이상이 나오는 원인은 화면 컨트롤의 드라이버가 가속도 센서를 사용해 버리고 있었기 때문입니다.
여기 부분을 분리할 수 있을까요?

이 정보를 참고로 다시 실시해 보았습니다만,
Jetson Nano + ROS2에서 Intel RealSense의 작동 및주의 사항

terminal
$ ros2 run realsense_ros2_camera realsense_ros2_camera
========================================================================================
Report      : WARNING
Date        : 2020-06-01T07:33:18+0900
Description : using network interface wlo1 (192.168.1.22) selected arbitrarily from: wlo1, br-35f089619e19, br-4086a7d6b7f6, docker0

Node        : kuma-G5-5590
Process     : realsense_ros2_camera <20995>
Thread      : ddsi2 7f8d2522f700
Internals   : 6.9.190705OSS///ddsi2/q_nwif.c/989/0/1590964398.983064842/0
[INFO] [RealSenseCameraNode]: RealSense ROS v2. 0.1
[INFO] [RealSenseCameraNode]: Running with LibRealSense v2.16.5
[INFO] [RealSenseCameraNode]: getParameters...
[INFO] [RealSenseCameraNode]: setupDevice...
 01/06 07:33:20,285 ERROR [140244703418880] (types.h:180) get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Device or resource busy
[ERROR] [RealSenseCameraNode]: An exception has been thrown: get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Device or resource busy
terminate called after throwing an instance of 'rs2::backend_error'
  what():  get_xu(...). xioctl(UVCIOC_CTRL_QUERY) failed Last Error: Device or resource busy


iio-sensor-proxy.service를 자릅니다.
$ sudo systemctl stop iio-sensor-proxy.service
$ sudo systemctl mask iio-sensor-proxy.service
Created symlink /etc/systemd/system/iio-sensor-proxy.service → /dev/null.


그리고 실행.
이미지가 표시되었습니다.
그러나 점군은 표시되지 않습니다.



terminal1
$ ros2 run realsense_ros2_camera realsense_ros2_camera
========================================================================================
Report      : WARNING
Date        : 2020-06-02T07:36:47+0900
Description : using network interface wlo1 (192.168.1.22) selected arbitrarily from: wlo1, br-35f089619e19, br-4086a7d6b7f6, docker0

Node        : kuma-G5-5590
Process     : realsense_ros2_camera <7864>
Thread      : ddsi2 7fe403682700
Internals   : 6.9.190705OSS///ddsi2/q_nwif.c/989/0/1591051007.770383100/0
[INFO] [RealSenseCameraNode]: RealSense ROS v2. 0.1
[INFO] [RealSenseCameraNode]: Running with LibRealSense v2.16.5
[INFO] [RealSenseCameraNode]: getParameters...
[INFO] [RealSenseCameraNode]: setupDevice...
 02/06 07:36:49,324 ERROR [140617799682560] (ds5-motion.cpp:313) Motion Device is not calibrated! Motion Data Correction will not be available! Error: OpCodes do not match! Sent 79 but received -21!
[INFO] [RealSenseCameraNode]: Device Name: Intel RealSense D435I
[INFO] [RealSenseCameraNode]: Device Serial No: 834412071978
[INFO] [RealSenseCameraNode]: Device FW version: 05.12.03.00
255.255.255.255
[INFO] [RealSenseCameraNode]: Device Product ID: 0B3A
[INFO] [RealSenseCameraNode]: Sync Mode: On
[INFO] [RealSenseCameraNode]: Device Sensors: 
[INFO] [RealSenseCameraNode]: Stereo Module was found.
[INFO] [RealSenseCameraNode]: RGB Camera was found.
[INFO] [RealSenseCameraNode]: Motion Module was found.
[INFO] [RealSenseCameraNode]: Fisheye sensor isn't supported by current device! -- Skipping...
[INFO] [RealSenseCameraNode]: setupPublishers...
[INFO] [RealSenseCameraNode]: setupStreams...
[INFO] [RealSenseCameraNode]: depth stream is enabled - width: 640, height: 480, fps: 30
[INFO] [RealSenseCameraNode]: infra1 stream is enabled - width: 640, height: 480, fps: 30
[INFO] [RealSenseCameraNode]: infra2 stream is enabled - width: 640, height: 480, fps: 30
[INFO] [RealSenseCameraNode]: color stream is enabled - width: 640, height: 480, fps: 30
 02/06 07:36:50,412 ERROR [140615493936896] (backend-v4l2.h:210) xioctl(VIDIOC_QBUF) guard failed
 02/06 07:36:50,412 ERROR [140615493936896] (backend-v4l2.h:210) xioctl(VIDIOC_QBUF) guard failed
 02/06 07:36:50,412 ERROR [140615493936896] (backend-v4l2.h:210) xioctl(VIDIOC_QBUF) guard failed
 02/06 07:36:50,412 ERROR [140615493936896] (backend-v4l2.h:210) xioctl(VIDIOC_QBUF) guard failed
 02/06 07:36:50,646 ERROR [140615415473920] (backend-v4l2.h:210) xioctl(VIDIOC_QBUF) guard failed
 02/06 07:36:50,646 ERROR [140615415473920] (backend-v4l2.h:210) xioctl(VIDIOC_QBUF) guard failed
 02/06 07:36:50,646 ERROR [140615415473920] (backend-v4l2.h:210) xioctl(VIDIOC_QBUF) guard failed
 02/06 07:36:50,646 ERROR [140615415473920] (backend-v4l2.h:210) xioctl(VIDIOC_QBUF) guard failed
[INFO] [RealSenseCameraNode]: publishStaticTransforms...
[INFO] [RealSenseCameraNode]: RealSense Node Is Up!
========================================================================================
Report      : WARNING
Date        : 2020-06-02T07:38:15+0900
Description : writer 970823804:441:1:13059 topic rt/camera/color/image_raw waiting on high watermark due to reader 1729690071:441:1:9988

Node        : kuma-G5-5590
Process     : realsense_ros2_camera <7864>
Thread      : xmit.user 7fe4033d9700
Internals   : 6.9.190705OSS///ddsi2/q_transmit.c/845/0/1591051095.262717838/0


terminal2
$ ros2 run rviz2 rviz2 -d ~/ros2_ws/src/ros2_intel_realsense/realsense_ros2_camera/rviz/ros2.rviz
========================================================================================
Report      : WARNING
Date        : 2020-06-02T07:38:17+0900
Description : using network interface wlo1 (192.168.1.22) selected arbitrarily from: wlo1, br-35f089619e19, br-4086a7d6b7f6, docker0

Node        : kuma-G5-5590
Process     : rviz2 <8794>
Thread      : ddsi2 7f40203d8700
Internals   : 6.9.190705OSS///ddsi2/q_nwif.c/989/0/1591051097.422183971/0
[INFO] [rviz2]: Stereo is NOT SUPPORTED
[INFO] [rviz2]: OpenGl version: 4.6 (GLSL 4.6)
[INFO] [rviz2]: Stereo is NOT SUPPORTED
[INFO] [rviz2]: Stereo is NOT SUPPORTED
[INFO] [rviz2]: Stereo is NOT SUPPORTED
[INFO] [rviz2]: Stereo is NOT SUPPORTED
[INFO] [rviz2]: Stereo is NOT SUPPORTED


이 근처가 도움이 될까?
우분투 커널을 지원하지 않습니까?
htps : // 이 m / 에즈이 dl / ms / 에 bf40d79dc03에서 03 있어 b3

우선, 지금까지 Docker 버전으로 돌아갑니다.

이전 기사 Docker에서 REALSENSE D435i를 연결하고 ROS2로 표시해보기

여기, 「호스트 머신으로부터 Docker로 돌아왔다」의 곳으로부터 계속됩니다.

좋은 웹페이지 즐겨찾기