ROS之USB摄像头识别二维码问题解决

出现错误如下:

ERROR: cannot launch node of type [ar_track_alvar/individualMarkersNoKinect]: Cann
ot locate node of type [individualMarkersNoKinect] in package [ar_track_alvar]. Ma
ke sure file exists in package path and permission is set to executable (chmod +x)

zztsj@tsj:~$ roslaunch robot_vision ar_track_camera.launch 
... logging to /home/zztsj/.ros/log/8c04e9b8-4cca-11eb-9d65-9822efa1466f/roslaunch-tsj-4103.log
Checking log directory for disk usage. This may take a while.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://localhost:42405/

SUMMARY
========

PARAMETERS
 * /ar_track_alvar/marker_size: 3.0
 * /ar_track_alvar/max_new_marker_error: 0.08
 * /ar_track_alvar/max_track_error: 0.2
 * /ar_track_alvar/output_frame: /usb_cam
 * /rosdistro: melodic
 * /rosversion: 1.14.10

NODES
  /
    ar_track_alvar (ar_track_alvar/individualMarkersNoKinect)
    rviz (rviz/rviz)
    world_to_cam (tf/static_transform_publisher)

ROS_MASTER_URI=http://localhost:11311

process[world_to_cam-1]: started with pid [4118]
ERROR: cannot launch node of type [ar_track_alvar/individualMarkersNoKinect]: Cannot locate node of type [individualMarkersNoKinect] in package [ar_track_alvar]. Make sure file exists in package path and permission is set to executable (chmod +x)

出现上面错误的原因是在自己的工作空间中有同名的包

解决方法

在工作空间下输入以下指令,找到同名包的位置

catkin_find --without-underlays --libexec --share ar_track_alvar

会显示如下

zztsj@tsj:~$ catkin_find --without-underlays --libexec --share ar_track_alvar
/home/zztsj/catkin_ws/devel/lib/ar_track_alvar
/home/zztsj/catkin_ws/devel/share/ar_track_alvar

会有两个同名的包,然后进入相应的目录下,删除这两个包

如下:

zztsj@tsj:~$ cd catkin_ws/devel/lib/
zztsj@tsj:~/catkin_ws/devel/lib$ rm -rf ar_track_alvar/

zztsj@tsj:~$ cd catkin_ws/devel/share/
zztsj@tsj:~/catkin_ws/devel/share$ rm -rf ar_track_alvar

 

posted @ 2021-01-02 17:20  拼命的骡子  阅读(2376)  评论(0编辑  收藏  举报