ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
2

bash: setup.bash: No such file or directory

asked 2015-12-31 03:16:51 -0500

ptreyesguy gravatar image

updated 2016-01-03 05:28:19 -0500

gvdhoorn gravatar image

Following the instructions in Chap 3 of Learning Robotics Using Python (Ubuntu 14.04), I added the ROS workspace path.

echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc
source ~/.bashrc

When starting a new terminal I get the message in the question line. Is anything wrong? Chet

edit retag flag offensive close merge delete

Comments

Have you run catkin make in the workspace yet ? Does the file setup.bash exist in your workspace, and is that the correct path to it ?

nickw gravatar image nickw  ( 2015-12-31 04:01:50 -0500 )edit

nickw: 1. I ran catkin make 2. setup.bash is in /opt/ros/indigo but I don't know how to determine whether it is in my workspace

ptreyesguy gravatar image ptreyesguy  ( 2015-12-31 22:50:09 -0500 )edit

the line added to the .bashrc file is trying to read a file ~/catkin_ws/devel/setup.bash

Error is the file is not there. you don't have a workspace set up, different name than catkin_ws, or location. More on setting up http://wiki.ros.org/ROS/Tutorials/Ins...

nickw gravatar image nickw  ( 2016-01-01 04:14:55 -0500 )edit

1 Answer

Sort by » oldest newest most voted
6

answered 2016-01-02 16:11:29 -0500

dchang0 gravatar image

updated 2016-01-03 05:27:20 -0500

gvdhoorn gravatar image

The others are right--you didn't run catkin_make yet. Make sure you did all these steps:

cd ~/catkin_ws/src
catkin_init_workspace
cd ~/catkin_ws
catkin_make
echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc
source ~/.bashrc

I put semicolons as line terminators because the newlines aren't showing in my answer. Just a bit of extra safety, that's all.

edit flag offensive delete link more

Comments

I put semicolons as line terminators because the newlines aren't showing in my answer.

That's because you didn't format it as Preformatted text. Use the button with 101010 on it next time.

gvdhoorn gravatar image gvdhoorn  ( 2016-01-03 05:27:55 -0500 )edit

Cool! I didn't understand what that button was at first glance--thanks for the tip!

dchang0 gravatar image dchang0  ( 2016-01-03 05:45:04 -0500 )edit

Thank you all. Now I can open a new terminal without nasty messages. Chet

ptreyesguy gravatar image ptreyesguy  ( 2016-01-03 14:18:40 -0500 )edit

If this answer solved your issue, please mark it as "Correct" (Just click the ✓ icon). Thank you for keeping the forum clean and well organised!

Martin Peris gravatar image Martin Peris  ( 2016-01-05 20:55:43 -0500 )edit

I was working on a project. I installed husky_ws but then I deleted it. When I open a new terminal, it says " bash: /home/lenovo/husky_ws/devel/setup.bash: No such file or directory ". I can't revert to catkin_ws. I did what you said, but nothing has changed. What should I do?

Pytron gravatar image Pytron  ( 2022-06-25 22:20:51 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2015-12-31 03:16:51 -0500

Seen: 30,305 times

Last updated: Jan 03 '16