当前位置:网站首页>ROS learning_ Basics
ROS learning_ Basics
2022-07-06 06:51:00 【Leslie x Xu】
ROS Command line tools use
One 、 Common commands
- roscore : start-up ros
- rosrun :
rosrun [package_name] [node_name]
Call node The parameters are function package name and node name - rosnode :
rosnode list
List the currently running nodes - rqt_graph : Visualize the currently running nodes
- rostopic : Operate the topic
rostopic pub
: Post topic newsrostopic type
: View message types
- rosservice : Operate the service
rosservice call
: Publish service request
- rosparam
- rosmsg : Get the details of the message
- rossrv
Two 、 Example : Turtle simulation
start-up ROS Master:
$roscore
Start the turtle Simulator :
$rosrun turtlesim turtlesim_node
Start the turtle control node :
$rosrun turtlesim turtle_teleop_key
Be careful : These three commands are executed on three terminals respectively .function
3、 ... and 、 Post topic news
Release the news Keep the turtle moving .
- First check the message type
~$ rostopic type /turtle1/cmd_vel
geometry_msgs/Twist
~$ rosmsg show geometry_msgs/Twist
geometry_msgs/Vector3 linear
float64 x
float64 y
float64 z
geometry_msgs/Vector3 angular
float64 x
float64 y
float64 z
- Write parameters
~$ rostopic pub -r 10 /turtle1/cmd_vel geometry_msgs/Twist " linear: x: 1.0 y: 0.0 z: 0.0 angular: x: 0.0 y: 0.0 z: 0.0 "
Be careful : Parameter alignment
- function
Four 、 Publish service request
Publish service request , Add a new turtle .
- View request information
~$ rosservice info /spawn
Node: /turtlesim
URI: rosrpc://ros2go:39063
Type: turtlesim/Spawn
Args: x y theta name
- Release request
~$ rosservice call /spawn " x: 5.0 y: 5.0 theta: 0.0 name: 'turtle2' "
name: "turtle2"
- function
5、 ... and 、 The difference between topic and service
- topic of conversation (Topic)
- Asynchronous communication mechanism between nodes
- Use Release / subscribe Model
- Topic data : news (Message) File format
.msg
- service (Service)
- Synchronous communication mechanism between nodes
- Use client / The server (C/S) Model
- data : File format
.srv
边栏推荐
- Data security -- 13 -- data security lifecycle management
- 【刷题】怎么样才能正确的迎接面试?
- 成功解决AttributeError: Can only use .cat accessor with a ‘category‘ dtype
- SQL Server Manager studio (SSMS) installation tutorial
- Windows Server 2016 standard installing Oracle
- Simple query cost estimation
- Latex文字加颜色的三种办法
- [Yu Yue education] flower cultivation reference materials of Weifang Vocational College
- 钓鱼&文件名反转&office远程模板
- In English translation of papers, how to do a good translation?
猜你喜欢
Practical guidance for interface automation testing (Part I): what preparations should be made for interface automation
攻防世界 MISC中reverseMe简述
Apache dolphin scheduler source code analysis (super detailed)
ML之shap:基于adult人口普查收入二分类预测数据集(预测年收入是否超过50k)利用Shap值对XGBoost模型实现可解释性案例之详细攻略
Biomedical localization translation services
Classification des verbes reconstruits grammaticalement - - English Rabbit Learning notes (2)
My seven years with NLP
[advanced software testing step 1] basic knowledge of automated testing
26岁从财务转行软件测试,4年沉淀我已经是25k的测开工程师...
云上有AI,让地球科学研究更省力
随机推荐
简单描述 MySQL 中,索引,主键,唯一索引,联合索引 的区别,对数据库的性能有什么影响(从读写两方面)
指尖上的 NFT|在 G2 上评价 Ambire,有机会获得限量版收藏品
LeetCode每日一题(1997. First Day Where You Have Been in All the Rooms)
Day 245/300 JS forEach 多层嵌套后数据无法更新到对象中
Monotonic stack
【刷题】怎么样才能正确的迎接面试?
Thesis abstract translation, multilingual pure human translation
Bitcoinwin (BCW): 借贷平台Celsius隐瞒亏损3.5万枚ETH 或资不抵债
Day 245/300 JS foreach data cannot be updated to the object after multi-layer nesting
利用快捷方式-LNK-上线CS
钓鱼&文件名反转&office远程模板
Redis Foundation
Huawei equipment configuration ospf-bgp linkage
[Yu Yue education] Dunhuang Literature and art reference materials of Zhejiang Normal University
Day 239/300 注册密码长度为8~14个字母数字以及标点符号至少包含2种校验
Blue Bridge Cup zero Foundation National Championship - day 20
My seven years with NLP
自动化测试环境配置
SQL Server Manager studio (SSMS) installation tutorial
接口自动化测试框架:Pytest+Allure+Excel