turtelbot3 autonomous driving 시도 중 camera calibration 부분에서 에러가 발생하였습니다.
PC OS: ubuntu 20.04 , ROS:noetic
SBC OS: ubuntu 20.04 , ROS:noetic , raspberry PI 4 Model B(2GB)
turtlebot 3: waffle_pi
입니다.
roslaunch turtlebot3_autorace_camera raspberry_pi_camera_publish.launch
다음 명령어를 실행하면 경고가 뜨면서 rqt_image_view에 아무것도 뜨지 않습니다.
[ WARN:0] global …/modules/videoio/src/cap_gstreamer.cpp (1758) handleMessage OpenCV | GStreamer warning: Embedded video playback halted; module v4l2src0 reported: Failed to allocate required memory.
[ WARN:0] global …/modules/videoio/src/cap_gstreamer.cpp (888) open OpenCV | GStreamer warning: unable to start pipeline
[ WARN:0] global …/modules/videoio/src/cap_gstreamer.cpp (480) isPipelinePlaying OpenCV | GStreamer warning: GStreamer: pipeline have not been created
rostopic echo /camera/image 에도 아무것도 게시되지 않습니다.
라즈베리파이에서 카메라는 인식하는 것 같은데 무엇이 문제인지 모르겠습니다.
The GStreamer error that you are experiencing:
Shows that there is an issue allocating the required RAM to render the camera output. Are you able to try running the camera with a lower resolution or output framerate to reduce the RAM requirements?
Verified camera resolution using the following command
v4l2-ctl --all --device /dev/video0
The results are as follows
Driver Info:
Driver name : bm2835 mmal
Card type : mmal service 16.1
Bus info : platform:bcm2835-v4l2
Driver version : 5.4.231
Capabilities : 0x85200005
Video Capture
Video Overlay
Read/Write
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x05200005
Video Capture
Video Overlay
Read/Write
Streaming
Extended Pix Format
Priority: 2
Video input : 0 (Camera 0: ok)
Format Video Capture:
Width/Height : 320/240
Pixel Format : 'BGR3' (24-bit BGR 8-8-8)
Field : None
Bytes per Line : 960
Size Image : 230400
Colorspace : SMPTE 170M
Transfer Function : Default (maps to Rec. 709)
YCbCr/HSV Encoding: Default (maps to ITU-R 601)
Quantization : Default (maps to Full Range)
Flags :
Format Video Overlay:
Left/Top : 150/50
Width/Height: 1024/768
Field : None
Chroma Key : 0x00000000
Global Alpha: 0xff
Clip Count : 0
Clip Bitmap : No
Framebuffer Format:
Capability : Extern Overlay
Global Alpha
Flags : Overlay Matches Capture/Output Size
Width : 320
Height : 240
Pixel Format : 'YU12'
Streaming Parameters Video Capture:
Capabilities : timeperframe
Frames per second: 30.000 (30/1)
Read buffers : 1
User Controls
brightness 0x00980900 (int) : min=0 max=100 step=1 default=50 value=50 flags=slider
contrast 0x00980901 (int) : min=-100 max=100 step=1 default=0 value=0 flags=slider
saturation 0x00980902 (int) : min=-100 max=100 step=1 default=0 value=0 flags=slider
red_balance 0x0098090e (int) : min=1 max=7999 step=1 default=1000 value=1000 flags=slider
blue_balance 0x0098090f (int) : min=1 max=7999 step=1 default=1000 value=1000 flags=slider
horizontal_flip 0x00980914 (bool) : default=0 value=0
vertical_flip 0x00980915 (bool) : default=0 value=0
power_line_frequency 0x00980918 (menu) : min=0 max=3 default=1 value=1
0: Disabled
1: 50 Hz
2: 60 Hz
3: Auto
sharpness 0x0098091b (int) : min=-100 max=100 step=1 default=0 value=0 flags=slider
color_effects 0x0098091f (menu) : min=0 max=15 default=0 value=0
0: None
1: Black & White
2: Sepia
3: Negative
4: Emboss
5: Sketch
6: Sky Blue
7: Grass Green
8: Skin Whiten
9: Vivid
10: Aqua
11: Art Freeze
12: Silhouette
13: Solarization
14: Antique
15: Set Cb/Cr
rotate 0x00980922 (int) : min=0 max=360 step=90 default=0 value=0 flags=modify-layout
color_effects_cbcr 0x0098092a (int) : min=0 max=65535 step=1 default=32896 value=32896
Codec Controls
video_bitrate_mode 0x009909ce (menu) : min=0 max=1 default=0 value=0 flags=update
0: Variable Bitrate
1: Constant Bitrate
video_bitrate 0x009909cf (int) : min=25000 max=25000000 step=25000 default=10000000 value=10000000
repeat_sequence_header 0x009909e2 (bool) : default=0 value=0
h264_i_frame_period 0x00990a66 (int) : min=0 max=2147483647 step=1 default=60 value=60
h264_level 0x00990a67 (menu) : min=0 max=11 default=11 value=11
0: 1
1: 1b
2: 1.1
3: 1.2
4: 1.3
5: 2
6: 2.1
7: 2.2
8: 3
9: 3.1
10: 3.2
11: 4
h264_profile 0x00990a6b (menu) : min=0 max=4 default=4 value=4
0: Baseline
1: Constrained Baseline
2: Main
4: High
Camera Controls
auto_exposure 0x009a0901 (menu) : min=0 max=3 default=0 value=0
0: Auto Mode
1: Manual Mode
exposure_time_absolute 0x009a0902 (int) : min=1 max=10000 step=1 default=1000 value=1000
exposure_dynamic_framerate 0x009a0903 (bool) : default=0 value=0
auto_exposure_bias 0x009a0913 (intmenu): min=0 max=24 default=12 value=12
0: -4000 (0xfffffffffffff060)
1: -3667 (0xfffffffffffff1ad)
2: -3333 (0xfffffffffffff2fb)
3: -3000 (0xfffffffffffff448)
4: -2667 (0xfffffffffffff595)
5: -2333 (0xfffffffffffff6e3)
6: -2000 (0xfffffffffffff830)
7: -1667 (0xfffffffffffff97d)
8: -1333 (0xfffffffffffffacb)
9: -1000 (0xfffffffffffffc18)
10: -667 (0xfffffffffffffd65)
11: -333 (0xfffffffffffffeb3)
12: 0 (0x0)
13: 333 (0x14d)
14: 667 (0x29b)
15: 1000 (0x3e8)
16: 1333 (0x535)
17: 1667 (0x683)
18: 2000 (0x7d0)
19: 2333 (0x91d)
20: 2667 (0xa6b)
21: 3000 (0xbb8)
22: 3333 (0xd05)
23: 3667 (0xe53)
24: 4000 (0xfa0)
white_balance_auto_preset 0x009a0914 (menu) : min=0 max=10 default=1 value=1
0: Manual
1: Auto
2: Incandescent
3: Fluorescent
4: Fluorescent H
5: Horizon
6: Daylight
7: Flash
8: Cloudy
9: Shade
10: Greyworld
image_stabilization 0x009a0916 (bool) : default=0 value=0
iso_sensitivity 0x009a0917 (intmenu): min=0 max=4 default=0 value=0
0: 0 (0x0)
1: 100000 (0x186a0)
2: 200000 (0x30d40)
3: 400000 (0x61a80)
4: 800000 (0xc3500)
iso_sensitivity_auto 0x009a0918 (menu) : min=0 max=1 default=1 value=1
0: Manual
1: Auto
exposure_metering_mode 0x009a0919 (menu) : min=0 max=2 default=0 value=0
0: Average
1: Center Weighted
2: Spot
scene_mode 0x009a091a (menu) : min=0 max=13 default=0 value=0
0: None
8: Night
11: Sports
JPEG Compression Controls
compression_quality 0x009d0903 (int) : min=1 max=100 step=1 default=30 value=30
The camera resolution is also set to 320x240,30Hz in the launch file
And I also checked the amount of RAM using the free command
ubuntu@ubuntu:~$ free
total used free shared buff/cache available
Mem: 1914232 256812 879684 3244 777736 1529720
Swap: 0 0 0
I think there’s a lot of free memory
Should I lower it than now?
Thank you for your answer
Unfortunately, I don’t have much experience debugging issues regarding GStreamer and OpenCV configurations. I think you may be able to receive some more assistance with this specific issue by reaching out to:
Thank you for your answer
have a nice day ~^^