当前位置:网站首页>[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
边栏推荐
- 配置zabbix自动发现和自动注册。
- RKMPP API安装使用总结
- 世界上最大的开源基金会 Apache 是如何运作的?
- Tornado框架路由系统介绍及(IOloop.current().start())启动源码分析
- 如何解决1045无法登录mysql服务器
- 未来的金融服务永远不会停歇,牛市仍将继续 2021-05-28
- 微信小程序-最近动态滚动实现
- 你接受不了60%的暴跌,就没有资格获得6000%的涨幅 2021-05-27
- Audio processing: floating point data stream to PCM file
- uview 2.x版本 tabbar在uniapp小程序里头点击两次才能选中图标
猜你喜欢
The most complete ever!A collection of 47 common terms of "digital transformation", read it in seconds~
8580 合并链表
如何选择正规的期货交易平台开户?
Sentinel源码(三)slot解析
此次519暴跌的几点感触 2021-05-21
瑞吉外卖笔记——第08讲读写分离
跑跑yolov5吧
The world's largest Apache open source foundation is how it works?
redis延时队列
Chapter6 visualization (don't want to see the version)
随机推荐
The bad policy has no long-term impact on the market, and the bull market will continue 2021-05-19
动手学ocr(一)
RKMPP API安装使用总结
海明校验码纠错设计原理
第六单元 初识ORM
You can't accept 60% slump, there is no eligible for gain of 6000% in 2021-05-27
EasyExcel 的使用
Geoffery Hinton:深度学习的下一个大事件
专访|带着问题去学习,Apache DolphinScheduler 王福政
跑yolov5又出啥问题了(1)p,r,map全部为0
VMM是什么?_兮是什么意思
Sentinel源码(四)(滑动窗口流量统计)
rhce第三天作业
不精确微分/不完全微分(Inexact differential/Imperfect differential)
微信小程序-最近动态滚动实现
Go语言初始
xshell连接虚拟机步骤_建立主机与vm虚拟机的网络连接
瑞吉外卖笔记——第05讲Redis入门
paddleocr window10初体验
史上最全!47个“数字化转型”常见术语合集,看完秒懂~