当前位置:网站首页>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
边栏推荐
- [pure tone hearing test] pure tone hearing test system based on MATLAB
- PyTorch: In-place Operation
- "Upside down salary", "equal replacement of graduates" these phenomena show that the testing industry has
- 【Unity】InputSystem
- ORB(Oriented FAST and Rotated BRIEF)
- (script) one click deployment of any version of redis - the way to build a dream
- 【FPGA教程案例10】基于Verilog的复数乘法器设计与实现
- 【纯音听力测试】基于MATLAB的纯音听力测试系统
- [Yocto RM]10 - Images
- Getting started with Paxos
猜你喜欢
Arbitrum:二维费用
兩個數相互替換
Applet live + e-commerce, if you want to be a new retail e-commerce, use it!
ORB(Oriented FAST and Rotated BRIEF)
小程序直播 + 电商,想做新零售电商就用它吧!
SAP UI5 应用开发教程之一百零六 - 如何提高 SAP UI5 应用路由 url 的可读性试读版
dotnet-exec 0.6.0 released
Analysis and comparison of leetcode weekly race + acwing weekly race (t4/t3)
pycharm专业版下载安装教程
Identifiers and keywords
随机推荐
两个数相互替换
Detailed explanation of multi-mode input event distribution mechanism
Daily practice (18): stack containing min function
Huawei employs millions of data governance experts! The 100 billion market behind it deserves attention
User login function: simple but difficult
Compare whether two lists are equal
Playwright之录制
Two numbers replace each other
7. Scala process control
The performance of major mainstream programming languages is PK, and the results are unexpected
[wave modeling 3] three dimensional random real wave modeling and wave generator modeling matlab simulation
Pycharm professional download and installation tutorial
Acwing164. Accessibility Statistics (topological sorting +bitset)
MongoDB系列之学习笔记教程汇总
pycharm专业版下载安装教程
[microprocessor] VHDL development of microprocessor based on FPGA
[wave modeling 1] theoretical analysis and MATLAB simulation of wave modeling
Analysis and comparison of leetcode weekly race + acwing weekly race (t4/t3)
Grabbing and sorting out external articles -- status bar [4]
leetcode494,474