当前位置:网站首页>[ROS] The difference between roscd and cd
[ROS] The difference between roscd and cd
2022-08-02 14:18:00 【CynalFly】
Linux: Ubuntu 18.04 (Bionic)
ROS: ROS Melodic Morenia
1. The difference between roscd and cd
cd
, change directory, change directory.Both roscd
and cd
commands are used to switch to the specified directory.The differences between them are:
cd
is the command for UNIX/Linux systems;roscd
is a command of the ROS system and is part of therosbash
command set;roscd
can only switch to those paths already included in>ROS_PACKAGE_PATH
package in the environment variable.
2. Example
assumes you have created a catkin workspace
and a catkin package named beginner_tutorials
.
cd ~/catkin_ws/src/beginner_tutorials/
roscd beginner_tutorials
By comparison, roscd is faster to enter commands than cd.
3. Notes
If roscd prompts something like roscd: No such package/stack 'beginner_tutorials'
, you need to create catkin workspaceThe following steps make the environment variables take effect:
cd ~/catkin_wssource devel/setup.bashroscd beginner_tutorials
But every time you compile catkin_make
, you must use source devel/setup.bash
to refresh the environment, otherwise the above problem will occur.How to solve this problem?It's actually very simple, just add the source ~/catkin_ws/devel/setup.bash
command to the .bashrc
script file, and let the system automatically refresh the workspace.
echo “source ~/catkin_ws/devel/setup.bash” >> ~/.bashrc
We can open the bashrc
file with the following command, the source ~/catkin_ws/devel/setup.bash
command is in the last line of the script.
gedit ~/.bashrc
4. References
[1] ROS.org. ROS Tutorial [EB/OL]. [2022-6-29]. http://wiki.ros.org/en/ROS/Tutorials
边栏推荐
- 第十四单元 视图集及路由
- shell脚本“画画”
- 专访|带着问题去学习,Apache DolphinScheduler 王福政
- Geoffery Hinton:深度学习的下一个大事件
- ping命令的使用及代码_通过命令查看ping路径
- 标量替换、栈上分配、同步消除
- Shell脚本完成pxe装机配置
- 第十单元 前后连调
- Break the limit of file locks and use storage power to help enterprises grow new momentum
- The bad policy has no long-term impact on the market, and the bull market will continue 2021-05-19
猜你喜欢
随机推荐
数据机构---第六章图---图的遍历---选择题
idea社区版下载安装教程_安装天然气管道的流程
Cloin 控制台乱码
[ROS](04)package.xml详解
第八单元 中间件
Flask框架深入一
Sentinel源码(三)slot解析
关于Google词向量模型(googlenews-vectors-negative300.bin)的导入问题
未来的金融服务永远不会停歇,牛市仍将继续 2021-05-28
drf路由组件Routers
[ROS]roscd和cd的区别
shell脚本“画画”
Flutter 实现光影变换的立体旋转效果
跑跑yolov5吧
如何选择正规的期货交易平台开户?
The bad policy has no long-term impact on the market, and the bull market will continue 2021-05-19
Supervision strikes again, what about the market outlook?2021-05-22
第十一单元 序列化器
第四单元 路由层
动态刷新日志级别