当前位置:网站首页>Common debugging tools and commands for ROS

Common debugging tools and commands for ROS

2022-06-12 11:58:00 Sunward flowers bloom_

One .ROS Common command notes

1.rosrun Run the program
2.roslaunch Run script Such as roslaunch rbx1 fake_pi_robot.launch
3. see ROS_PACKAGE_PATH environment variable echo $ROS_PACKAGE_PATH
4. Get the list of running nodes rosnode list
5. Show the topic of the node rostopic list
6. Display the services of the node rosservice list
7. Get the type of message sent by a specific topic rosmsg show
8. Display node graph rqt_graph (rqt_graph Tools can see nodes and topics , And which nodes subscribe to which hosts
Questions, etc . There are no messages in this node state diagram 、 Message logging package 、 Parameter servers and services )

rqt_graph 

 Insert picture description here

9. Display the structure of the message Such as rosmsg show nav_msgs/Odometry View odometer message structure
10. View topic information Such as rostopic echo /odom/pose/pose View the location information of the odometer topic
11. start-up rqt_logger_level Graphic tool rosrun rqt_logger_level rqt_logger_level( Used for setting up log The display level of )
12. start-up rqt_console Graphic tool rqt_console( Used to display such as ROS_INFO Such debugging information )
13. start-up rqt_top Graphic tool rosrun rqt_top rqt_top
View the resource usage of each node
 Insert picture description here

14. start-up rqt_topic Graphic tool rosrun rqt_topic rqt_topic
see topic The type of , Current published values, etc
 Insert picture description here

15. Analyze the potential problems of the package ,roswtf
 Insert picture description here

16. Start the visual monitor rosrun rqt_runtime_monitor rqt_runtime_monitor
17. Start the graphic viewer rosrun rqt_image_view rqt_image_view
18. Dynamic parameter configuration

rosrun rqt_reconfig rqt_reconfig

22. start-up rqt_gui Graphic tool rosrun rqt_gui rqt_gui
Or enter a command rqt, You can view it as shown in the following figure
 Insert picture description here

23. Start the keyboard controller rosrun teleop_twist_keyboard teleop_twist_keyboard.py
24. Update environment variables source devel/setup.bash
25. Installation package : Such as ros-hydro- Package name
sudo apt-get install ros-hydro-teleop-twist-keyboard
26. Dependencies required to install the package
Such as rosdep install --from-paths src --ignore-src --rosdistro indigo
27.ubuntu Zhongyou apt-get The obtained package is saved /var/cache/apt/archives
28.rospy.loginfo When the information is displayed to the console, it is also written log file ,log The file location is

~/.ros/log

29.ros Node usage gdb debugging
If you use roslanch start-up ros node , Join in
launch-prefix="xterm -e gdb --args "
Such as

 <node name="vins_estimator" pkg="vins_estimator" type="vins_estimator" output="screen" launch-prefix="xterm -e gdb -ex run --args ">

Two .TF Commands for using function packs

1.view_frames Be able to monitor all passes at the current moment ROS Broadcast tf Coordinate system , And draw a tree view to show the connection relationship between coordinate systems and save it to an offline file

rosrun tf view_frames

 Insert picture description here
The saved figure is as follows :
 Insert picture description here
2.rqt_tf_tree Tools
although view_frames The current coordinate system relationship can be saved in an offline file , But it can not reflect the coordinate relationship in real time , So it can be used rqt_tf_tree Real time refresh to display coordinate system relations :

$rosrun rqt_tf_tree rqt_tf_tree

 Insert picture description here

3…tf_echo Tools
Use tf_echo The tool can view the relationship between two broadcast reference systems , Directly display the relationship between different coordinate systems in the terminal
Such as :

 rosrun tf tf_echo map base_link

 Insert picture description here

3、 ... and .bag The order of the bag

  1. . Start recording all rosbag record -a
  2. Play bag file rosbag play
  3. see bag file information rosbag info
  4. start-up rqt_bag Graphical Tools rqt_bag

Four . image_transport Package usage and instructions

http://blog.sina.com.cn/s/blog_602f87700102wtx0.html

原网站

版权声明
本文为[Sunward flowers bloom_]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/03/202203010522258686.html