ROS_Kinetic_05 ROS基础内容(二)

ROS_Kinetic_05 ROS基础内容(二)

1. ROS节点node

官网教程:http://wiki.ros.org/cn/ROS/Tutorials/UnderstandingNodes

基本概念:

Nodes:节点,一个节点即为一个可执行文件,它可以通过ROS与其它节点进行通信。
Messages:消息,消息是一种ROS数据类型,用于订阅或发布到一个主题。
Topics:主题,节点可以发布消息到主题,也可以订阅主题以接收消息。
Master:节点管理器,ROS名称服务。
rosout: ROS中相当于stdout/stderr。
roscore: 主机+ rosout + 参数服务器。
rospy = python 客户端库
roscpp = c++ 客户端库
--------------------------------------------------------------------------------------------------------------------

~$ roscore

~$ rosrun turtlesim turtlesim_node

~$ rosnode list

~$ rosrun turtlesim turtlesim_node __name:=kinetic_turtle

~$ rosrun turtlesim turtlesim_node __name:=kinetic_turtle


~$ rosnode cleanup
关闭turtlesim_node,请按下“Ctrl-C” 。


2. ROS主题topic

官网教程:http://wiki.ros.org/cn/ROS/Tutorials/UnderstandingTopics

~$ rosrun turtlesim turtle_teleop_key

~$ rosrun rqt_graph rqt_graph

~$ rostopic list

~$ rostopic type /turtle1/cmd_vel

~$ rosmsg show geometry_msgs/Twist



~$ rostopic pub -1 /turtle1/cmd_vel geometry_msgs/Twist -- '[2.0, 0.0, 0.0]' '[0.0, 0.0, 1.8]'

publishing and latching message for 3.0 seconds

~$ rostopic pub /turtle1/cmd_vel geometry_msgs/Twist -r 1 -- '[2.0, 0.0, 0.0]' '[0.0, 0.0, 1.8]'

~$ rostopic hz /turtle1/pose

subscribed to [/turtle1/pose]
average rate: 124.817
    min: 0.006s max: 0.010s std dev: 0.00141s window: 118
average rate: 125.015
    min: 0.006s max: 0.010s std dev: 0.00142s window: 243
average rate: 124.968
    min: 0.006s max: 0.010s std dev: 0.00142s window: 368
average rate: 125.009
    min: 0.006s max: 0.010s std dev: 0.00141s window: 493

~$ rostopic type /turtle1/cmd_vel | rosmsg show

~$ rosrun rqt_plot rqt_plot




-End-


### ROS Kinetic Calibration Tutorial and Resources For users interested in calibrating sensors or other components within the ROS Kinetic environment, several tutorials and resources are available. The `pluginlib` package provides an abstract framework for creating and using plugins which might be useful when developing custom calibration nodes[^1]. However, specific to calibration tasks, one of the most comprehensive guides comes from the official ROS wiki documentation. The Camera Calibration tool is part of the image_pipeline suite and allows performing camera intrinsic parameter estimation through a graphical user interface. This process involves capturing images containing a known pattern such as a chessboard grid placed at different orientations relative to the camera lens. After collecting enough samples, running the calibration node will compute focal length, principal point position, distortion coefficients among others parameters necessary for undistorting captured frames during operation. Another important aspect covered by these materials includes extrinsic parameters determination between multiple cameras mounted on robots like TurtleBot where accurate alignment ensures better performance especially while navigating environments based upon visual SLAM algorithms. Instructions provided explain not only theoretical concepts behind each step involved but also practical considerations regarding setup preparation before starting actual measurements. Moreover, integrating self-created maps alongside simulation platforms enhances testing capabilities without requiring physical hardware availability all times thus facilitating development cycles significantly according to explanations found elsewhere concerning Stage integration techniques specifically tailored towards mobile bases equipped with laser scanners capable of generating occupancy grids used later inside Gazebo worlds after proper adjustments made via configuration files following guidelines outlined thereupon too[^3]. Lastly, expanding workspaces beyond base installations enables incorporating specialized libraries supporting advanced functionalities required throughout various stages ranging from data acquisition up until post-processing analysis phases thanks largely due contributions coming directly out-of-the-box once extra dependencies get added properly following instructions laid down hereunder about managing releases efficiently so projects benefit fully from community efforts put forth collectively over time ensuring compatibility across diverse setups encountered regularly nowadays within research labs around globe alike[^5]. ```bash roslaunch camera_calibration cameracalibrator.launch \ image:=<your_image_topic> \ camera_name:=<your_camera_name> \ calib_url:=<path_to_your_calib_file> ```
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

zhangrelay

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值