0
$\begingroup$

Rosanswers logo

I just installed ROS1 base version from source in the directory: /home/mdc/ros_base/.

To finish the installation, I executed source /home/mdc/ros_base/install_isolated/setup.bash.

Then I execute the command printenv | grep 'ROS\|PYTHONPATH' to check the environment variables of ROS and here is the output:

ROS_ROOT=/home/mdc/ros_base/install_isolated/share/ros
ROS_PACKAGE_PATH=/home/mdc/ros_base/src/ros_comm/rosbag:/home/mdc/ros_base/install_isolated/share:/home/mdc/ros/install_isolated/share:/home/mdc/ros/src
ROS_MASTER_URI=http://localhost:11311
ROS_VERSION=1
ROSLISP_PACKAGE_DIRECTORIES=/home/mdc/ros_base/devel_isolated/rosbag/share/common-lisp:/home/mdc/ros/devel/share/common-lisp
ROS_DISTRO=kinetic
PYTHONPATH=/home/mdc/ros_base/devel_isolated/rosbag/lib/python2.7/dist-packages:/home/mdc/ros_base/install_isolated/lib/python2.7/dist-packages:/home/mdc/ros/install_isolated/lib/python2.7/dist-packages
ROS_ETC_DIR=/home/mdc/ros_base/install_isolated/etc/ros

Also, I execute which roslaunch and get the output as below:

/home/mdc/ros_base/install_isolated/bin/roslaunch

Now, my project is here: /home/mdc/catkin_ws/, so here is what I'm doing:

cd /home/mdc/catkin_ws
roslaunch ./src/mylaunch/launch/classic_mode.launch

But I get an error:

Traceback (most recent call last):
      File "/home/mdc/ros_base/install_isolated/bin/roslaunch", line 34, in <module>
        import roslaunch
    ImportError: No module named roslaunch

However, I checked the path: /home/mdc/ros_base/install_isolated/lib/python2.7/dist-packages, which has been set into PYTHONPATH as above and I saw there was a directory named roslaunch. I think this is exactly the module roslaunch, right? If so, why can't it find the module roslaunch?


Originally posted by bear234 on ROS Answers with karma: 71 on 2018-03-12

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

plz execute source /opt/ros/distro/setup.bash fristly


Originally posted by lsw with karma: 46 on 2018-03-12

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.