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

ROS2, No executable found

asked 2020-06-12 01:02:28 -0600

anthares gravatar image

updated 2020-06-12 01:15:16 -0600

Hi everyone,

I have successfully created few ROS2 nodes (one for a publisher with customer message, the custom message one, one responsible for debugging, one for the subscriber).

I have repeated the exact same steps in order to create some other packages. However, the last one that I created returns "No executable found".

I am developing using python3.

I am pretty sure that package.xml, setup.py, setup.cfg and the actual node class are fine.

Also, no issues when running rosdep, all fine with colcon build, and I have installed everything with . install/setup.bash.

What could the problem be? Any idea?

Thanks in advance, G.

edit retag flag offensive close merge delete

Comments

Do you see the executable when you run?

ros2 pkg executables <pkg_name>
swaroophs gravatar image swaroophs  ( 2020-06-12 04:18:09 -0600 )edit

yes, I can see the package being there...

anthares gravatar image anthares  ( 2020-06-12 08:58:35 -0600 )edit

in my case, i didn't see anything with this command

Uik gravatar image Uik  ( 2022-07-13 07:05:00 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2020-06-12 11:18:45 -0600

anthares gravatar image

I believe that the error was caused by wrong action on my side.. I built and installed without realizing at the wrong level of the project tree.. that was enough to mess things up ...

lol

edit flag offensive delete link more
0

answered 2022-07-05 11:30:59 -0600

Roberto Z. gravatar image

updated 2022-07-05 11:34:30 -0600

In my case I had to add this command to my CMakeLists.txt script just bellow the call to add_executable(..) and ament_target_dependencies(...).

install(TARGETS
  <name_of_executable_target>
  DESTINATION lib/${PROJECT_NAME}/
)

After building:

cd ~/ros2_ws
colcon build

And sourcing:

source install/setup.bash

and finally:

ros2 run [package_name] [executable_name]

This solved the issue.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2020-06-12 01:02:28 -0600

Seen: 18,710 times

Last updated: Jul 05 '22