当前位置:网站首页>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
边栏推荐
- A method to measure the similarity of time series: from Euclidean distance to DTW and its variants
- mysql的基础命令
- 26岁从财务转行软件测试,4年沉淀我已经是25k的测开工程师...
- [advanced software testing step 1] basic knowledge of automated testing
- 红蓝对抗之流量加密(Openssl加密传输、MSF流量加密、CS修改profile进行流量加密)
- My seven years with NLP
- My creation anniversary
- P5706 [deep foundation 2. Example 8] redistributing fat house water -- February 13, 2022
- Office-DOC加载宏-上线CS
- UniPro甘特图“初体验”:关注细节背后的多场景探索
猜你喜欢
Huawei equipment configuration ospf-bgp linkage
Blue Bridge Cup zero Foundation National Championship - day 20
Explain in detail the functions and underlying implementation logic of the groups sets statement in SQL
CS通过(CDN+证书)powershell上线详细版
CS passed (cdn+ certificate) PowerShell online detailed version
接口自动化测试实践指导(上):接口自动化需要做哪些准备工作
Map of mL: Based on the adult census income two classification prediction data set (whether the predicted annual income exceeds 50K), use the map value to realize the interpretable case of xgboost mod
At the age of 26, I changed my career from finance to software testing. After four years of precipitation, I have been a 25K Test Development Engineer
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
Is it difficult for girls to learn software testing? The threshold for entry is low, and learning is relatively simple
随机推荐
红蓝对抗之流量加密(Openssl加密传输、MSF流量加密、CS修改profile进行流量加密)
Windows Server 2016 standard installing Oracle
MySQL high frequency interview 20 questions, necessary (important)
Practical guidance for interface automation testing (Part I): what preparations should be made for interface automation
After sharing the clone remote project, NPM install reports an error - CB () never called! This is an error with npm itself.
Erreur de type résolue avec succès: type de données « catégorie» non sous - jacente
Bitcoinwin (BCW): 借贷平台Celsius隐瞒亏损3.5万枚ETH 或资不抵债
Attributeerror: can 't get attribute' sppf 'on < module' models. Common 'from' / home / yolov5 / Models / comm
Do you really know the use of idea?
Entity Developer数据库应用程序的开发
顶测分享:想转行,这些问题一定要考虑清楚!
UNIPRO Gantt chart "first experience": multi scene exploration behind attention to details
基于购买行为数据对超市顾客进行市场细分(RFM模型)
Is it difficult for girls to learn software testing? The threshold for entry is low, and learning is relatively simple
Changes in the number of words in English papers translated into Chinese
[ 英语 ] 语法重塑 之 动词分类 —— 英语兔学习笔记(2)
成功解决TypeError: data type ‘category‘ not understood
Reflex WMS medium level series 3: display shipped replaceable groups
删除外部表源数据
UniPro甘特图“初体验”:关注细节背后的多场景探索