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

"Couldn't find executable named mono_odometer below ..."

asked 2019-07-13 12:57:18 -0500

kevthomson gravatar image

updated 2019-07-13 13:23:42 -0500

gvdhoorn gravatar image

I can successfully rosrun other executables such as rosrun image_view image_view image:=/cv_camera/image_rect_colorand other packages including the listener and talker tutorial. I'm having trouble getting visual odometry from the viso2_ros package (http://wiki.ros.org/viso2_ros) following this tutorial (https://www.instructables.com/id/ROS-...) when trying to call rosrun viso2_ros mono_odometer image:=/cv_camera/image_rect. I get

Couldn't find executable named mono_odometer below /home/usr/catkin_ws/src/viso2/viso2_ros

but I've noticed mono_odometer is under /home/usr/catkin_ws/src/viso2/viso2_ros/src, Perhaps I need to change something in CMakeLists.txt? It looks the same as cloned from (https://github.com/srv/viso2). I already trade chmod +x-ing mono_odometer.cpp. It is probably some gap in my knolwedge.

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
0

answered 2019-07-16 10:42:10 -0500

kevthomson gravatar image

Turns out I wasn't even compiling mono_odometer. I had been using catkin_make -DCATKIN_WHITELIST_PACKAGES="pkg1;pkg2" to build only certain packages. I tried building only viso2 using that command, but I checked ~/catkin_ws/devel/lib/viso2_ros/ and nothing had been built there. I rebuilt using the conventional catkin_make and now the node runs as expected. Maybe something else is going on there.

I thank @gvdhoorn for trying to help.

edit flag offensive delete link more
1

answered 2019-07-13 13:24:50 -0500

gvdhoorn gravatar image

updated 2019-07-14 10:16:40 -0500

I already trade chmod +x-ing mono_odometer.cpp. It is probably some gap in my knolwedge.

have you built your workspace (ie: catkin_maked it) before trying to execute the node?

You cannot "run" a .cpp file. You have to compile it first, then link it into an executable binary.

The binary is what you run.

All of that is done automatically for you if you build your workspace.


The Instructables page you link to also mentions that in the Building everything section.

It forgets to tell you to also source ~/odometry/devel/setup.bash though. Without that rosrun and/or roslaunch will not be able to find any of your new nodes.


Edit:

Also yes, I know one cannot run a .cpp, but can the binary, thank you for wording it correctly!

Then why did you chmod +x a .cpp file?

I assume odometry is the name of the workspace, which is catkin_ws for me?

Yes, it is, but I used the name they give it on the page you linked to.

So yes, I did source ~/catkin_ws/devel/setup.bash, which is also in my .bashrc, which should mean I don't need to do it anyway?

No, that's not entirely true.

You have to source a workspace whenever you add or remove packages to from it. Having a source line in your .bashrc doesn't help in those cases, unless you open a new terminal whenever you add or remove packages to from the workspace.

So if you don't, you still have to source your workspace after building it.

Any other ideas why I'm not able to run the node? Any other common issues?

After having built your workspace, having sourced the devel/setup.bash, what is the output of rospack find viso2_ros?

edit flag offensive delete link more

Comments

I did catkin_make-ed my workspace.

Also yes, I know one cannot run a .cpp, but can the binary, thank you for wording it correctly!

I assume odometry is the name of the workspace, which is catkin_ws for me? So yes, I did source ~/catkin_ws/devel/setup.bash, which is also in my .bashrc, which should mean I don't need to do it anyway?

Any other ideas why I'm not able to run the node? Any other common issues?

kevthomson gravatar image kevthomson  ( 2019-07-14 09:25:22 -0500 )edit

Question Tools

Stats

Asked: 2019-07-13 12:57:18 -0500

Seen: 1,273 times

Last updated: Jul 16 '19