当前位置:网站首页>[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:
cdis the command for UNIX/Linux systems;roscdis a command of the ROS system and is part of therosbashcommand set;roscdcan only switch to those paths already included in>ROS_PACKAGE_PATHpackage 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_tutorialsBy 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 ~/.bashrc4. References
[1] ROS.org. ROS Tutorial [EB/OL]. [2022-6-29]. http://wiki.ros.org/en/ROS/Tutorials
边栏推荐
猜你喜欢
随机推荐
LayoutParams的详解
第十一单元 序列化器
瑞吉外卖笔记——第08讲读写分离
微信小程序-最近动态滚动实现
chapter7
数据机构---第六章图---图的遍历---选择题
Geoffery Hinton:深度学习的下一个大事件
Break the limit of file locks and use storage power to help enterprises grow new momentum
网络安全第三次作业
vim复制粘贴_vim如何复制粘贴
无序数组排序并得到最大间隔
MySQL数据库语法格式
The world's largest Apache open source foundation is how it works?
Flask框架深入二
Chapter6 visualization (don't want to see the version)
Sentinel源码(四)(滑动窗口流量统计)
EasyExcel 的使用
机器学习——交叉验证法
uview 2.x版本 tabbar在uniapp小程序里头点击两次才能选中图标
MobileNet ShuffleNet & yolov5 replace backbone





ROS通信 —— 节点,Nodes & Master](/img/f5/c541259b69a0db3dc15a61e87f0415.png)


ROS通信 —— 话题(Topic)通信](/img/21/d79f2c4e246eb9ea39df9c7435bb36.png)
