0
$\begingroup$

Rosanswers logo

I am using ROS melodic directly on my PC ( no dockers )

At start up, when i open a new shell to start Roscore i have a gohst roscore arready running

i have an error telling me that roscore is already running??

If i type: rostopic list, i have a long list of topics displayed even if nothing was launched ???

I have tried many things to solve the problem:

  • I have rebooted the pc a few times ( it does not change any things )

  • I have tried to kill the roscore node but the program process is not apearing in the list of the system monitor?

Finnaly i have been able to find the process with ps aux | grep roscore

ros       1922  0.6  0.3 327480 56288 ?        Ssl  21:32   0:00 /usr/bin/python /opt/ros/melodic/bin/roscore
francois  3990  0.0  0.0  14732  1052 pts/0    S+   21:33   0:00 grep --color=auto roscore

I had to use sudo kill 1922 because i was not the owner of the process.

Unfortunately every time i reboot the gohst roscore is back

At first, i tough that it was related to the last activities made in the PC.

I had purged then resinsalled the ros flexbe package

sudo apt-get update
sudo apt-get upgrade
....
sudo apt install ros-$ROS_DISTRO-flexbe-behavior-engine

It seems that the problem is not related to the upgrade and install done in the previous step.

  • I have not been using ros locally since 1 week or 2
  • I have used timeshift to restore a version 2 day old version and the problem remains ???

Originally posted by frge on ROS Answers with karma: 51 on 2020-04-20

Post score: 0


Original comments

Comment by gvdhoorn on 2020-04-21:
It would perhaps be good to add more information here.

After an ubuntu udate and upgrade to install a new package

"an update" and "a new package" is too vague. Please try to be specific.

At start up, when i open a new shell to start Roscore i have an error telling me that roscore is already running?

roscore does not start itself, so something must be starting it. Does this roscore instance persist across reboots? If it does: do you happen to be using Docker? No persistent/auto-restarting containers?

Comment by frge on 2020-04-21:
I Have added info in the original description of the problem

Comment by gvdhoorn on 2020-04-21:
Could you show the output of env | grep -i ros | sort? We need to make sure it's actually a local roscore.

Can you kill the running roscore? Does it stay shutdown, or immediately startup again?

Have you used something like robot_upstart?

Comment by frge on 2020-04-21:
Here is the result of the questions Part 1 Can you kill the running roscore? Does it stay shutdown, or immediately startup again?

  Not able to kill it ( like a phantom roscore)
        1) Not listed in System monitor

        2) in a shell
            kill roscore
            bash: kill: roscore: arguments must be process or job IDs

Have you used something like robot_upstart? No, and this package is not installed roscd robot_upstart roscd: No such package/stack 'robot_upstart'

Comment by frge on 2020-04-21:
Part 2a env | grep -i ros | sort CMAKE_PREFIX_PATH=/home/francois/catkin_ws/devel:/opt/ros/melodic EUSDIR=/opt/ros/melodic/share/euslisp/jskeus/eus/ LD_LIBRARY_PATH=/opt/ros/melodic/share/euslisp/jskeus/eus//Linux64/lib:/home/francois/catkin_ws/devel/lib:/opt/ros/melodic/lib:/usr/local.1/cuda-10/lib64:/opt/ros/melodic/share/euslisp/jskeus/eus//Linux64/lib PATH=/opt/ros/melodic/share/euslisp/jskeus/eus//Linux64/bin:/opt/ros/melodic/bin:/usr/local/cuda-10.1/bin:/opt/ros/melodic/share/euslisp/jskeus/eus//Linux64/bin:/home/francois/bin:/home/francois/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin PKG_CONFIG_PATH=/home/francois/catkin_ws/devel/lib/pkgconfig:/opt/ros/melodic/lib/pkgconfig:/usr/lib/x86_64-linux-gnu/pkgconfig

Comment by frge on 2020-04-21:
Part 2 b PYTHONPATH=/home/francois/catkin_ws/devel/lib/python2.7/dist-packages:/opt/ros/melodic/lib/python2.7/dist-packages:/opt/ros/kinetic/lib/python2.7/dist-packages/cv2.so ROS_DISTRO=melodic ROS_ETC_DIR=/opt/ros/melodic/etc/ros ROS_HOSTNAME=192.168.2.18 ROSLISP_PACKAGE_DIRECTORIES=/home/francois/catkin_ws/devel/share/common-lisp ROS_MASTER_URI=http://localhost:11311 ROS_PACKAGE_PATH=/home/francois/catkin_ws/src:/opt/ros/melodic/share ROS_PYTHON_VERSION=2 ROS_ROOT=/opt/ros/melodic/share/ros ROS_VERSION=1

Comment by gvdhoorn on 2020-04-21:
Please add this sort of info to your original post. Use the edit button/link for that. Comments are unsuited.

Comment by frge on 2020-04-21:
The problem description has been edited

Comment by gvdhoorn on 2020-04-22:
Where is the env output in your question text? I cannot find it.

Comment by gvdhoorn on 2020-04-22:
Something is starting that roscore. Seeing as you write this:

I had to use sudo kill 1922 because i was not the owner of the process.

it sounds like a system service is starting it.

I would recommend to take a look at the contents of /etc/init.d or any of the other directories and configuration files which are involved in auto-starting processes on Ubuntu Xenial.

roscore does not auto-start. It will have to be some form of automation starting a .launch file or similar.

Comment by gvdhoorn on 2020-04-22:
And probably unrelated, but:

PYTHONPATH=/home/francois/catkin_ws/devel/lib/python2.7/dist-packages:/opt/ros/melodic/lib/python2.7/dist-packages:/opt/ros/kinetic/lib/python2.7/dist-packages/cv2.so

this does not make sense to me: note how this contains both kinetic and melodic paths. That cannot be right.

Additionally:

ROS_HOSTNAME=192.168.2.18

do not set ROS_HOSTNAME to an IP. Use ROS_IP for that. Or configure ROS_HOSTNAME with a hostname.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

I have solved the problem.

This problem seem to have generated by the installation of binary package of the fecth robot a few days ago.

I have removed the roscore.service related files ans directory in /etc/systemd/system/multi-user.target.wants/roscore.service /home/francois/roscore.service.wants


Originally posted by frge with karma: 51 on 2020-04-22

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.