AHRS센서 및 카메라 관련 문의 > STELLA_N1_Forum

본문 바로가기
사이트 내 전체검색

STELLA_N1_Forum

AHRS센서 및 카메라 관련 문의

페이지 정보

profile_image
작성자 메카랩
댓글 11건 조회 938회 작성일 24-03-06 10:34

본문

STELLA N1 SBC 버전: raspi 4

REMOTE PC 버전: ubuntu 20.01

ROS 버전: foxy


안녕하세요 다름이 아니라
스텔라 n1 커스텀 하여 4wd 로봇 제작 중 몇가지 궁금한 게 있어 연락드립니다.

1. AHRS센서 위치는 로봇 프레임 중앙에 위치하는 게 맞을까요?

2. camera를 통해서 v4l2를 설치하여 진행하고 싶은데 https://blog.naver.com/idea_robot/223096433507를 참고하여 하고 진행  중입니다.
그러나 git clone https://github.com/ros-perception/image_transport_plugins.git 빌드 시 오류가 발생하여 혹시 n1 패키지여서 문제가 발생하는건지 궁금하여 연락드립니다.

댓글목록

profile_image

최고관리자님의 댓글

최고관리자 작성일

안녕하세요.

아이디어 로봇입니다.

1. AHRS 센서는 로봇 프레임의 중앙에 위치하여야 정확한 값을 측정할 수 있습니다.

2. v4l2에서 발생하는 에러의 경우 N1패키지와는 상관 없을 것으로 예상됩니다.

빌드시 발생하는 에러 메시지를 알려 주시면 어떤 문제인지 확인하여 답변 드리겠습니다.

profile_image

메카랩님의 댓글

메카랩 작성일
profile_image

메카랩님의 댓글

메카랩 작성일

pi@raspberrypi:~/foxy_ws/src/image_transport_plugins/theora_image_transport $ colcon build --packages-select theora_image_transport
[1.213s] WARNING:colcon.colcon_core.verb:Some selected packages are already built in one or more underlay workspaces:
'theora_image_transport' is in: /home/pi/foxy_ws/install/theora_image_transport
If a package in a merged underlay workspace is overridden and it installs headers, then all packages in the overlay must sort their include directories by workspace order. Failure to do so may result in build failures or undefined behavior at run time.
If the overridden package is used by another package in any underlay, then the overriding package in the overlay must be API and ABI compatible or undefined behavior at run time may occur.

If you understand the risks and want to override a package anyways, add the following to the command line:
--allow-overriding theora_image_transport

This may be promoted to an error in a future release of colcon-core.
Starting >>> theora_image_transport
--- stderr: theora_image_transport                         
CMake Error at /usr/share/cmake-3.16/Modules/FindPkgConfig.cmake:493 (message):
  A required package was not found
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/FindPkgConfig.cmake:677 (_pkg_check_modules_internal)
  CMakeLists.txt:26 (pkg_check_modules)


---
Failed  <<< theora_image_transport [16.7s, exited with code 1]

Summary: 0 packages finished [17.4s]
  1 package failed: theora_image_transport
  1 package had stderr output: theora_image_transport

profile_image

최고관리자님의 댓글의 댓글

최고관리자 작성일

우선 처음으로 나오는 경고의 경우 실수로 잘못된 디렉토리에서 빌드를 진행하여 발생한 것으로 보입니다.
cd ~/foxy_ws명령어로 워크 스페이스 디렉토리로 이동해주세요.
잘못된 위치에 빌드하면서 생긴 디렉토리(install, build 디렉토리)는 삭제해주시는 것이 좋습니다.

에러가 발생한 내용은 필수 패키지가 설치 되지 않은 것으로 보입니다.
아래 두 명령어를 실행하시어 libtheora-dev 패키지를 설치하고 다시 빌드하여 확인해 주세요.
sudo apt-get update
sudo apt-get install libtheora-dev

profile_image

메카랩님의 댓글

메카랩 작성일

감사합니다.
 pi@raspberrypi:~ ros2 run v4l2_camera v4l2_camera_node 실행 시

[ERROR] [1709701039.593039047] [v4l2_camera]: Failed getting value for control 10027009: Permission denied (13); returning 0!

다음과 같이 발생합니다.
혹시 해결책이 있으실까요 ?

profile_image

최고관리자님의 댓글의 댓글

최고관리자 작성일

해당 에러는 권한 관련 문제로 보입니다.

/dev에 사용하실 카메라의 video를 chmod를 사용하시어 권한을 부여하시고 확인하여 보아야 할 것 같습니다.

profile_image

메카랩님의 댓글

메카랩 작성일

제안해주신 내용을 통해 진행을 해보았지만 똑같은 오류가 발생합니다..

pi@raspberrypi:~ $ ros2 run v4l2_camera v4l2_camera_node --ros-args -p image_size:=[1920,1080]

[INFO] [1709713522.562008827] [v4l2_camera]: Driver: bm2835 mmal
[INFO] [1709713522.563844175] [v4l2_camera]: Version: 330343
[INFO] [1709713522.564279411] [v4l2_camera]: Device: mmal service 16.1
[INFO] [1709713522.564651962] [v4l2_camera]: Location: platform:bcm2835-v4l2-0
[INFO] [1709713522.565022939] [v4l2_camera]: Capabilities:
[INFO] [1709713522.565382805] [v4l2_camera]:  Read/write: YES
[INFO] [1709713522.566453385] [v4l2_camera]:  Streaming: YES
[INFO] [1709713522.567561927] [v4l2_camera]: Current pixel format: YUYV @ 1920x1080
[WARN] [1709713522.568388325] [v4l2_camera]: Listing of frame intervals for non-discrete image sizes is not currently supported
[WARN] [1709713522.569210408] [v4l2_camera]: Listing of frame intervals for non-discrete image sizes is not currently supported
[WARN] [1709713522.569286759] [v4l2_camera]: Listing of frame intervals for non-discrete image sizes is not currently supported
[WARN] [1709713522.569353999] [v4l2_camera]: Listing of frame intervals for non-discrete image sizes is not currently supported
[WARN] [1709713522.569415961] [v4l2_camera]: Listing of frame intervals for non-discrete image sizes is not currently supported
[WARN] [1709713522.569477831] [v4l2_camera]: Listing of frame intervals for non-discrete image sizes is not currently supported
[WARN] [1709713522.569538460] [v4l2_camera]: Listing of frame intervals for non-discrete image sizes is not currently supported
[WARN] [1709713522.569596440] [v4l2_camera]: Listing of frame intervals for non-discrete image sizes is not currently supported
[WARN] [1709713522.569651403] [v4l2_camera]: Listing of frame intervals for non-discrete image sizes is not currently supported
[WARN] [1709713522.569709217] [v4l2_camera]: Listing of frame intervals for non-discrete image sizes is not currently supported
[WARN] [1709713522.569768438] [v4l2_camera]: Listing of frame intervals for non-discrete image sizes is not currently supported
[WARN] [1709713522.569827641] [v4l2_camera]: Listing of frame intervals for non-discrete image sizes is not currently supported
[WARN] [1709713522.569883326] [v4l2_camera]: Listing of frame intervals for non-discrete image sizes is not currently supported
[WARN] [1709713522.569941251] [v4l2_camera]: Listing of frame intervals for non-discrete image sizes is not currently supported
[INFO] [1709713522.570772463] [v4l2_camera]: Available pixel formats:
[INFO] [1709713522.570858166] [v4l2_camera]:  YU12 - Planar YUV 4:2:0
[INFO] [1709713522.570914925] [v4l2_camera]:  YUYV - YUYV 4:2:2
[INFO] [1709713522.570966054] [v4l2_camera]:  RGB3 - 24-bit RGB 8-8-8
[INFO] [1709713522.571014664] [v4l2_camera]:  JPEG - JFIF JPEG
[INFO] [1709713522.571064478] [v4l2_camera]:  H264 - H.264
[INFO] [1709713522.571115774] [v4l2_camera]:  MJPG - Motion-JPEG
[INFO] [1709713522.571166885] [v4l2_camera]:  YVYU - YVYU 4:2:2
[INFO] [1709713522.571218736] [v4l2_camera]:  VYUY - VYUY 4:2:2
[INFO] [1709713522.571267772] [v4l2_camera]:  UYVY - UYVY 4:2:2
[INFO] [1709713522.571318309] [v4l2_camera]:  NV12 - Y/CbCr 4:2:0
[INFO] [1709713522.571365141] [v4l2_camera]:  BGR3 - 24-bit BGR 8-8-8
[INFO] [1709713522.571414400] [v4l2_camera]:  YV12 - Planar YVU 4:2:0
[INFO] [1709713522.571464288] [v4l2_camera]:  NV21 - Y/CrCb 4:2:0
[INFO] [1709713522.571513047] [v4l2_camera]:  RX24 - 32-bit XBGR 8-8-8-8
[INFO] [1709713522.571564084] [v4l2_camera]: Available controls:
[INFO] [1709713522.571636638] [v4l2_camera]:  Brightness (1) = 50
[INFO] [1709713522.571703582] [v4l2_camera]:  Contrast (1) = 0
[INFO] [1709713522.571763229] [v4l2_camera]:  Saturation (1) = 0
[INFO] [1709713522.571819710] [v4l2_camera]:  Red Balance (1) = 1000
[INFO] [1709713522.571876580] [v4l2_camera]:  Blue Balance (1) = 1000
[INFO] [1709713522.571931487] [v4l2_camera]:  Horizontal Flip (2) = 0
[INFO] [1709713522.571988227] [v4l2_camera]:  Vertical Flip (2) = 0
[INFO] [1709713522.572043967] [v4l2_camera]:  Power Line Frequency (3) = 1
[INFO] [1709713522.572100318] [v4l2_camera]:  Sharpness (1) = 0
[INFO] [1709713522.572155614] [v4l2_camera]:  Color Effects (3) = 0
[INFO] [1709713522.572286445] [v4l2_camera]:  Rotate (1) = 0
[INFO] [1709713522.572349852] [v4l2_camera]:  Color Effects, CbCr (1) = 32896
[ERROR] [1709713522.572458628] [v4l2_camera]: Failed getting value for control 10027009: Permission denied (13); returning 0!
[INFO] [1709713522.572522739] [v4l2_camera]:  Codec Controls (6) = 0
[INFO] [1709713522.572582053] [v4l2_camera]:  Video Bitrate Mode (3) = 0
[INFO] [1709713522.572640608] [v4l2_camera]:  Video Bitrate (1) = 10000000
[INFO] [1709713522.572697829] [v4l2_camera]:  Repeat Sequence Header (2) = 0
[INFO] [1709713522.572754106] [v4l2_camera]:  H264 I-Frame Period (1) = 60
[INFO] [1709713522.572809384] [v4l2_camera]:  H264 Level (3) = 11
[INFO] [1709713522.572864457] [v4l2_camera]:  H264 Profile (3) = 4
[ERROR] [1709713522.572923882] [v4l2_camera]: Failed getting value for control 10092545: Permission denied (13); returning 0!
[INFO] [1709713522.572978678] [v4l2_camera]:  Camera Controls (6) = 0
[INFO] [1709713522.573037770] [v4l2_camera]:  Auto Exposure (3) = 0
[INFO] [1709713522.573113658] [v4l2_camera]:  Exposure Time, Absolute (1) = 1000
[INFO] [1709713522.573173657] [v4l2_camera]:  Exposure, Dynamic Framerate (2) = 0
[INFO] [1709713522.573230416] [v4l2_camera]:  Auto Exposure, Bias (9) = 12
[INFO] [1709713522.573285952] [v4l2_camera]:  White Balance, Auto & Preset (3) = 1
[INFO] [1709713522.573339248] [v4l2_camera]:  Image Stabilization (2) = 0
[INFO] [1709713522.573482079] [v4l2_camera]:  ISO Sensitivity (9) = 0
[INFO] [1709713522.573549190] [v4l2_camera]:  ISO Sensitivity, Auto (3) = 1
[INFO] [1709713522.573608800] [v4l2_camera]:  Exposure, Metering Mode (3) = 0
[INFO] [1709713522.573667984] [v4l2_camera]:  Scene Mode (3) = 0
[ERROR] [1709713522.573731021] [v4l2_camera]: Failed getting value for control 10289153: Permission denied (13); returning 0!
[INFO] [1709713522.573786353] [v4l2_camera]:  JPEG Compression Controls (6) = 0
[INFO] [1709713522.573845445] [v4l2_camera]:  Compression Quality (1) = 30
[INFO] [1709713522.573897111] [v4l2_camera]: Time-per-frame support: YES
[INFO] [1709713522.573946240] [v4l2_camera]:  Current time per frame: 1000/30000 s
[INFO] [1709713522.573999129] [v4l2_camera]:  Available intervals:
[WARN] [1709713522.579145642] [v4l2_camera]: Control type not currently supported: 6, for control: Codec Controls
[WARN] [1709713522.579833541] [v4l2_camera]: Control type not currently supported: 6, for control: Camera Controls
[WARN] [1709713522.580225369] [v4l2_camera]: Control type not currently supported: 9, for control: Auto Exposure, Bias
[WARN] [1709713522.580542051] [v4l2_camera]: Control type not currently supported: 9, for control: ISO Sensitivity
[WARN] [1709713522.580937231] [v4l2_camera]: Control type not currently supported: 6, for control: JPEG Compression Controls
[INFO] [1709713522.581146970] [v4l2_camera]: Starting camera

다른 방법이 없을까요 ?

profile_image

메카랩님의 댓글

메카랩 작성일

usb 카메라 보드는 어디서 구매가능하나요 ?

profile_image

최고관리자님의 댓글

최고관리자 작성일

권한의 문제가 아니라면 카메라 하드웨어에서 문제가 발생하였을 수 있습니다.

카메라가 잘나오고 있는지 테스트를 진행하여 주세요.

usb카메라의 경우 아래 제품이 STELLA N2 CAM에서 v4l2로 사용되는 카메라로 해당 제품을 구매하시면 될 것 같습니다.
https://smartstore.naver.com/idearobot/products/9619167114

profile_image

메카랩님의 댓글

메카랩 작성일

안녕하세요.
usb 카메라를 구입 후 연결하여 진행중에 있습니다.
그러나,  ros2 run v4l2_camera v4l2_camera_node 진행 시 다음과 같은 문제가 발생하는데
[ERROR] [1709874347.325355269] [v4l2_camera]: Failed setting value for control White Balance Temperature to 4600: Invalid or incomplete multibyte or wide character (84)
[ERROR] [1709874347.333879714] [v4l2_camera]: Failed setting value for control Exposure (Absolute) to 166: Invalid or incomplete multibyte or wide character (84)
[ERROR] [1709874347.347354051] [v4l2_camera]: Failed setting value for control Focus (absolute) to 68: Invalid or incomplete multibyte or wide character (84)

해결방법이 없을까요 ?

profile_image

최고관리자님의 댓글의 댓글

최고관리자 작성일

해당 세가지 에러의 경우 매개변수와 관련된 에러 메시지로
해당 에러가 발생하여도 v4l2 노드는 정상적으로 실행되어 image_raw 토픽을 확인하실 수 있습니다.

아래 블로그 11번 순서에 해당내용이 기재되어 있습니다.
https://blog.naver.com/idea_robot/223202001154

만약 실행되지 않는 경우 다른 문제가 발생하였을 것으로 예상됩니다.

문제가 없다하여도 해당 에러 메시지가 나오는 것을 원하지 않으신다면

sudo apt install uvcdynctrl으로 uvcdynctrl를 설치하시고 사용하시는 카메라의 매개변수값을 확인하시어
v4l2노드에서 매개변수 부분을 수정하여 주시면 됩니다.

회원로그인

회원가입