当前位置:网站首页>Yes, use local_ setup. Bash or setup bash
Yes, use local_ setup. Bash or setup bash
2022-06-28 23:21:00 【First flight loves playing with robots】
Finished compiling ros2 After procedure , We will find that install There are two scripts in the directory local_setup.bash and setup.bash. Before executing the program , Usually source once install Scripts in directory , So that the environment variables are ready . such ros2 run and ros2 launch You can find the corresponding execution file and dependency .
The following is from setup.bash A segment taken from . It can be found that it will source once /opt/ros/galactic Catalog re source once /home/ubuntu/turtlebot3_ws/install Catalog , Finally, source Click the current directory . This will include multiple external workspaces . If there are function packages with the same name in multiple workspaces, they may conflict with each other .
# source chained prefixes
# setting COLCON_CURRENT_PREFIX avoids determining the prefix in the sourced script
COLCON_CURRENT_PREFIX="/opt/ros/galactic"
_colcon_prefix_chain_bash_source_script "$COLCON_CURRENT_PREFIX/local_setup.bash"
# setting COLCON_CURRENT_PREFIX avoids determining the prefix in the sourced script
COLCON_CURRENT_PREFIX="/home/ubuntu/turtlebot3_ws/install"
_colcon_prefix_chain_bash_source_script "$COLCON_CURRENT_PREFIX/local_setup.bash"
# source this prefix
# setting COLCON_CURRENT_PREFIX avoids determining the prefix in the sourced script
COLCON_CURRENT_PREFIX="$(builtin cd "`dirname "${
BASH_SOURCE[0]}"`" > /dev/null && pwd)"
_colcon_prefix_chain_bash_source_script "$COLCON_CURRENT_PREFIX/local_setup.bash"
unset COLCON_CURRENT_PREFIX
unset _colcon_prefix_chain_bash_source_script
and local_setup.bash It's just source Script directory . This will only find the current install The executable files and dependencies in the directory .
So if there are multiple in the system ROS working space , A more cautious approach is :
1、 First source once /opt/ros/galactic/local_setup.bash
2、 stay source Let's look at a user's workspace .
If there is only a self built user workspace in the system . Then directly source In the user workspace install In the catalog setup.bash. It's all done .
It will help you first source once /opt/ros/galactic/local_setup.bash, In this way, there will be systematic installation ros Execute programs and dependencies . And then help you source Of this user space install/local_setup.bash.
Reference resources :
https://colcon.readthedocs.io/en/released/developer/environment.html#workspace-level
If you think it's useful, just praise it !
It's me , One to help everyone Filling pit Robot development siege lion .
In addition, the official account. 《 First flight 》 Internal reply “ robot ” Get carefully recommended C/C++,Python,Docker,Qt,ROS1/2 And other commonly used technical data in the robot industry .
边栏推荐
- Oil monkey script learning
- [数学建模]Matlab非线性规划之fmincon()函数
- MATLAB 学习笔记(6)MATLAB 的 upsample 函数和 downsample 函数
- 老家出资,俞敏洪设立两支基金
- Finally, someone explained the cloud native architecture
- Langage C - analyse des mots
- 没找到实习,他总结了这些
- [stm32 HAL库] RTC和BKP驱动
- 见丰知夏|国漫鼻祖丰子恺,数字藏品独家发售
- 2022-06-28: what does the following golang code output? A:true; B:false; C:panic; D: Compilation failed. package main import “fm
猜你喜欢
![Leetcode 324 swing sort ii[sort double pointer] the leetcode path of heroding](/img/41/b8ba8d771b7224eac1cc8c54fe9d29.png)
Leetcode 324 swing sort ii[sort double pointer] the leetcode path of heroding

在线SQL转HTMLTable工具

全面掌握const的用法《一》

ERROR 1067 (42000): Invalid default value for ‘end_time‘ Mysql

VSCode里使用条件断点(基于GDB)

Machine learning 6-decision tree

【状态机设计】Moore、Mealy状态机、三段式、二段式、一段式状态机书写规范
![[state machine design] Moore, Mealy state machine, three-stage, two-stage and one-stage state machine writing specification](/img/48/e29f34aff7cc437bfb574591d54e3d.png)
[state machine design] Moore, Mealy state machine, three-stage, two-stage and one-stage state machine writing specification

Wechat red envelope cover making tutorial and use guide with link jump

2022 PMP project management examination agile knowledge points (4)
随机推荐
小样本利器2.文本对抗+半监督 FGSM & VAT & FGM代码实现
【OpenCV】—线性滤波:方框滤波、均值滤波、高斯滤波
运维排查-使用hcache插件排查Buffer/cache占用过高
Prometeus 2.36.0 新特性
Web API learning notes 1
[stm32 HAL库] 串口通信
ERROR 1067 (42000): Invalid default value for ‘end_time‘ Mysql
非科班!自学之路!
云计算的迷路者
Online text filter less than specified length tool
Differences among CPU, GPU, TPU and NPU
全面掌握const的用法《一》
C interview questions_ 20220627 record
Finally, someone explained the cloud native architecture
油猴脚本学习
再次上榜!知道创宇入选2022中国网安产业竞争力50强
TDD案例实战
Interpretation of papers (DCN) towards k-means-friendly spaces: simultaneous deep learning and clustering
Flutter obtains the coordinate size of any element in the interface through globalkey
[数学建模]Matlab非线性规划之fmincon()函数