当前位置:网站首页>ROS command line tool
ROS command line tool
2022-07-05 00:58:00 【melodic18】
rostopic
1. List all current topics :
rostopic list
give the result as follows :
/rosout
/rosout_agg
/turtle1/cmd_vel
/turtle1/color_sensor
/turtle1/pose
2. Post messages from the keyboard :
topic of conversation data structure Specific data
rostopic pub /turtle1/cmd_vel geometry_msgs/Twist "linear:
x: 0.0
y: 0.0
z: 0.0
angular:
x: 0.0
y: 0.0
z: 0.0"
Line speed reading : rice / second
angular velocity : radian / second 
We change the line speed reading to 1:
We found the turtle moving forward , It stopped after a short distance , This is because it is only released once , Not always released .
Next, we try to publish ten times a second :
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"
We found the turtle walking straight ahead , Don't stop when you hit the wall , Can press ctrl+c stop it :

By releasing linear velocity and angular velocity at the same time , We can draw circles :
rostopic pub -r 10 /turtle1/cmd_vel geometry_msgs/Twi "linear:
x: 1.0
y: 0.0
z: 0.0
angular:
x: 0.0
y: 0.0
z: 1.0"

rosservice
List all services :
rosservice list
The following services can be called :
/clear
/kill
/reset
/rosout/get_loggers
/rosout/set_logger_level
/spawn
/teleop_turtle/get_loggers
/teleop_turtle/set_logger_level
/turtle1/set_pen
/turtle1/teleport_absolute
/turtle1/teleport_relative
/turtlesim/get_loggers
/turtlesim/set_logger_level
Call the service to generate a new turtle :
rosservice call /spawn "x: 2.0
y: 2.0
theta: 0.0
name: 'turtle2'"
Be careful : The lower left corner of the simulator is the coordinate origin , there xy Indicates the location where the new Turtle was born .
rosbag
Mainly used to record data , Data can be reproduced .
Suppose we want to debug the UAV , Then there is no need to fly the UAV every time for debugging , The flight data of the aircraft can be recorded , Then it can be debugged in the Laboratory .
Save the turtle's current movement data in a package :
rosbag record -a -o rec
After the record is finished , The recorded data will be placed in the current terminal directory .
Duplicate data :
rosbag play rec_2022-02-13-11-54-34.bag

边栏推荐
- Research Report on the overall scale, major producers, major regions, products and application segmentation of agricultural automatic steering system in the global market in 2022
- Inventory of more than 17 typical security incidents in January 2022
- Grabbing and sorting out external articles -- status bar [4]
- 潘多拉 IOT 开发板学习(RT-Thread)—— 实验4 蜂鸣器+马达实验【按键外部中断】(学习笔记)
- 【微处理器】基于FPGA的微处理器VHDL开发
- College degree, what about 33 year old Baoma? I still sell and test, and my monthly income is 13K+
- Summary of the function and usage of const, volatile and restrict
- Playwright之录制
- [wave modeling 3] three dimensional random real wave modeling and wave generator modeling matlab simulation
- Chia Tai International Futures: what is the master account and how to open it?
猜你喜欢

Inventory of more than 17 typical security incidents in January 2022

Safety learning week4

Chia Tai International Futures: what is the master account and how to open it?

"Upside down salary", "equal replacement of graduates" these phenomena show that the testing industry has

【海浪建模2】三维海浪建模以及海浪发电机建模matlab仿真

npm install报错 强制安装

skimage: imread & imsave & imshow
![Grabbing and sorting out external articles -- status bar [4]](/img/88/8267ab92177788ac17ab665a90b781.png)
Grabbing and sorting out external articles -- status bar [4]

abc 258 G - Triangle(bitset)

2022.07.03 (lc_6111_counts the number of ways to place houses)
随机推荐
Several simplified forms of lambda expression
The difference between string STR and new string
lambda表达式
小程序直播 + 电商,想做新零售电商就用它吧!
College degree, what about 33 year old Baoma? I still sell and test, and my monthly income is 13K+
Paper notes multi UAV collaborative monolithic slam
[Yocto RM]11 - Features
MongoDB系列之学习笔记教程汇总
[error reporting] "typeerror: cannot read properties of undefined (reading 'split')“
107. SAP UI5 OverflowToolbar 容器控件以及 resize 事件处理的一些细节介绍
BGP comprehensive experiment
SAP ui5 application development tutorial 106 - how to improve the readability of SAP ui5 application routing URL trial version
Innovation leads the direction. Huawei Smart Life launches new products in the whole scene
P4281 [ahoi2008] emergency assembly / gathering (LCA)
26.2 billion! These universities in Guangdong Province have received heavy support
两个数相互替换
资深测试/开发程序员写下无bug?资历(枷锁)不要惧怕错误......
6. Scala operator
[wave modeling 3] three dimensional random real wave modeling and wave generator modeling matlab simulation
【报错】 “TypeError: Cannot read properties of undefined (reading ‘split‘)“