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

roscore stuck at checking logs not starting server

asked 2023-01-26 08:49:59 -0600

shreshtha gravatar image

I am very new to the field of ROS and have been following ROS tutorials to set environment and when I always run roscore it gets stuck at: ... logging to /home/shreshtha/.ros/log/6c27bb5a-9d87-11ed-ac12-9840bb3645e5/roslaunch-shreshtha-Vostro-4729.log Checking log directory for disk usage. This may take a while. Press Ctrl-C to interrupt

and whenever I pess CTRL+C:

I get: Traceback (most recent call last): File "/opt/ros/melodic/bin/roscore", line 84, in <module> roslaunch.main(['roscore', '--core'] + sys.argv[1:]) File "/opt/ros/melodic/lib/python2.7/dist-packages/roslaunch/__init__.py", line 347, in main p.start() File "/opt/ros/melodic/lib/python2.7/dist-packages/roslaunch/parent.py", line 301, in start self.logger.info("starting roslaunch parent run") File "/usr/lib/python3.11/logging/__init__.py", line 1489, in info self._log(INFO, msg, args, *kwargs) File "/usr/lib/python3.11/logging/__init__.py", line 1622, in _log fn, lno, func, sinfo = self.findCaller(stack_info, stacklevel) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/ros/melodic/lib/python2.7/dist-packages/rosgraph/roslogging.py", line 63, in findCaller while hasattr(f, "f_code"): ^^^^^^^^^^^^^^^^^^^^ KeyboardInterrupt ^CException ignored in atexit callback: <function _ros_atexit="" at="" 0x7ff128b6ff60=""> Traceback (most recent call last): File "/opt/ros/melodic/lib/python2.7/dist-packages/rospy/core.py", line 615, in _ros_atexit signal_shutdown('atexit') File "/opt/ros/melodic/lib/python2.7/dist-packages/rospy/core.py", line 560, in signal_shutdown _logger.info("signal_shutdown [%s]"%reason) File "/usr/lib/python3.11/logging/__init__.py", line 1489, in info self._log(INFO, msg, args, *kwargs) File "/usr/lib/python3.11/logging/__init__.py", line 1622, in _log fn, lno, func, sinfo = self.findCaller(stack_info, stacklevel) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/ros/melodic/lib/python2.7/dist-packages/rosgraph/roslogging.py", line 66, in findCaller filename = os.path.normcase(co.co_filename) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "<frozen posixpath="">", line 52, in normcase

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2023-01-27 00:24:28 -0600

billy gravatar image

I think Meolodic uses Python2 but it looks like you might be using a mix of Python3 and Python2. Was that intentional? I'm not brave enough to even install Python3 on the machine I have that runs old ROS.

edit flag offensive delete link more

Comments

Thank you for your response billy,actually I had to install python3 for another program that I was working and I think I messed up somewhere by installing it, are there any fixes available, shall I completely remove python3 from my system?

shreshtha gravatar image shreshtha  ( 2023-01-27 02:54:32 -0600 )edit
1

I am wondering how you managed to do this? I think you sourced a python3 environment into your python2 environment, so check your .bashrc-file as well as your path. If you just run "python -v" it should show you the python version that you use as default, that should be python2. Both python versions should be fine next to each other if you installed python from your package manager (like apt). But to help you uninstalling python3 might be the right fix you need, you probably also need to reinstall some python2 packages (at least the ones you installed after your python3 installation).

brean gravatar image brean  ( 2023-01-27 07:27:40 -0600 )edit

Thanks Brean, upon typing "python -v" it's showing python3.11, and I think that is what is causing problem, so I will then uninstall python3 completely and get back to you.

shreshtha gravatar image shreshtha  ( 2023-01-27 10:01:20 -0600 )edit

Thank you both of you after completely removing python3.11, I was able to run the roscore command

shreshtha gravatar image shreshtha  ( 2023-01-28 06:10:52 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2023-01-26 08:49:59 -0600

Seen: 486 times

Last updated: Jan 27 '23