ros2 launch not working after source my package
Honestly I do not know what is happeing on the background therefore I'm not able to solve it.
First of all I run my foxy (latest dev) on raspberry pi 3, successfully compiled. Everything works.
I open a new terminal and
source ~/ros2_foxy/install/setup.bash
Now I'm able to run following command
ros2 launch
It says that I didn't provide arguments but it works.
Then I go to my workspace and run the build:
cd ~/my_workspace
colcon build
A now when I do :
source ./install/setup.bash
OR
source ./install/local_setup.bash
Then ros2 launch is not known command:
Failed to load entry point 'launch': No module named 'launch.launch_description_sources'
Traceback (most recent call last):
File "/home/pi/ros2_foxy/install/ros2cli/bin/ros2", line 11, in <module>
load_entry_point('ros2cli', 'console_scripts', 'ros2')()
File "/home/pi/ros2_foxy/build/ros2cli/ros2cli/cli.py", line 43, in main
required=False, argv=argv)
File "/home/pi/ros2_foxy/build/ros2cli/ros2cli/command/__init__.py", line 236, in add_subparsers_on_demand
extension = command_extensions[name]
KeyError: 'launch'
And it is not in the list of ros2 commands anymore:
lttng module version >=2.10.7 required, found 2.10.6
Failed to load entry point 'test': No module named 'launch.actions'
Failed to load entry point 'launch': No module named 'launch.launch_description_sources'
usage: ros2 [-h] Call `ros2 <command> -h` for more detailed usage. ...
ros2 is an extensible command-line tool for ROS 2.
optional arguments:
-h, --help show this help message and exit
Commands:
action Various action related sub-commands
bag Various rosbag related sub-commands
component Various component related sub-commands
daemon Various daemon related sub-commands
doctor Check ROS setup and other potential issues
interface Show information about ROS interfaces
lifecycle Various lifecycle related sub-commands
multicast Various multicast related sub-commands
node Various node related sub-commands
param Various param related sub-commands
pkg Various package related sub-commands
run Run a package specific executable
security Various security related sub-commands
service Various service related sub-commands
topic Various topic related sub-commands
trace Trace ROS nodes to get information on their execution
wtf Use `wtf` as alias to `doctor`
Call `ros2 <command> -h` for more detailed usage.
What went wrong? Is there any docs? What I'm doing wrong? Please help.
Seeing the same issue,
launch
was working for me previously and then stopped with this bugI am also no longer able to run
test
If i restart my computer then it does find the launch package.
Running
source ./install/setup.bash
seems to cause the issue.@drewbeller Please do not post answers that are not actually answers. I've converted your answer to a comment. If you have a new question, please open a new question. Thanks!
https://wiki.ros.org/Support