- Preparations
need to use the following command to install the tutorial ros:
$ sudo apt-get install ros-<distro>-ros-tutorials
Which, distro is the release ros with the tutorial uses kinetic.
$ sudo apt-get install ros-kinetic-ros-tutorials
- ROS File System Overview
- Packages: ROS file system consists of a number of Package, each package may contain libraries (Libraries), executable programs, scripts or other artificial materials written.
- The Manifests ( the package.xml ) : package description files.
- Documentation System Tools command
- rospack
rospack to obtain package (Package) related information, only gives rospack find use in the tutorial, the command returns a packet path
usage:
$ rospack find [package_name]
E.g:
$ rospack find roscpp
Returns:
YOUR_INSTALL_PATH/share/roscpp
He returned on the machine as follows:
/opt/ros/kinetic/share/roscpp
- roscd
roscd is rosbash part of the change to the directory, or enter a directory, similar to the cd command.
E.g:
$ roscd roscpp
It represents the current directory becomes roscpp directory.
Use the pwd command to display the current directory, then:
/opt/ros/kinetic/share/roscpp
Note, ros tool command can only be identified in the environment variable ROS_PACKAGE_PATH package listed, you can extra packages by changing the environment variables will be added to ROS_PACKAGE_PATH path.
You can use the following command to see which path in this environment variable contains:
$ echo $ROS_PACKAGE_PATH
In this machine returns the following:
/home/yangbo/mybot_ws/src:/home/yangbo/project_ws/src:/home/yangbo/catkin_ws/src:/home/yangbo/hector_quadrotor_tutorial/src:/opt/ros/kinetic/share:/home/yangbo/px4/Firmware:/home/yangbo/px4/Firmware/Tools/sitl_gazebo
Each separated by a colon.
- roscd log
this command to enter ros log files directory, if there is no log file directory, an error message will be given. - rosls
rosls also rosbash part that lists all files and directories in a package.
For example, use the following command to view all files and directories in roscpp_tutorials:
$ rosls roscpp_tutorials
Returns:
cmake launch package.xml srv
-
TAB automatically
ros command line utility supports the TAB done automatically, for example, you can not remember the full name of each package, but know that at the beginning, you can use TAB completion.$ roscd roscpp_tut<<< now push the TAB key >>>
Roscd roscpp_tut example, the input and press the TAB key, the beginning of the package is done automatically roscpp_tut.
roscd roscpp_tutorials/
If you have the same name and the beginning of the multiple packages is done automatically and the beginning of the closest one, then click the TAB and all options will be listed at the beginning of the match, for example:
roscd tour
Press the TAB is auto-complete are:
roscd turtle
Then click the TAB to list all packages beginning tur:
turtle_actionlib/ turtlebot_navigation/ turtlesim/ turtlebot_bringup/ turtlebot_simulator/ turtle_tf/ turtlebot_capabilities/ turtlebot_stage/ turtle_tf2/ turtlebot_description/ turtlebot_stdr/ turtlebot_gazebo/ turtlebot_teleop/
- rospack
File ROS basic courses of study notes 3- System Wizard
Guess you like
Origin www.cnblogs.com/spyplus/p/11447655.html
Recommended
Ranking