Search code examples
linuxros

I was able to run ros by "roscore" . But now I am getting an error


I was able to run ros by "roscore" earlier. But now I am getting an error:

Traceback (most recent call last):
  File "/usr/bin/roscore", line 36, in <module>
    from rosmaster.master_api import NUM_WORKERS
ModuleNotFoundError: No module named 'rosmaster'

How to fix the issue?


Solution

  • This error is caused from not sourcing the setup file. Every time you open a new terminal make sure you run source /opt/ros/$ROS_DISTRO/setup.bash or make sure that command is added to your ~/.bashrc file