Cannot execute rostopic list -v correctly
Hi,
I am a beginner to ROS, please see below information about my environment:
ROS version: melodic
Platform: Ubuntu 18
Environment Variables (output of env | grep ROS) i source the setup.bash file for my current workspace every time i login:
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_PACKAGE_PATH=/opt/ros/melodic/share
ROSLISP_PACKAGE_DIRECTORIES=
ROS_DISTRO=melodic
While following the beginner tutorials, i performed the step to list current topics in verbose mode via rostopic list -v
and was faced with the following result:
Published topics:
* /turtle1/color_sensor [turtlesim/Color] 1 publisher
* /turtle1/cmd_vel [geometry_msgs/Twist] 1 publisher
* /rosout [rosgraph_msgs/Log] 5 publishers
* /rosout_agg [rosgraph_msgs/Log] 1 publisher
* /turtle1/pose [turtlesim/Pose] 1 publisher
Subscribed topics:
Traceback (most recent call last):
File "/opt/ros/melodic/bin/rostopic", line 35, in <module>
rostopic.rostopicmain()
File "/opt/ros/melodic/lib/python2.7/dist-packages/rostopic/__init__.py", line 2119, in rostopicmain
_rostopic_cmd_list(argv)
File "/opt/ros/melodic/lib/python2.7/dist-packages/rostopic/__init__.py", line 2059, in _rostopic_cmd_list
exitval = _rostopic_list(topic, verbose=options.verbose, subscribers_only=options.subscribers, publishers_only=options.publishers, group_by_host=options.hostname) or 0
File "/opt/ros/melodic/lib/python2.7/dist-packages/rostopic/__init__.py", line 1246, in _rostopic_list
verbose)
File "/opt/ros/melodic/lib/python2.7/dist-packages/rostopic/__init__.py", line 1140, in _sub_rostopic_list
print(indent+" * %s [%s] %s subscribers"%(t, ttype, len(llist)))
NameError: global name 'llist' is not defined
According to the correct output shown in the tutorials, i get the Published topics correctly, however the Subscribed topics output is not correct.
Kindly help.