当前位置:网站首页>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
边栏推荐
- 6. Scala operator
- Innovation leads the direction. Huawei Smart Life launches new products in the whole scene
- Implementation steps of master detail detail layout mode of SAP ui5 application
- Binary conversion problem
- 各大主流编程语言性能PK,结果出乎意料
- Introduction to the gtid mode of MySQL master-slave replication
- “薪资倒挂”、“毕业生平替” 这些现象说明测试行业已经...
- SAP UI5 应用开发教程之一百零六 - 如何提高 SAP UI5 应用路由 url 的可读性试读版
- Safety learning week4
- 26.2 billion! These universities in Guangdong Province have received heavy support
猜你喜欢
随机推荐
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
抓包整理外篇——————状态栏[ 四]
揭露测试外包公司,关于外包,你或许听到过这样的声音
Talking about JVM 4: class loading mechanism
(script) one click deployment of any version of redis - the way to build a dream
NPM install error forced installation
Deux nombres se remplacent
【海浪建模2】三维海浪建模以及海浪发电机建模matlab仿真
Open3d uses GICP to register point clouds
Multilingual Wikipedia website source code development part II
【C】(笔试题)指针与数组,指针
“薪資倒掛”、“畢業生平替” 這些現象說明測試行業已經...
Hisilicon 3559 universal platform construction: YUV422 pit stepping record
Huawei employs data management experts with an annual salary of 2million! The 100 billion market behind it deserves attention
Daily question brushing record (13)
小程序直播 + 电商,想做新零售电商就用它吧!
26.2 billion! These universities in Guangdong Province have received heavy support
6. Scala operator
Daily practice (18): stack containing min function
SAP UI5 应用的主-从-从(Master-Detail-Detail)布局模式的实现步骤