ROS

在学习ros/tf2函数库的时候,在launch文件中添加了节点之后发现无法启动,出现一下错误:

... logging to /home/xzchuang/.ros/log/76b69150-e5f4-11e7-a49a-484d7ec9f3d5/roslaunch-Vostro-14838.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://Vostro:35366/

SUMMARY
========

PARAMETERS
 * /rosdistro: kinetic
 * /rosversion: 1.12.12
 * /turtle1_tf2_broadcaster/turtle: turtle1
 * /turtle2_tf2_broadcaster/turtle: turtle2

NODES
  /
    listener (learning_tf2/turtle_tf2_listener.py)
    sim (turtlesim/turtlesim_node)
    teleop (turtlesim/turtle_teleop_key)
    turtle1_tf2_broadcaster (learning_tf2/turtle_tf2_broadcaster.py)
    turtle2_tf2_broadcaster (learning_tf2/turtle_tf2_broadcaster.py)

ROS_MASTER_URI=http://localhost:11311

process[sim-1]: started with pid [14855]
process[teleop-2]: started with pid [14856]
process[turtle1_tf2_broadcaster-3]: started with pid [14857]
process[turtle2_tf2_broadcaster-4]: started with pid [14868]
ERROR: cannot launch node of type [learning_tf2/turtle_tf2_listener.py]: can't locate node [turtle_tf2_listener.py] in package [learning_tf2]
Reading from keyboard
---------------------------
Use arrow keys to move the turtle.
[turtle2_tf2_broadcaster-4] killing on exit
[turtle1_tf2_broadcaster-3] killing on exit
[sim-1] killing on exit
[teleop-2] killing on exit
shutting down processing monitor...
... shutting down processing monitor complete
done

经过排查,发现是当前用户对当前文件(turtle_tf2_listener.py)没有可执行的权限,修改()之后,一切正常

xzchuang@Vostro:~/catkin_ws/src/learning_tf2/nodes$ ll
总用量 28
drwxrwxr-x 3 xzchuang xzchuang 4096 1221 14:10 ./
drwxrwxr-x 6 xzchuang xzchuang 4096 1221 14:06 ../
drwxrwxr-x 3 xzchuang xzchuang 4096 1221 14:10 .idea/
-rwxrwxr-x 1 xzchuang xzchuang 1569 1221 11:01 static_turtle_tf2_broadcaster.py*
-rwxrwxr-x 1 xzchuang xzchuang 1006 1221 11:23 turtle_tf2_broadcaster.py*
-rwxrwxr-x 1 xzchuang xzchuang 1176 1221 14:08 turtle_tf2_listener2.py*
-rw-rw-r-- 1 xzchuang xzchuang 1176 1221 14:10 turtle_tf2_listener.py
xzchuang@Vostro:~/catkin_ws/src/learning_tf2/nodes$ chmod +x turtle_tf2_listener.py 
xzchuang@Vostro:~/catkin_ws/src/learning_tf2/nodes$ ll
总用量 28
drwxrwxr-x 3 xzchuang xzchuang 4096 1221 14:10 ./
drwxrwxr-x 6 xzchuang xzchuang 4096 1221 14:06 ../
drwxrwxr-x 3 xzchuang xzchuang 4096 1221 14:10 .idea/
-rwxrwxr-x 1 xzchuang xzchuang 1569 1221 11:01 static_turtle_tf2_broadcaster.py*
-rwxrwxr-x 1 xzchuang xzchuang 1006 1221 11:23 turtle_tf2_broadcaster.py*
-rwxrwxr-x 1 xzchuang xzchuang 1176 1221 14:08 turtle_tf2_listener2.py*
-rwxrwxr-x 1 xzchuang xzchuang 1176 1221 14:10 turtle_tf2_listener.py*

你可能感兴趣的:(ros学习)