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

not found: local_setup.bash

asked 2022-10-24 09:32:29 -0600

LucB gravatar image

I created a test workspace. Now i deleted that, because i dont need it anymore.

I had the workspace automatically sourced in my ~/.bashrc: /home/luca/workspace/test_ws/install/setup.bash. Now i deleted that again from my ~/.bashrc.

Still when i open a terminal i get this message

not found: "/home/luca/workspace/test_ws/install/local_setup.bash"
not found: "/home/luca/workspace/test_ws/install/local_setup.bash"

How can i solve this?

edit retag flag offensive close merge delete

Comments

Maybe you also wrote it in your /etc/bash.bashrc file.

nils_iseke gravatar image nils_iseke  ( 2022-10-25 03:57:56 -0600 )edit

i checked etc/bash.bashrc file and der is no source in there.

LucB gravatar image LucB  ( 2022-10-25 04:15:12 -0600 )edit
1

Hm, ok you could execute cd ~ && cat .bashrc | grep source and cd /etc && cat bash.bashrc | grep source to see which ROS related files are sourced. I am assuming that you are using the bash shell echo $SHELL?

nils_iseke gravatar image nils_iseke  ( 2022-10-25 04:47:17 -0600 )edit

cd ~ && cat .bashrc | grep source

# sources /etc/bash.bashrc).
source /opt/ros/humble/setup.bash
source /usr/share/colcon_argcomplete/hook/colcon-argcomplete.bash
source ~/workspace/ros_ur_driver/install/setup.bash
source ~/ws_moveit2/install/setup.bash
source ~/workspace/ros_tutorial/install/setup.bash
source ~/workspace/ur_control/install/setup.bash

cd /etc && cat bash.bashrc | grep source

# this file has to be sourced in /etc/profile.

echo $SHELL

/bin/bash
LucB gravatar image LucB  ( 2022-10-25 06:31:11 -0600 )edit
1

I would just comment out all the sourcing lines, to see if they are part of the problem.

nils_iseke gravatar image nils_iseke  ( 2022-10-26 03:38:30 -0600 )edit

Right now there is three times the not found. I commented out the last three sources

#source ~/ws_moveit2/install/setup.bash
#source ~/workspace/ros_tutorial/install/setup.bash
#source ~/workspace/ur_control/install/setup.bash

then the not found disappears. For each source one disappears.

Is there a way the source them without executing the "/home/luca/workspace/test_ws/install/local_setup.bash"?

LucB gravatar image LucB  ( 2022-10-29 06:41:33 -0600 )edit

4 Answers

Sort by ยป oldest newest most voted
0

answered 2022-11-08 13:40:21 -0600

LucB gravatar image

I deleted the folders log, install and build in the Workspaces which caused the not found.
Then i build the packages again and the not found was gone.

edit flag offensive delete link more
0

answered 2023-08-03 08:30:21 -0600

sniegs gravatar image

I've found that the reason for this is that, once you source a directory in .bashrc, when colcon build-ing a directory, it also saves the sourced package paths in its setup.bash, meaning that, when you move a sourced directory, you have to rebuild all the other packages to not get this message. So, as @LucB already said, deleting the log, install, build and rebuilding is the solution. In my case, I was moving multiple workspaces to a different folder so I was getting a bunch of these from each of the workspaces.

edit flag offensive delete link more
0

answered 2022-10-25 01:15:55 -0600

vanmalleghema gravatar image

Hello,

That's really weird ! Have you tried with a new terminal ? Also, I noticed that you added path to "setup.bash" in your bashrc while the not found it on "local_setup.bash".

KR,

Antoine

edit flag offensive delete link more

Comments

Yes, I tried it even in Terminal and Terminator. I also rebooted my PC already. I think the setup.bash is somehow executing the local_setup.bash.

For now i restored the folder so i don't get the error anymore, but this dosen't solve the problem.

LucB gravatar image LucB  ( 2022-10-25 02:19:52 -0600 )edit
0

answered 2023-05-31 21:28:18 -0600

njm gravatar image

I faced the same issue. But I noticed that some packages are not installed.

Summary: 162 packages finished [18min 44s]
  1 package failed: obstacle_stop_planner
  11 packages aborted: behavior_path_planner motion_velocity_smoother mpc_lateral_controller obstacle_avoidance_planner obstacle_cruise_planner pandar_description planning_validator sample_vehicle_description scenario_selector tier4_localization_launch tier4_perception_launch
  3 packages had stderr output: behavior_path_planner heaphook obstacle_stop_planner
  101 packages not processed

So I re ran the command to install the packages. colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release

It solved my problem.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2022-10-24 09:32:29 -0600

Seen: 8,660 times

Last updated: Aug 03 '23