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

[composition_demo.launch.py] No executable found

asked 2022-05-18 06:05:29 -0600

ravijoshi gravatar image

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?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2022-05-18 06:21:38 -0600

updated 2022-05-18 06:23:06 -0600

You need to do ;

ros2 launch composition composition_demo.launch.py

You are trying to launch a file so you need to use launch command

edit flag offensive delete link more

Comments

Ahhh!!! Time to have a coffee break. Thanks for the answer.

ravijoshi gravatar image ravijoshi  ( 2022-05-18 06:45:08 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2022-05-18 06:05:29 -0600

Seen: 133 times

Last updated: May 18 '22