当前位置:网站首页>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
边栏推荐
- Introduction and underlying analysis of regular expressions
- Chinese English comparison: you can do this Best of luck
- Practical guidance for interface automation testing (Part I): what preparations should be made for interface automation
- 因高额网络费用,Arbitrum 奥德赛活动暂停,Nitro 发行迫在眉睫
- LeetCode每日一题(971. Flip Binary Tree To Match Preorder Traversal)
- [ 英語 ] 語法重塑 之 動詞分類 —— 英語兔學習筆記(2)
- CS-证书指纹修改
- Successfully solved typeerror: data type 'category' not understood
- What are the characteristics of trademark translation and how to translate it?
- 医疗软件检测机构怎么找,一航软件测评是专家
猜你喜欢
Monotonic stack
Classification des verbes reconstruits grammaticalement - - English Rabbit Learning notes (2)
Brief introduction to the curriculum differences of colleges and universities at different levels of machine human major -ros1/ros2-
指尖上的 NFT|在 G2 上评价 Ambire,有机会获得限量版收藏品
SQL Server manager studio(SSMS)安装教程
ECS accessKey key disclosure and utilization
Office-DOC加载宏-上线CS
Cobalt strike feature modification
How to translate professional papers and write English abstracts better
【软件测试进阶第1步】自动化测试基础知识
随机推荐
Successfully solved typeerror: data type 'category' not understood
Basic commands of MySQL
利用快捷方式-LNK-上线CS
Database basics exercise part 2
What is the difference between int (1) and int (10)? Senior developers can't tell!
How to reconstruct the class explosion caused by m*n strategies?
It is necessary to understand these characteristics in translating subtitles of film and television dramas
How to do a good job in financial literature translation?
Phishing & filename inversion & Office remote template
AI on the cloud makes earth science research easier
Erreur de type résolue avec succès: type de données « catégorie» non sous - jacente
Entity Developer数据库应用程序的开发
Lesson 7 tensorflow realizes convolutional neural network
The ECU of 21 Audi q5l 45tfsi brushes is upgraded to master special adjustment, and the horsepower is safely and stably increased to 305 horsepower
中青看点阅读新闻
[unity] how to export FBX in untiy
Thesis abstract translation, multilingual pure human translation
Financial German translation, a professional translation company in Beijing
Leetcode - 152 product maximum subarray
Today's summer solstice