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

rostopic import error

asked 2017-09-14 10:26:13 -0500

danny5555 gravatar image

I am following the Ros Nodes tutorial http://wiki.ros.org/ROS/Tutorials/Und... and have come across an error at point 6 in the website above^^.

When I try to run the '$ rosnode list' command in the new terminal window, I receive the error below:

import rostopic ImportError: No module named rostopic

and therefore cannot continue the tutorial.

Has anyone overcome this problem?

edit retag flag offensive close merge delete

Comments

How did you install ROS? Are you sourceing your setup.bash file?

source /opt/ros/<ros-version>/setup.bash
jayess gravatar image jayess  ( 2017-09-14 17:43:55 -0500 )edit

Can you see rostopic in the list when you type python -m pip list? You should also see other ROS-related modules such as rosdep, rosbag, ...

Hug gravatar image Hug  ( 2018-07-27 04:08:03 -0500 )edit

Having same issue. any solution to this? P.S, I install ROS as mentioned in DOCs. And I'm sourcing setup.bash (source /opt/ros/kinetic/setup.bash). I also can see rostopic in the list when I run python -m pip list but some other ros stuff are there!

r.ghahremani gravatar image r.ghahremani  ( 2018-08-09 07:00:47 -0500 )edit

Have you installed conda? If so, you should comment or remove the line export PATH="/home/<user>/<anaconda-version>/bin:$PATH" in your .bashrc (source).

Hug gravatar image Hug  ( 2018-08-09 13:27:37 -0500 )edit

@Hug. No I did not install 'conda'. shall I? cuz there is noting about 'conda' in ROS documents as prerequisites as I know!!

r.ghahremani gravatar image r.ghahremani  ( 2018-08-10 06:50:40 -0500 )edit
1

I believe that @Hug asked because many people have problems similar to this when they use Conda. I'd say that you probably shouldn't install it if you don't know what it is.

jayess gravatar image jayess  ( 2018-08-10 10:42:21 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2019-01-26 23:15:49 -0500

try sudo apt-get install ros-kinetic-rosnode

edit flag offensive delete link more

Question Tools

Stats

Asked: 2017-09-14 10:26:13 -0500

Seen: 1,565 times

Last updated: Sep 14 '17