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

Revision history [back]

click to hide/show revision 1
initial version

First, rosinstall is only a tool to download sources from version control. It makes life easier when you want to download sources, and that's all. So it will not solve your earlier problem.

Traceback (most recent call last):
  File "/opt/ros/electric/ros/bin/roslaunch", line 2, in <module>
    from ros import roslaunch
ImportError: cannot import name roslaunch

This means your the roslaunch python libraries are not on your PYTHONPATH. To get them on your pythonpath, it is usually sufficient to run:

source /opt/ros/electric/setup.bash

before attempting to run roscore or any ros node or tool. Since your questio ndoes not show what exactly you have tried to run when getting the error message, we can only guess what went wrong.

As to rosinstall, we have not finalized python3 compatibility. So it might be best for you to not use it for now, unless you manage to run it using python2. getting that to run might be good for a different question.

First, rosinstall is only a tool to download sources from version control. It makes life easier when you want to download sources, and that's all. So it will not solve your earlier problem.

Traceback (most recent call last):
  File "/opt/ros/electric/ros/bin/roslaunch", line 2, in <module>
    from ros import roslaunch
ImportError: cannot import name roslaunch

This means your the roslaunch python libraries are not on your PYTHONPATH. To get them on your pythonpath, it is usually sufficient to run:

source /opt/ros/electric/setup.bash

before attempting to run roscore or any ros node or tool. Since your questio ndoes not show what exactly you have tried to run when getting the error message, we can only guess what went wrong.

As to rosinstall, we have not finalized python3 compatibility. So it might be best for you to not use it for now, unless you manage to run it using python2. getting that to run might be good for a different question.

(One way to run cleanly things using python2 in Ubuntu is to use virtualenv.)

First, rosinstall is only a tool to download sources from version control. It makes life easier when you want to download sources, and that's all. So it will not solve your earlier problem.

Traceback (most recent call last):
  File "/opt/ros/electric/ros/bin/roslaunch", line 2, in <module>
    from ros import roslaunch
ImportError: cannot import name roslaunch

This means your the roslaunch python libraries are not on your PYTHONPATH. To get them on your pythonpath, it is usually sufficient to run:

source /opt/ros/electric/setup.bash

before attempting to run roscore or any ros node or tool. Since your questio ndoes not show what exactly you have tried to run when getting the error message, we can only guess what went wrong.

As to rosinstall, we have not finalized python3 compatibility. So it might be best for you to not use it for now, unless you manage to run it using python2. getting that to run might be good for a different question.

(One way to run cleanly things using python2 in Ubuntu is to use virtualenv.)

virtualenv.

Note that apparently you are running rosinstall using python2.7, therefore when it tires to use yaml for python3, you get the invalid syntax error. So what you would need is to create a virtualenv for python2.7, install yaml using pip to that virtualenv, then using that virtualenv run rosinstall. Then rosinstall would not use python3 yaml, but python2 yaml from your environment. Note that for this approach, you would probably also have to install other python libraries for python2.7.)