ifm / ifm3d-ros

ifm pmd-based 3D ToF Camera ROS Package
Apache License 2.0
40 stars 40 forks source link

issue with starting camera node #31

Closed NKKD closed 4 years ago

NKKD commented 4 years ago

~$ roslaunch ifm3d camera.launch

RLException: [camera.launch] is neither a launch file in package [ifm3d] nor is [ifm3d] a launch file name The traceback for the exception was written to the log file

theseankelly commented 4 years ago

Are you sourcing from an install space or devel?

From your ROS environment, can you please share the output of:

rospack find ifm3d

And then assuming it was found, please share the output of:

roscd ifm3d
ls launch
NKKD commented 4 years ago

Thank you for replying @theseankelly

~$ rospack find ifm3d [rospack] Error: package 'ifm3d' not found

it seems like i didn't install my ifm3d properly.

can you please have a look on my bashrc. I'm currently using ros moledic. I install my ros in /opt, ifm3d&ifm3d-ros in usr/include

if [ -f /opt/ros/melodic/setup.bash ]; then source /opt/ros/melodic/setup.bash fi

cd ${opt}

export LPR_ROS=${opt}/ros

if [ -d ${LPR_ROS} ]; then for i in $(ls ${LPR_ROS}); do if [ -d ${LPR_ROS}/${i} ]; then if [ -f ${LPR_ROS}/${i}/setup.bash ]; then source ${LPR_ROS}/${i}/setup.bash --extend fi fi done fi

NKKD commented 4 years ago

I tried reinstall my ifm3d and ifm3d-ros. but it still gives me same error.

theseankelly commented 4 years ago

Hi @NKKD -- the script you've pasted above (which I believe you found here: https://github.com/ifm/ifm3d-ros/blob/master/doc/building.md) is merely a convenience helper script. The idea is that if you catkin_make install all of your packages to a single location (say ~/ros) this script will walk through the subfolders (presumably packages) found that directory and source the setup.bash script for each package it finds. So, the line export LPR_ROS=${opt}/ros should read export LPR_ROS=path where path is the fully qualified path to the parent folder containing your ifm3d installation directory.

This script is not mandatory and I'd suggest instead you start out sourcing the setup.bash script directly for the ifm3d-ros package to make sure the fundamentals are working: source /path/to/ifm3d-ros/installation/directory/setup.bash and then rospack find ifm3d

Also, FWIW (and not specific to ifm3d-ros): I'd suggest not installing to /usr/include as catkin packages contain full executables, not just headers. I tend to use my home directory or /opt is a good option as well.

NKKD commented 4 years ago

Thank you so much @theseankelly I made it work. I found out the problem is that i forgot to delete a tilde in the path.

theseankelly commented 4 years ago

@NKKD glad to hear it!