mlaiacker / rosbag2video

converts image sequence in ros bag files to video files
GNU General Public License v2.0
313 stars 111 forks source link

AttributeError: 'CompressedImage' object has no attribute 'encoding' #24

Closed han1222 closed 3 years ago

han1222 commented 3 years ago

in ROS2 Environment when I run with ./ros2bag2video.py ~

./ros2bag2video.py: line 17: import: command not found ./ros2bag2video.py: line 18: import: command not found ./ros2bag2video.py: line 19: import: command not found ./ros2bag2video.py: line 20: import: command not found ./ros2bag2video.py: line 21: import: command not found ./ros2bag2video.py: line 22: import: command not found ./ros2bag2video.py: line 23: from: command not found ./ros2bag2video.py: line 24: from: command not found ./ros2bag2video.py: line 26: from: command not found ./ros2bag2video.py: line 27: from: command not found ./ros2bag2video.py: line 28: try:: command not found ./ros2bag2video.py: line 29: from: command not found ./ros2bag2video.py: line 30: except: command not found ./ros2bag2video.py: line 31: pass: command not found ./ros2bag2video.py: line 32: from: command not found ./ros2bag2video.py: line 33: from: command not found ./ros2bag2video.py: line 34: from: command not found ./ros2bag2video.py: line 35: from: command not found ./ros2bag2video.py: line 37: VIDEO_CONVERTER_TO_USE: command not found ./ros2bag2video.py: line 40: syntax error near unexpected token (' ./ros2bag2video.py: line 40:def print_help():'

in ROS2 Environment when I run with python3 ros2bag2video.py ~

AttributeError: 'CompressedImage' object has no attribute 'encoding'

Type: sensor_msgs/msg/CompressedImage

I am trying to convert Type: sensor_msgs/msg/CompressedImage to viedo file

how can I solve this problem?

mive93 commented 3 years ago

Hi @han1222,

I have the same error. How did you solve it?

han1222 commented 3 years ago

@mive93

Please refer to the site below. https://github.com/han1222/rosbag2video/blob/foxy/ros2bag2video.py

mive93 commented 3 years ago

@han1222 thank you very much!