ROS-3: Catkin working space and Ros Function pack

Source: Internet
Author: User

First, create a catkin work space Step One: Build a Catkin workspaceafter installing the ROS version, set the environment variable: $ source/opt/ros/kinetic/setup.bash. You can then create a Catkin workspace.
mkdir -P~/catkin_ws/~/catkin_ws/~/catkin_ws/$ catkin_make
that is, the steps to create a Catkin workspace on the terminal command line are:
    1. Create the folder where the Catkin workspace is located, as on the/CATKIN_WS;
    2. In the workspace folder that you created, create a subfolder/src;
    3. Under sub-folder SRC, initialize a new Catkin workspace;
    4. Returns the root directory of the Catkin workspace, which is under CATKIN_WS;
    5. Use the Catkin_make command to complete the construction of the Catkin workspace.
The first time you run the Catkin_make command, a CMakeLists.txt file is created under the SRC folder, and two sub-folders build and Devel are created under the root directory, such as. Step Two: Configure environment variablesNext, you need to configure the Global environment variable and the installation path for the Catkin workspace to run on the terminal command line:
$ source ~/catkin_ws/devel/setup.bash
each time you reopen a new terminal shell, you need to run the above command. To do this you must add the command script to the ~/.BASHRC file so that each time you open SHELL,.BASHRC it will run automatically, using the following command:
Echo " Source ~/catkin_ws/devel/setup.bash " >>  ~/~/.BASHRC
at this point, complete the creation of the Catkin workspace, with the following brief steps:
    1. Create a Catkin workspace directory, such as/CATKIN_WS/SRC;
    2. In the SRC directory, use Catkin_init_workspace to initialize a Catkin workspace;
    3. Under the Catkin workspace root directory, use Catkin_make to build;
    4. Configure environment variables to start the current Catkin workspace.
  Second, create a Ros function pack Step One: Create a Ros Feature PackThe Ros Feature Pack must be located in the Catkin workspace, so you must create a good one Catkin workspace before you can create the Ros Feature Pack. Under the SRC directory of the Catkin workspace directory, use the CATKIN_CREATE_PKG command to create a Ros Feature Pack. The syntax for catkin_create_pkg is as follows:
$ catkin_create_pkg <package_name> [DEPEND1] [Depend2] [Depend3]
where [Depend1], [Depend2], [Depend3] is the specific software Feature pack that is required to create the Software Feature Pack, which is generally referred to as a dependency package. Step Two: Build the Ros function packthen build the empty Software Feature Pack to use the Catkin_make command in the root directory of the Catkin workspace. To complete the creation of the Ros Feature Pack, proceed as follows:
    1. Use the catkin_create_pkg command to create a feature pack in the SRC directory of the Catkin workspace;
    2. Use the Catkin_make command to complete the build in the root directory of the Catkin workspace.

ROS-3: Catkin workspace and ROS Feature Pack

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.