[composition_demo.launch.py] No executable found
I am trying to run composition_demo.launch.py but it shows following error:
$ ros2 run composition composition_demo.launch.py
No executable found
Below are the steps showing how I prepared the workspace and the package:
$ source /opt/ros/foxy/setup.bash
$ mkdir -p ~/dev_ws/src
$ cd ~/dev_ws/src
$ git clone https://github.com/ros2/demos.git -b foxy
$ cd demos/
$ rm -r !(composition) # delete everything except "composition"
$ cd ~/dev_ws/
In this case, I have removed all packages except "composition". Below is the directory structure:
user@dell:~/dev_ws$ tree -a
.
└── src
└── demos
├── composition
│ ├── CHANGELOG.rst
│ ├── CMakeLists.txt
│ ├── include
│ │ └── composition
│ │ ├── client_component.hpp
│ │ ├── listener_component.hpp
│ │ ├── node_like_listener_component.hpp
│ │ ├── server_component.hpp
│ │ ├── talker_component.hpp
│ │ └── visibility_control.h
│ ├── launch
│ │ └── composition_demo.launch.py
│ ├── package.xml
│ ├── src
│ │ ├── client_component.cpp
│ │ ├── dlopen_composition.cpp
│ │ ├── linktime_composition.cpp
│ │ ├── listener_component.cpp
│ │ ├── manual_composition.cpp
│ │ ├── node_like_listener_component.cpp
│ │ ├── server_component.cpp
│ │ └── talker_component.cpp
│ └── test
│ ├── composition_all.regex
│ ├── composition_pubsub.regex
│ ├── composition_srv.regex
│ ├── test_api_pubsub_composition.py.in
│ ├── test_api_srv_composition_client_first.py.in
│ ├── test_api_srv_composition.py.in
│ ├── test_dlopen_composition.py.in
│ ├── test_linktime_composition.py.in
│ └── test_manual_composition.py.in
├── .git
│ └── FILES REMOVED TO KEEP THE POST SHORT
├── .github
│ └── ISSUE_TEMPLATE.md
└── .gitignore
26 directories, 54 files
Now, I complied my workspace. Because the "composition" package is shipped with ROS, so I marked it to be overridden as shown below:
$ cd ~/dev_ws/
$ colcon build --allow-overriding composition
$ source /opt/ros/foxy/setup.bash
$ . install/local_setup.bash
$ ros2 run composition composition_demo.launch.py
No executable found
What's wrong?