ROS 相机校准器出错
ROS Camera Calibrator Errors Out
我在 Ubuntu 20.04 运行ning ros_core 和 Raspberry Pi 运行ning 相机节点上安装了 ROS。我尝试 运行 rosrun camera_calibration cameracalibrator.py --size 8x6 --square 0.108 image:=/cv_camera/image camera:=/cv_camera
我收到以下错误:
Traceback (most recent call last):
File "/opt/ros/noetic/lib/camera_calibration/cameracalibrator.py", line 37, in <module>
import message_filters
File "/opt/ros/noetic/lib/python3/dist-packages/message_filters/__init__.py", line 35, in <module>
import rospy
File "/opt/ros/noetic/lib/python3/dist-packages/rospy/__init__.py", line 49, in <module>
from .client import spin, myargv, init_node, \
File "/opt/ros/noetic/lib/python3/dist-packages/rospy/client.py", line 60, in <module>
import rospy.impl.init
File "/opt/ros/noetic/lib/python3/dist-packages/rospy/impl/init.py", line 54, in <module>
from .tcpros import init_tcpros
File "/opt/ros/noetic/lib/python3/dist-packages/rospy/impl/tcpros.py", line 45, in <module>
import rospy.impl.tcpros_service
File "/opt/ros/noetic/lib/python3/dist-packages/rospy/impl/tcpros_service.py", line 54, in <module>
from rospy.impl.tcpros_base import TCPROSTransport, TCPROSTransportProtocol, \
File "/opt/ros/noetic/lib/python3/dist-packages/rospy/impl/tcpros_base.py", line 160
(e_errno, msg, *_) = e.args
^
SyntaxError: invalid syntax
我通过 apt 安装了 python2
和 python2-dev
,然后通过 get-pip.py 安装了 pip。然后我运行pip install pyyaml opencv-python
安装校准器需要的依赖。在安装 python2 之前,我尝试使用 python3 运行 它,但我认为它需要 python2。我应该怎么办。我有相机发布所有正确的主题。另外,我 运行 rosrun rqt_image_view rqt_image_view
时只看到黑白屏幕。请帮忙!
您必须找到 /opt/ros/noetic/lib/camera_calibration/cameracalibrator.py 下的校准器文件,然后 运行 手动找到它。
我在 Ubuntu 20.04 运行ning ros_core 和 Raspberry Pi 运行ning 相机节点上安装了 ROS。我尝试 运行 rosrun camera_calibration cameracalibrator.py --size 8x6 --square 0.108 image:=/cv_camera/image camera:=/cv_camera
我收到以下错误:
Traceback (most recent call last):
File "/opt/ros/noetic/lib/camera_calibration/cameracalibrator.py", line 37, in <module>
import message_filters
File "/opt/ros/noetic/lib/python3/dist-packages/message_filters/__init__.py", line 35, in <module>
import rospy
File "/opt/ros/noetic/lib/python3/dist-packages/rospy/__init__.py", line 49, in <module>
from .client import spin, myargv, init_node, \
File "/opt/ros/noetic/lib/python3/dist-packages/rospy/client.py", line 60, in <module>
import rospy.impl.init
File "/opt/ros/noetic/lib/python3/dist-packages/rospy/impl/init.py", line 54, in <module>
from .tcpros import init_tcpros
File "/opt/ros/noetic/lib/python3/dist-packages/rospy/impl/tcpros.py", line 45, in <module>
import rospy.impl.tcpros_service
File "/opt/ros/noetic/lib/python3/dist-packages/rospy/impl/tcpros_service.py", line 54, in <module>
from rospy.impl.tcpros_base import TCPROSTransport, TCPROSTransportProtocol, \
File "/opt/ros/noetic/lib/python3/dist-packages/rospy/impl/tcpros_base.py", line 160
(e_errno, msg, *_) = e.args
^
SyntaxError: invalid syntax
我通过 apt 安装了 python2
和 python2-dev
,然后通过 get-pip.py 安装了 pip。然后我运行pip install pyyaml opencv-python
安装校准器需要的依赖。在安装 python2 之前,我尝试使用 python3 运行 它,但我认为它需要 python2。我应该怎么办。我有相机发布所有正确的主题。另外,我 运行 rosrun rqt_image_view rqt_image_view
时只看到黑白屏幕。请帮忙!
您必须找到 /opt/ros/noetic/lib/camera_calibration/cameracalibrator.py 下的校准器文件,然后 运行 手动找到它。