http://wiki.ros.org/ROS/Tutorials/UnderstandingNodes
介绍几个命令行工具用法
- roscore
- rosnode
- rosrun
A node really isn't much more than an executable file within a ROS package. ROS nodes use a ROS client library to communicate with other nodes. Nodes can publish or subscribe to a Topic. Nodes can also provide or use a Service.
就是个可执行程序,用ros client libarary编写.
- rospy = python client library
- roscpp = c++ client library
rscore
使用rscore的第一件事就是执行roscore
使用rosnode
新起一个终端(之前运行的rscore不能退掉)
显示正在运行的node:rosnode list
查看一个node的详细信息:rosnode info /rosout
直接运行某个package里的某个node
rosrun [package_name] [node_name]
比如rosrun turtlesim turtlesim_node
rosrun turtlesim turtlesim_node __name:=my_turtle
起一个Node并重命名.
总结
- roscore = ros+core : master (provides name service for ROS) + rosout (stdout/stderr) + parameter server (parameter server will be introduced later)
- rosnode = ros+node : ROS tool to get information about a node.
- rosrun = ros+run : runs a node from a given package.