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

roslaunch could not find package

asked 2021-09-21 01:30:36 -0500

akash12124234 gravatar image

recently I installed ros2 foxy on my ubuntu 20 system where I already have ros1 noetic. usually within the workspace whenever we type roslaunch on terminal we get the packages inside the workspace right. but now whenever I type roslaunch in my workspace I get the following.

akash-j@linuxadmin-ThinkPad-L490:~/ur5_ws$ roslaunch 
build/             .catkin_workspace  devel/             src/
akash-j@linuxadmin-ThinkPad-L490:~/ur5_ws$ roslaunch

instead of getting the packages, I am getting the above, and every time I need to give the full path to launch the file.

in addition to it when I try to sudo apt update I get the following message.

W: Target Translations (main/i18n/Translation-en) is configured multiple times in /etc/apt/sources.list.d/ros2-latest.list:1 and /etc/apt/sources.list.d/ros2.list:1
W: Target Translations (main/i18n/Translation-en_IN) is configured multiple times in /etc/apt/sources.list.d/ros2-latest.list:1 and /etc/apt/sources.list.d/ros2.list:1

i dont know whats wrong here

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2021-09-21 03:36:29 -0500

Ranjit Kathiriya gravatar image

updated 2021-09-21 03:39:47 -0500

Hello @akash12124234,

  1. Can you please check which ros version is currently active you can do so by executing this command in the terminal. echo $ROS_DISTRO or rosversion -d
  2. You need to check which ros environment is selected: If you are using ROS Noetic then you can source notice by executing source /opt/ros/noetic/setup.bash or For foxy you need to source source /opt/ros/foxy/setup.bash these things should be done every time once you open a new terminal.
  3. Then you have to check about your project workspace and inside packages, whether it is of a specific version. You also need to source workspace and then I think you will be able to run.

Note: You should also check your .bashrc file if your terminal is sourcing by default environment. If it is doing, you can follow steps 1 and 2 for a specific version source.

I think you can get some help from this answer; please feel free to comment if you have any issues.

edit flag offensive delete link more

Comments

I tried all the steps mentioned above before . nothing helped . usually, when we type roslaunch and enter tab we get all the possibilities right. I am getting something different.

akash-j@linuxadmin-ThinkPad-L490:~/simple$ roslaunch build/ .catkin_workspace devel/ src/

if you want to see any of my files I can show you

akash12124234 gravatar image akash12124234  ( 2021-09-21 03:57:01 -0500 )edit

Once, try to write and check your launch file is executing. If yes, then it may be the problem of auto-complete.

Ranjit Kathiriya gravatar image Ranjit Kathiriya  ( 2021-09-21 05:04:55 -0500 )edit

You can create a new answer and tick your answer. Provide an appropriate description.

Ranjit Kathiriya gravatar image Ranjit Kathiriya  ( 2021-09-22 03:56:59 -0500 )edit
1

answered 2021-09-22 03:47:52 -0500

akash12124234 gravatar image

I uninstalled ros1,2. and reinstalled them now its working fine

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2021-09-21 01:30:36 -0500

Seen: 673 times

Last updated: Sep 21 '21