当前位置:网站首页>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

边栏推荐
- SAP UI5 应用开发教程之一百零六 - 如何提高 SAP UI5 应用路由 url 的可读性试读版
- 【海浪建模1】海浪建模的理论分析和matlab仿真
- 每日刷题记录 (十三)
- 【海浪建模3】三维随机真实海浪建模以及海浪发电机建模matlab仿真
- 【FPGA教程案例9】基于vivado核的时钟管理器设计与实现
- PyTorch: In-place Operation
- 各大主流编程语言性能PK,结果出乎意料
- Talking about JVM 4: class loading mechanism
- 【报错】 “TypeError: Cannot read properties of undefined (reading ‘split‘)“
- 2022.07.03(LC_6109_知道秘密的人数)
猜你喜欢

There is a new Post-00 exam king in the testing department. I really can't do it in my old age. I have

7. Scala process control

Leetcode70 (Advanced), 322

Poap: the adoption entrance of NFT?
![P3304 [sdoi2013] diameter (diameter of tree)](/img/5c/984675bf4517481f80f54657c6c7ad.png)
P3304 [sdoi2013] diameter (diameter of tree)

Binary conversion problem
![[pure tone hearing test] pure tone hearing test system based on MATLAB](/img/1c/62ed6b3eb27a4dff976c4a2700a850.png)
[pure tone hearing test] pure tone hearing test system based on MATLAB

Several simplified forms of lambda expression

Identifiers and keywords

SAP UI5 应用的主-从-从(Master-Detail-Detail)布局模式的实现步骤
随机推荐
[Yocto RM]11 - Features
Huawei employs data management experts with an annual salary of 2million! The 100 billion market behind it deserves attention
How to use words to describe breaking change in Spartacus UI of SAP e-commerce cloud
TS快速入门-函数
TS quick start - functions
Daily practice (18): stack containing min function
npm install报错 强制安装
What if the programmer's SQL data script coding ability is weak and Bi can't do it?
URLs and URIs
POAP:NFT的采用入口?
Arbitrum: two-dimensional cost
Visual explanation of Newton iteration method
SAP ui5 application development tutorial 106 - how to improve the readability of SAP ui5 application routing URL trial version
1189. Maximum number of "balloons"
SAP UI5 应用开发教程之一百零六 - 如何提高 SAP UI5 应用路由 url 的可读性试读版
Applet live + e-commerce, if you want to be a new retail e-commerce, use it!
Open3d uses GICP to register point clouds
lambda表达式
const、volatile和restrict的作用和用法总结
Database performance optimization tool