当前位置:网站首页>Workspace for ROS
Workspace for ROS
2022-06-13 01:39:00 【lainegates】
List of articles
Reference resources
ROS official wiki— understand ROS node
ROS official wiki— understand ROS topic of conversation
ROS official wiki— understand ROS Service and parameters
In front of
ROS Logical view of
ROS Introduction to workspace
ROS Your workspace provides predefined management patterns . The schematic diagram of the workspace is as follows :
The figure includes two package, It is divided into orange and green , parallelogram Represents a code file , Square box Representative directory .
ROS The content of the workspace is divided into 4 class :
- src: Deal with the most folders , Save all the code , Each subfolder is a pakage, There will be more details later
- build: Intermediate compilation file , Unless something strange happens at compile time bug, I don't care
- devel: All generated exec/.py The catalog of , It's also ROS The system guides the directory of packages written by itself , There will be more details later
- install: When it can be published , The directory where the program is saved
src Catalog
src Each folder in the directory represents a package, Every pakage Multiple executables can be generated , Each executable is a ROS node .
Every package Contains the following :
include: Store the prepared header file , stay CMakeLists.txt Specify... When addinginclude/*.hsrc: Save the authored source file , stay CMakeLists.txt Specify... When addinginclude/*.cppsrv( Optional ): Service agreement documents*.srcWhere to save , coordination CMakeLists.txt Ofadd_service_files()Use ,Write the file name directly , Don't prefixmsg( Optional ): Service agreement documents*.msgWhere to save , coordination CMakeLists.txt Ofadd_message_files()Use ,Write the file name directly , Don't prefix
devel Catalog
This directory is usually not separate , but ROS To support c++/Python Two outputs , So put it in a separate folder , And the default is ROS System boot file . Specific include :
-setup.sh/.zsh/.bash: By different shell Called script ,source Right after ROS System The current workspace is guided in , It can be used later rosrun/roscd/… And so on package.
-local_setup.sh/.zsh/.bash: Used to call... In the current directory setup.sh
-__setup__util.py: Be similar to setup.sh, But for guiding python load
-env.sh: Environment settings for the current workspace , There is no need to manually call
-include:C++ Header Directory
-lib:c++ Compile the generated 、python Code and configuration file directory
[pkg*]:c++ The output directory of the executable , Press package Folder split[pkgconfig]:C++ External boot configuration for , Used when it is dependent on other libraries , Below is each package Provides*.pcThe configuration filepython3:python Output file directory , Provided belowsite-package, Available python External call
Create a workspace
Create directory manually
source /opt/ros/noetic/setup.sh # This item can be added to ~/.bashrc, You don't need to call every time
cd ~
mkdir catkin_ws
cd catkin_ws
mkdir src # Create a code directory under the workspace
establish package
After the following code is executed , Will press ROS Logical compilation code of workspace , But the directory is empty , Then it will be created directly build/devel/… Such as catalog , And add the corresponding configuration file
cd src
catkin_create_pkg test std_msgs # Create a package test, Dependent library is std_msgs
cd ~/catkin_ws/
catkin_make # Will compile normally , But no compiled code , Therefore, no executable program will be generated
# Must be in ROS The root directory of the workspace calls
catkin_cmake It's a compound command , Equivalent to
$ mkdir build
$ cd build
$ cmake ../src
$ make
Additional information
If you add or remove package, Be sure to carry out
$ catkin_make --force-cmake
If this command is invalid , Just delete build Catalog , Completely re execute .
follow-up
Reference resources
ROS Of Topic Create and run samples
ROS Service creation and running example of
Create the first program .
边栏推荐
- [projet cs144 de Stanford Computing Network] lab1: Stream reassembler
- [leetcode] valid phone number Bash
- Wildcard usage of go standard library FMT
- 工作与生活
- Page optimization - Notes
- MySQL performance optimization
- This of phaser3 add. sprite
- MySQL ---- where后使用字段别名
- About constructive code blocks, static code blocks, and constructor execution order
- Leetcode question brushing 03 stack
猜你喜欢

csdn涨薪技术之Jmeter接口测试数据库断言的实现与设计

matplotlib画图中文乱码

Create a simple game interface using pyGame

4K sea bottom and water surface fabrication method and ocean bump displacement texture Download

Lecture on Compilation Principles

RSA encryption colloquial explanation

Work and life

Idea installation tutorial
![[MathType] use MathType to output latex style formula](/img/46/ac2041fbc2eb90474e2e2d7d1b0a40.png)
[MathType] use MathType to output latex style formula

关于tkinter.Canvas 不显示图片的问题
随机推荐
Alexnet implements image classification of caltech101 dataset (pytorch Implementation)
Create a simple game interface using pyGame
leetcode743. 网络延迟时间(中等, dijkstra)
MySQL - use field alias after where
FSOs forest simulation optimization model learning notes
Quickly set the computer to turn off automatically
服务器安装jupyterlab以及远程登录配置
[MathType] use MathType to output latex style formula
ng-tv-focusable
谷歌的受众群体是如何发挥作用的?
Method of cleaning C disk
Introduction to convolutional neural network
How to print infinite symbol in WPS
[MySQL password management] - [administrator password known, unknown (forgotten), cracked]
Logical operation bit operation
Leetcode question brushing 03 stack
Design of distributed game server
The second round of mesa
csdn涨薪技术之Jmeter接口测试数据库断言的实现与设计
Leetcode question brushing 06 bit operation