Problem finding depthimage_to_laserscan executable

asked 2021-01-29 12:17:38 -0500

RobotsWithLaserBeams gravatar image

Hello all,

When trying to run the depthimage_to_laserscan node from that package, I get the following error telling me ros can't find the executable:

~/catkin_ws$ rosrun depthimage_to_laserscan depthimage_to_laserscan
[rosrun] Couldn't find executable named depthimage_to_laserscan below /opt/ros/melodic/share/depthimage_to_laserscan
[rosrun] Found the following, but they're either not files,
[rosrun] or not executable:
[rosrun]   /opt/ros/melodic/share/depthimage_to_laserscan

Indeed, the directory only contains the follwing:

/opt/ros/melodic/share/depthimage_to_laserscan$ ls
cmake  nodelets.xml  package.xml

I do find an appropriately named executable here though:

/opt/ros/melodic/lib/depthimage_to_laserscan$ ls

Trying to run the node from a launch file gives the same error message.

I am running ROS Melodic on a Jetson Nano running Ubuntu 18.04. I installed the pre-compiled depthimage_to_laserscan package using apt, as confirmed here:

~/catkin_ws$ sudo apt-get install ros-melodic-depthimage-to-laserscan
Reading package lists... Done
Building dependency tree       
Reading state information... Done
ros-melodic-depthimage-to-laserscan is already the newest version (1.0.8-0bionic.20210113.164850).

(I have also installed the realsense2_camera package and confirmed I can talk to the camera and view its depth images in rviz, though I'm not sure that is relevant to this problem.)

It seems like it could be an environment issue, but: My ~/.bash.rc file contains the following:

source /opt/ros/melodic/setup.bash
source ~/catkin_ws/devel/setup.bash

and roscd brings me to the correct directory in melodic/share/

What am I missing? Is there something simple I haven't done? I've googled everywhere and don't see this problem for anyone else. I'm about to uninstall it and just compile it myself, but since it just can't find the node executable it seems like there should be a simple answer.

Thanks in advance for any help.

edit retag flag offensive close merge delete


Try opening a new terminal and source .bashrc , see if you can find the package with roscd. if yes, try launching it from this terminal.

siddharthcb gravatar image siddharthcb  ( 2021-07-13 05:23:49 -0500 )edit