我的ROS学习之路—nodes
2016-11-16 13:53
141 查看
----publish----->
nodes topic
<----subscrib-----
1、运行命令:
rosnode 命令格式:
ping list info machine kill cleanup
2、打开新的终端运行:
这表示当前只有一个节点在运行: rosout。因为这个节点用于收集和记录节点调
试输出信息,所以它总是在运行的。
3、运行:
4、使用 rosrun
syntax:
5、运行一个新的终端:
__name
__name is a special reserved keyword for "the name of the node." It lets you remap the node name without having to know its actual name. It can only be used if the program that is being launched contains one node.
__log
__log is a reserved keyword that designates the location that the node's log file should be written. Use of this keyword is generally not encouraged -- it is mainly provided for use by ROS tools likeroslaunch.
__ip and __hostname
__ip and __hostname are substitutes for ROS_IP and
ROS_HOSTNAME. Use of this keyword is generally not encouraged as it is provided for special cases where environment variables cannot be set.
__master
__master is a substitute for ROS_MASTER_URI. Use of this keyword is generally not encouraged as it is provided for special cases where environment variables cannot be set.
__ns
__ns is a substitute for ROS_NAMESPACE
. Use of this keyword is generally not encouraged as it is provided for special cases where environment variables cannot be set.
7、我们可以看到新的/my_turtle 节点。使用另外一个 rosnode 指令, ping, 来
nodes topic
<----subscrib-----
1、运行命令:
roscore
rosnode 命令格式:
ping list info machine kill cleanup
ps: rosnode machine 可以显示计算机名
2、打开新的终端运行:
rosnode list
这表示当前只有一个节点在运行: rosout。因为这个节点用于收集和记录节点调
试输出信息,所以它总是在运行的。
3、运行:
rosnode info /rosout
4、使用 rosrun
syntax:
rosnode info /rosout
5、运行一个新的终端:
/rosout/turtlesim
6、节点重命名 关闭
rosrun ctrl+c运行:
rosrun turtlesim turtlesim_node __name:=my_turtle 参考:http://wiki.ros.org/Remapping%20Arguments
__name
__name is a special reserved keyword for "the name of the node." It lets you remap the node name without having to know its actual name. It can only be used if the program that is being launched contains one node.
__log
__log is a reserved keyword that designates the location that the node's log file should be written. Use of this keyword is generally not encouraged -- it is mainly provided for use by ROS tools likeroslaunch.
__ip and __hostname
__ip and __hostname are substitutes for ROS_IP and
ROS_HOSTNAME. Use of this keyword is generally not encouraged as it is provided for special cases where environment variables cannot be set.
__master
__master is a substitute for ROS_MASTER_URI. Use of this keyword is generally not encouraged as it is provided for special cases where environment variables cannot be set.
__ns
__ns is a substitute for ROS_NAMESPACE
. Use of this keyword is generally not encouraged as it is provided for special cases where environment variables cannot be set.
7、我们可以看到新的/my_turtle 节点。使用另外一个 rosnode 指令, ping, 来
rosnode ping my_turtle
相关文章推荐
- 机器人操作系统ROS Indigo 入门学习(6)——理解ROS Nodes
- 我的ROS学习之路—创建catkin的工作空间
- 机器人操作系统ROS Indigo 入门学习(6)——理解ROS Nodes
- 我的ROS学习之路—创建catkin包
- 我的ROS学习之路——ROS安装
- ROS学习之路--创建smartcar仿真机器人(基于kinetic)
- 机器人操作系统ROS Indigo 入门学习(6)——理解ROS Nodes
- ROS学习手记 - 3 理解ROS中的基本概念_ROS_Nodes
- 我的ROS学习之路—ros相关命令
- JAVA学习之路:不走弯路,就是捷径(一)
- Java学习之路:不走弯路,就是捷径
- JAVA学习之路:不走弯路,就是捷径
- Java学习之路:不走弯路,就是捷径 www.51testing.com
- 未来美好憧憬:计算机之路漫漫兮,悠悠载,希望到研究生的时候能够组成一个大家自己的团队,一起学习,开发,研究...
- 继续写写我的Java学习之路([我最喜欢的文章之一,转载)
- 【学习之路】程序员 如何掌握 计算专业机英语
- JAVA学习之路:不走弯路,就是捷径
- JAVA学习之路:不走弯路,就是捷径
- Java学习之路:不走弯路,就是捷径 (1)
- 别人的JAVA学习之路,值得学习(2)