当前位置:网站首页>[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
边栏推荐
猜你喜欢

Object detection scene SSD-Mobilenetv1-FPN
ROS通信 —— 话题(Topic)通信](/img/21/d79f2c4e246eb9ea39df9c7435bb36.png)
[ROS](06)ROS通信 —— 话题(Topic)通信

The bad policy has no long-term impact on the market, and the bull market will continue 2021-05-19

window10下半自动标注

The most complete ever!A collection of 47 common terms of "digital transformation", read it in seconds~

网络剪枝(1)
创建&编译ROS软件包Package](/img/c2/5931d5cbade509c6ca34d66a274756.png)
[ROS](02)创建&编译ROS软件包Package

How to solve mysql service cannot start 1069

瑞吉外卖笔记——第10讲Swagger

Break the limit of file locks and use storage power to help enterprises grow new momentum
随机推荐
第七单元 ORM表关系及操作
瑞吉外卖笔记——第08讲读写分离
What are the file encryption software?Keep your files safe
如何选择正规的期货交易平台开户?
第十四单元 视图集及路由
【Tensorflow】AttributeError: '_TfDeviceCaptureOp' object has no attribute '_set_device_from_string'
网络安全第四次作业
Flutter 实现光影变换的立体旋转效果
MobileNet ShuffleNet & yolov5替换backbone
如何自定义feign方法级别的超时时间
xshell连接虚拟机步骤_建立主机与vm虚拟机的网络连接
[ROS](02)创建&编译ROS软件包Package
第五单元 保持状态
The bad policy has no long-term impact on the market, and the bull market will continue 2021-05-19
Interview | with questions to learn, Apache DolphinScheduler Wang Fuzheng
动手学ocr(一)
未来的金融服务永远不会停歇,牛市仍将继续 2021-05-28
网页设计(新手入门)[通俗易懂]
rpm包的卸载与安装[通俗易懂]
Flask框架深入二