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

Cannot locate ros

asked 2020-04-07 05:32:52 -0500

Addy gravatar image

updated 2022-01-22 16:10:28 -0500

Evgeny gravatar image

I installed ros melodic few weeks ago.. i got "<unversioned>" when I executed rosversion ros then.. now Im getting "Cannot locate ros" when I execute that. Also when i use these commands roslaunch and roscore,it asks me to install them and when i try installing, it replies me with you have held broken packages

addy21000@addy-PC:~$ rosversion ros

Cannot locate [ros]

addy21000@addy-PC:~$ dpkg -l | grep ros-melodic-roslaunch

addy21000@addy-PC:~$ dpkg -l | grep ros-melodic-roslaunch

output of dpkg -l | grep ros-melodic-roslaunch

no output,it just executed

output of ls -al /opt/ros/melodic

total 100
drwxr-xr-x  7 root root  4096 Mar 22 16:35 .
drwxr-xr-x  3 root root  4096 Mar 11 17:27 ..
drwxr-xr-x  2 root root  4096 Apr  4 18:05 bin
-rw-r--r--  1 root root     0 Mar  3 10:27 .catkin
-rwxr-xr-x  1 root root   506 Mar  3 10:27 env.sh
drwxr-xr-x  4 root root  4096 Mar 11 17:27 etc
drwxr-xr-x 48 root root  4096 Apr  6 18:47 include
drwxr-xr-x 22 root root 20480 Apr  4 18:05 lib
-rw-r--r--  1 root root   283 Mar  3 10:27 local_setup.bash
-rw-r--r--  1 root root   347 Mar  3 10:27 local_setup.sh
-rw-r--r--  1 root root   293 Mar  3 10:27 local_setup.zsh
-rw-r--r--  1 root root    56 Mar  3 10:27 .rosinstall
-rw-r--r--  1 root root   260 Mar  3 10:27 setup.bash
-rw-r--r--  1 root root  2774 Mar  3 10:27 setup.sh
-rwxr-xr-x  1 root root 13310 Mar  3 10:27 _setup_util.py
-rw-r--r--  1 root root   270 Mar  3 10:27 setup.zsh
drwxr-xr-x 92 root root 12288 Apr  6 18:48 share 

output of ls -al /opt/ros/melodic/bin

total 580
drwxr-xr-x 2 root root   4096 Apr  4 18:05 .
drwxr-xr-x 7 root root   4096 Mar 22 16:35 ..
-rwxr-xr-x 1 root root   2807 Mar  3 10:27 catkin_find
-rwxr-xr-x 1 root root   1086 Mar  3 10:27 catkin_init_workspace
-rwxr-xr-x 1 root root  15224 Mar  3 10:27 catkin_make
-rwxr-xr-x 1 root root   8239 Mar  3 10:27 catkin_make_isolated
-rwxr-xr-x 1 root root   1889 Mar  3 10:27 catkin_test_results
-rwxr-xr-x 1 root root   2416 Mar  3 10:27 catkin_topological_order
-rwxr-xr-x 1 root root   1663 Mar  3 10:32 rosboost-cfg
-rwxr-xr-x 1 root root   1664 Mar  3 10:32 rosclean
-rwxr-xr-x 1 root root   1760 Mar 20 15:41 rosgraph
-rwxr-xr-x 1 root root   2668 Mar  3 11:02 rosmake
-rwxr-xr-x 1 root root   1667 Mar 20 15:45 rosmaster
-rwxr-xr-x 1 root root   1659 Mar 20 15:48 rosparam
-rwxr-xr-x 1 root root    255 Mar 11 05:49 rqt
-rwxr-xr-x 1 root root  30904 Mar 20 16:54 run_selftest
-rwxr-xr-x 1 root root 149848 Mar 20 16:54 selftest_example
-rwxr-xr-x 1 root root 313536 Mar 20 16:54 selftest_rostest
-rwxr-xr-x 1 root root  10512 Mar  3 11:09 stage 

output of

grep remove /var/log/dpkg.log

2020-04-04 18:04:03 startup packages remove

2020-04-04 18:04:03 remove ros-melodic-desktop-full:amd64 1.4.1-0bionic.20200320.170844 <none>
2020-04-04 18:04:04 ...
(more)
edit retag flag offensive close merge delete

Comments

should i reinstall ros?

Addy gravatar image Addy  ( 2020-04-07 06:03:19 -0500 )edit

Have you remembered to source /opt/ros/melodic/setup.bash before trying to run those commands?

And:

Also when i use these commands roslaunch and roscore,it asks me to install them and when i try installing, it replies me with you have held broken packages

Yes. Do not install those packages, unless you are more experienced. See UpstreamPackages for more information.

gvdhoorn gravatar image gvdhoorn  ( 2020-04-07 06:13:06 -0500 )edit

yes i did this source /opt/ros/melodic/setup.bash

Addy gravatar image Addy  ( 2020-04-07 06:14:51 -0500 )edit

Then please show us the exact command sequence and output of those commands in a verbatim copy of the terminal in which you try to do this. Do not post or link to screenshots.

And please include the output of dpkg -l | grep ros-melodic-roslaunch as well.

Use the edit button/link to update your question.

gvdhoorn gravatar image gvdhoorn  ( 2020-04-07 06:22:31 -0500 )edit

no output.

Addy gravatar image Addy  ( 2020-04-07 06:24:56 -0500 )edit

And you did install ROS using apt before?

If so, it would seem somehow you've managed to uninstall it all / at least roslaunch.

What is the output of ls -al /opt/ros/melodic/bin? And perhaps also of ls -al /opt/ros/melodic itself?

it might also be informative to see what grep remove /var/log/dpkg.log returns.

gvdhoorn gravatar image gvdhoorn  ( 2020-04-07 06:57:21 -0500 )edit
1

bro @gvdhoorn..i think i did what you asked for.Please reply:)

I'm not your "bro", and this is not a chat platform.

It's a forum, and this is not my job.

Please refrain from calling people out by name like that.

gvdhoorn gravatar image gvdhoorn  ( 2020-04-07 06:59:47 -0500 )edit

yes i used apt to install ros

Addy gravatar image Addy  ( 2020-04-07 07:00:15 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-04-07 07:17:42 -0500

gvdhoorn gravatar image

According to what you've posted as output of grep remove /var/log/dpkg.log, you've uninstalled most of ROS on 2020-04-04 (ie: three days ago) around 6pm (your time).

Why, I cannot say.

So concluding:

should i reinstall ros?

yes, that would seem to be necessary.

You can try and see whether sudo apt update && sudo apt install ros-melodic-desktop-full works.

I suspect it won't, but let's see.

edit flag offensive delete link more

Comments

I guess its completed..do u want me to continue with installing dependencies like stated in ros wiki?

and also i got "<unversioned>" for rosverion ros

Addy gravatar image Addy  ( 2020-04-07 07:28:22 -0500 )edit

Did it actually install anything, or did it complete almost immediately?

What is the output of dpkg -l | grep ros-melodic-roslaunch now?

There is a good chance it hasn't actually installed anything.

also i got "<unversioned>" for rosverion ros

I'm not sure why you feel that is a problem. I get the exact same thing.

if you want to know which ROS version you have installed, you should use rosversion -d (where -d is short for --distro).

gvdhoorn gravatar image gvdhoorn  ( 2020-04-07 07:31:57 -0500 )edit

It took time like its installing for first time..

thats not a problem..im happy thats its installed now..

how do u want me to contine now

Addy gravatar image Addy  ( 2020-04-07 07:34:59 -0500 )edit

Looks like things are installed.

You could -- just to make sure -- check whether you still have the Python packages installed (which are not part of melodic_desktop_full) by following the rest of the installation instructions.

It does seem like you've "fixed" your install now.

Keep an eye out for any commands not working. It could be that not all packages have been reinstalled.

gvdhoorn gravatar image gvdhoorn  ( 2020-04-07 07:44:59 -0500 )edit

Thanks for the help.

i dont know how to check if those packages installed or not..will it be a problem if i install them anyway even when i have those packages

Addy gravatar image Addy  ( 2020-04-07 07:50:17 -0500 )edit

i dont know how to check if those packages installed or not

well, you'd run into the same problem with missing commands again.

will it be a problem if i install them anyway even when i have those packages

Probably not.

gvdhoorn gravatar image gvdhoorn  ( 2020-04-07 07:52:57 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2020-04-07 05:32:52 -0500

Seen: 580 times

Last updated: Apr 07 '20