ubuntu 中 ROS 一些报错的解决

1. Unable to load type

jym@ubuntu:~/catkin_ws$ rosservice args /add_two_ints
ERROR: Unable to load type [beginner_tutorials/AddTwoInts].
Have you typed 'make' in [beginner_tutorials]?

由于当前使用的终端的工作环境没有更新导致无法找到自定义的消息。使用下面的命令刷新一下即可

jym@ubuntu:~/catkin_ws$ source ./devel/setup.bash
jym@ubuntu:~/catkin_ws$ rosservice args /add_two_ints
a b

2.Unable to register with master node

jym@ubuntu:~/catkin_ws$ rosrun beginner_tutorials add_two_ints_server.py
Unable to register with master node [http://localhost:11311]: master may not be running yet. Will keep trying.

新开一个终端,然后输入roscore

然后当前终端再次运行:

jym@ubuntu:~/catkin_ws$ rosrun beginner_tutorials add_two_ints_server.py
Ready to add two ints.
Returning [1 + 3 = 4]

<

你可能感兴趣的:(学习笔记,ROS)