"roscore" is not initializing - ROS MELODIC
I have installed ROS_MELODIC in my Ubuntu 18.04.1 LTS machine.
When I started the ros master with roscore, I got an exception as quoted.
... logging to /home/revan/.ros/log/199d6f5c-b3e9-11e8-b3b6-54a0507ac74b/roslaunch-revaapriyan-6988.log Checking log directory for disk usage. This may take awhile. Press Ctrl-C to interrupt Done checking log file disk usage. Usage is <1GB.
RLException: Invalid <param> tag: Cannot load command parameter [rosversion]: no such command [rosversion roslaunch].
Param xml is <param command="rosversion roslaunch" name="rosversion"/> The traceback for the exception was written to the log file
The Traceback in the log file:
[roslaunch][ERROR] 2018-09-09 10:00:37,367: RLException: Invalid <param> tag: Cannot load command parameter [rosversion]: no such command [rosversion roslaunch].
Param xml is <param command="rosversion roslaunch" name="rosversion"/>
[roslaunch][ERROR] 2018-09-09 10:00:37,367: The traceback for the exception was written to the log file
[roslaunch][ERROR] 2018-09-09 10:00:37,368: Traceback (most recent call last):
File "/opt/ros/melodic/lib/python2.7/dist-packages/roslaunch/__init__.py", line 322, in main
p.start()
File "/opt/ros/melodic/lib/python2.7/dist-packages/roslaunch/parent.py", line 277, in start
self._start_infrastructure()
File "/opt/ros/melodic/lib/python2.7/dist-packages/roslaunch/parent.py", line 226, in _start_infrastructure
self._load_config()
File "/opt/ros/melodic/lib/python2.7/dist-packages/roslaunch/parent.py", line 138, in _load_config
roslaunch_strs=self.roslaunch_strs, verbose=self.verbose)
File "/opt/ros/melodic/lib/python2.7/dist-packages/roslaunch/config.py", line 447, in load_config_default
load_roscore(loader, config, verbose=verbose)
File "/opt/ros/melodic/lib/python2.7/dist-packages/roslaunch/config.py", line 94, in load_roscore
loader.load(f_roscore, config, core=True, verbose=verbose)
File "/opt/ros/melodic/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 751, in load
self._load_launch(launch, ros_config, is_core=core, filename=filename, argv=argv, verbose=verbose)
File "/opt/ros/melodic/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 723, in _load_launch
self._recurse_load(ros_config, launch.childNodes, self.root_context, None, is_core, verbose)
File "/opt/ros/melodic/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 657, in _recurse_load
default_machine, is_core, verbose)
File "/opt/ros/melodic/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 667, in _recurse_load
self._param_tag(tag, context, ros_config, verbose=verbose)
File "/opt/ros/melodic/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 95, in call
return f(*args, **kwds)
File "/opt/ros/melodic/lib/python2.7/dist-packages/roslaunch/xmlloader.py", line 282, in _param_tag
"Invalid <param> tag: %s. \n\nParam xml is %s"%(e, tag.toxml()))
XmlParseException: Invalid <param> tag: Cannot load command parameter [rosversion]: no such command [rosversion roslaunch]. Param xml is <param command="rosversion roslaunch" name="rosversion"/>
My env variables are set as:
ROS_ETC_DIR=/opt/ros/melodic/etc/ros
ROS_ROOT=/opt/ros/melodic/share/ros
ROS_MASTER_URI=http://localhost:11311
ROS_VERSION=1
ROS_PYTHON_VERSION=2
ROS_PACKAGE_PATH=/opt/ros/melodic/share
ROSLISP_PACKAGE_DIRECTORIES=
ROS_HOSTNAME=localhost
ROS_DISTRO=melodic
PS: gcc version - 7.3.0
Can you tell us how you installed ROS? Using
apt
, or did you build things from sources?If you used
apt
, can you check that you havepython-rospkg
installed? It should be by default, but I've seen stranger things. Check the output ofdpkg -l | grep python-rospkg
.sudo apt-get install ros-melodic-desktop-full
2.Terminal output for python-rospkg check. (a) python-rospkg 1.1.7-100 all ROS package library (b) python-rospkg-modules 1.1.7-1 all ROS packagePS: I'm using Anaconda Distribution for managing python package