ROS笔记3 理解nodes

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
ROS笔记3 理解nodes

使用rosnode

新起一个终端(之前运行的rscore不能退掉)

显示正在运行的node:rosnode list
查看一个node的详细信息:rosnode info /rosout
ROS笔记3 理解nodes

直接运行某个package里的某个node

rosrun [package_name] [node_name]

比如rosrun turtlesim turtlesim_node

ROS笔记3 理解nodes

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.
上一篇:Silverlight动画的基本知识、关键帧动画


下一篇:Python学习第四篇——列表访问与判定