Ros Series _ Learn A

Source: Internet
Author: User

Just getting started with Ros, no, not getting started, still at the door, which is today's summary:

(i) Create a workspace

1. Create an initial working space:

Mkdir-p ~/CATKIN_WS/SRC

CD ~/CATKIN_WS/SRC

Catkin_init_workspace

2. Try to compile new space

CD ~/catkin_ws/

Catkin_make

3. Before use

SOURCE Devel/setup.bash

(Ensure source to, can be viewed with echo $ROS _package_path, whether there is a path just source)

(ii) System directives for Ros:

1. Find the package path of the system path

Rospack Find + package name

2. Enter the Package folder

Roscd

3. View the running log

ROSCD Log

4. Using Rosls

Rosls

5. Use the TAB key to complete

      

(iii) Creation of the ROS package

1. Create a Catkin Package

CD ~/CATKIN_WS/SRC

Catkin_creat_pkg + package name + multiple dependencies

2. Build and Source settings

CD ~/CATKIN_WS

Catkin_make

SOURCE ~/catkin_ws/devel/setup.bash

3. View the first layer of the package dependencies

Rospack Depend1 + package Name

(also can be seen from the package.xml file)

4. Check the recursive dependency of the package

Rospack depends + package name

(iv) Customizing your package

1. Custom Package.xml

A, Description column

B, Maintainer Bar

C, certificate Bar

D, Dependency Bar

2. Customize your CMakeLists.txt

And the other CMakeLists.txt are the same, self-search reference

(v) Compiling your ROS package

First of all, Source/opt/ros/..../setup.bash (... Is your version path)

1. Using Catkin_make

Execute under the Catkin_make work space path:

Catkin_make + target +[-dcmake_vcariables= ...]

Catkin_make Install (optionally)

(Compared to Camke compilation: CMake can compile only one project at a time, and Catkin_make can compile multiple package at a time)

(If SRC is elsewhere:

Catkin_make--source MY_SRC

Catkin_make Install--source my_src (optionally)

Today, the study of their own summary of the temporary here, in fact, are reference to the official tutorial: http://wiki.ros.org/ROS/Tutorials

Ros Series _ Learn A

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.