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

roscore not working but it worked before

asked 2023-08-09 02:58:36 -0500

qwerty97 gravatar image

i am a beginner lerning ros and haven't touched ros for some time. wanted to try some stuff today. when i roscore, i got this error:

Traceback (most recent call last): File "/usr/bin/roscore", line 72, in <module> import roslaunch File "/usr/lib/python3/dist-packages/roslaunch/__init__.py", line 62, in <module> from .scriptapi import ROSLaunch File "/usr/lib/python3/dist-packages/roslaunch/scriptapi.py", line 42, in <module> import roslaunch.parent File "/usr/lib/python3/dist-packages/roslaunch/parent.py", line 54, in <module> import roslaunch.server File "/usr/lib/python3/dist-packages/roslaunch/server.py", line 79, in <module> from rosgraph_msgs.msg import Log ImportError: cannot import name 'Log' from 'rosgraph_msgs.msg' (/opt/ros/foxy/lib/python3.8/site-packages/rosgraph_msgs/msg/__init__.py)

i checked to see but i have no Log.msg file. i resintalled the rosgrpah message and also reinstalled my ros. everyhting is updated and upgarded. i am using foxy in ubuntu 20.04.

any help will be greatly appreciated.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2023-08-10 05:00:23 -0500

I think the error come from the fact that you are running roscore in a ROS2 distribution such as Foxy. ROS 2 doesn't have a master node like other ROS distro until Noetic

edit flag offensive delete link more

Comments

thank you for replying! so i don't have to roscore for ros2? i just source /opt/ros/foxy and carry on with the other commands?

qwerty97 gravatar image qwerty97  ( 2023-08-10 06:53:54 -0500 )edit

Question Tools

Stats

Asked: 2023-08-09 02:58:36 -0500

Seen: 250 times

Last updated: Aug 10 '23