当前位置:网站首页>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
边栏推荐
- Office doc add in - Online CS
- Phishing & filename inversion & Office remote template
- Lesson 7 tensorflow realizes convolutional neural network
- LeetCode - 152 乘积最大子数组
- After sharing the clone remote project, NPM install reports an error - CB () never called! This is an error with npm itself.
- Machine learning plant leaf recognition
- Practical guidance for interface automation testing (Part I): what preparations should be made for interface automation
- ML之shap:基于adult人口普查收入二分类预测数据集(预测年收入是否超过50k)利用Shap值对XGBoost模型实现可解释性案例之详细攻略
- 钓鱼&文件名反转&office远程模板
- 26岁从财务转行软件测试,4年沉淀我已经是25k的测开工程师...
猜你喜欢
AttributeError: Can‘t get attribute ‘SPPF‘ on <module ‘models.common‘ from ‘/home/yolov5/models/comm
《从0到1:CTFer成长之路》书籍配套题目(周更)
AI on the cloud makes earth science research easier
[brush questions] how can we correctly meet the interview?
LeetCode - 152 乘积最大子数组
Suspended else
因高额网络费用,Arbitrum 奥德赛活动暂停,Nitro 发行迫在眉睫
CS-证书指纹修改
[unity] how to export FBX in untiy
CS certificate fingerprint modification
随机推荐
[unity] how to export FBX in untiy
After working for 10 years, I changed to a programmer. Now I'm 35 + years old and I'm not anxious
[brush questions] how can we correctly meet the interview?
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
BUU的MISC(不定时更新)
医疗软件检测机构怎么找,一航软件测评是专家
删除外部表源数据
What are the characteristics of trademark translation and how to translate it?
After sharing the clone remote project, NPM install reports an error - CB () never called! This is an error with npm itself.
Data security -- 13 -- data security lifecycle management
Day 246/300 ssh连接提示“REMOTE HOST IDENTIFICATION HAS CHANGED! ”
MySQL high frequency interview 20 questions, necessary (important)
SSO process analysis
Suspended else
Traffic encryption of red blue confrontation (OpenSSL encrypted transmission, MSF traffic encryption, CS modifying profile for traffic encryption)
Explain in detail the functions and underlying implementation logic of the groups sets statement in SQL
pymongo获取一列数据
What is the difference between int (1) and int (10)? Senior developers can't tell!
红蓝对抗之流量加密(Openssl加密传输、MSF流量加密、CS修改profile进行流量加密)
(practice C language every day) reverse linked list II