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

ERROR: cannot launch node of type [name of node]

asked 2020-05-05 10:43:33 -0500

RayROS gravatar image

updated 2020-05-05 15:59:38 -0500

I wrote a node that keeps the trajectory markers (to form a path) and join them into LINE_STRIPS. The problem I have is that as soon as I launch the node via

roslaunch lidar_boat_detection trajectory_preprocessor.launch

I get the following error and I am not sure why:

PARAMETERS  * /rosdistro: melodic  * /rosversion: 1.14.3  * /trajectory_preprocessor/trajectory_preprocessor_data: True  * /use_sim_time: True
NODES   /
    trajectory_preprocessor (lidarboatsproject/trajectory_preprocessor_node)
ROS_MASTER_URI=http://localhost:11311
ERROR: cannot launch node of type [lidarboatsproject/trajectory_preprocessor_node]:  lidarboatsproject 
ROS path [0]=/opt/ros/melodic/share/ros 
ROS  path [1]=/home/emanuele/catkin_docking_ws/src
ROS path  [2]=/home/emanuele/catkin_ws/src 
ROS  path [3]=/opt/ros/melodic/share 
No processes to monitor shutting down
 processing monitor... 
... shutting down processing monitor complete

Below the launch file:

<?xml version="1.0"?>
<launch>
<param name="use_sim_time" value="true" />
 <node pkg="lidarboatsproject" type="trajectory_preprocessor_node"
       name="trajectory_preprocessor" clear_params="false">
      <param name="trajectory_preprocessor_data" value="true"/>
 </node>
</launch>

Thank you very much for pointing to the right direction for solving the problem.

edit retag flag offensive close merge delete

Comments

try sourcing your catkin ws by source devel/setup.bash

saztyga gravatar image saztyga  ( 2020-05-05 11:50:30 -0500 )edit

I'm sorry to have to do this for something so seemingly unimportant, but please don't post screenshots of terminal text in question on ROS Answers. It's all text, so there is no need. Just copy-paste the text from the terminal into your question text. Do make sure to format it properly by selecting the text and pressing ctrl+k (or clicking the Preformatted Text button (the one with 101010 on it)).

You don't need to post a new question, just edit your curent one. You can use the edit button/link for this.

After you replace the screenshot with the error message itself, we can re-open your question.

gvdhoorn gravatar image gvdhoorn  ( 2020-05-05 13:55:28 -0500 )edit

Hi @gvdhoorn, ok I edited the question and took out the print screen. I think it should be fine now. Let me know.

RayROS gravatar image RayROS  ( 2020-05-05 16:00:43 -0500 )edit

Yep, thanks for fixing it.

gvdhoorn gravatar image gvdhoorn  ( 2020-05-06 03:25:22 -0500 )edit

Is your trajectory_preprocessor_node python or c++?

Mike Scheutzow gravatar image Mike Scheutzow  ( 2021-09-06 12:22:39 -0500 )edit

P.S. if you put "cannot launch node of type" into the search bar at the top of this page, including the double quotes, you will see greater than 2 dozen questions like your own.

Mike Scheutzow gravatar image Mike Scheutzow  ( 2021-09-06 12:43:38 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-09-06 07:43:27 -0500

mobiiin gravatar image

the workaround here is sourcing the package path manually: add this to your .bashrc file and source bachrc

export ROS_PACKAGE_PATH=${ROS_PACKAGE_PATH}:~/catkin_ws/src/lidar_boat_detection
edit flag offensive delete link more

Comments

1

Please don't do this.

If/when you have to manually edit ROS_PACKAGE_PATH, something is not right, and you should fix the real cause.

gvdhoorn gravatar image gvdhoorn  ( 2021-09-06 08:46:47 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2020-05-05 10:43:33 -0500

Seen: 2,102 times

Last updated: Sep 06 '21