Ask Your Question
-1

cannot launch node.. but the node is correctly built! [closed]

asked 2015-02-09 19:36:41 -0600

Marco T. gravatar image

updated 2015-02-09 23:27:51 -0600

Hello,

I am trying to run a simple test (on Stage); however, I am not able to roslaunch my c++ code.

My node test_navigation is correctly built: [100%] Built target test_navigation. My CMakeLists.txt is as follows:

cmake_minimum_required(VERSION 2.8.3)
project(test_navigation)

find_package(catkin REQUIRED COMPONENTS
  actionlib
  actionlib_msgs
  move_base
  move_base_msgs
  roscpp
  rospy
  std_msgs
)
include_directories(
  ${catkin_INCLUDE_DIRS}
  ${python_INCLUDE_DIRS}
)
catkin_package(
    DEPENDS actionlib actionlib_msgs move_base move_base_msgs roscpp rospy std_msgs
)
add_executable(test_navigation src/my_math.cpp src/robot_pose.cpp src/robot_manager.cpp src/monitor.cpp src/test_navigation.cpp)
target_link_libraries(test_navigation boost_program_options ${catkin_LIBRARIES})

However, by using

<node name="test_navigation" pkg="test_navigation" type="test_navigation" output="screen" args="--init-pose-x $(arg init_pose_x) --init-pose-y $(arg init_pose_y) --init-pose-th $(arg init_pose_th) --goal-pose-x $(arg goal_pose_x) --goal-pose-y $(arg goal_pose_y) --goal-pose-th $(arg goal_pose_th) --instance-id $(arg instance_id)"/>

in my launch file and calling roslaunch the result I obtain is

ERROR: cannot launch node of type [test_navigation/test_navigation]: can't locate node [test_navigation] in package [test_navigation]

I should say that I am a complete newbie to catkin and definitely not an expert in rosbuild either.

Does anybody have a hint?

EDIT: this is the output of rospack profile:

marco@marco-PC ~/catkin_ws $ rospack profile
Full tree crawl took 0.013673 seconds.
Directories marked with (*) contain no manifest.  You may
want to delete these directories.
To get just of list of directories without manifests,
re-run the profile with --zombie-only
-------------------------------------------------------------
0.011649   /opt/ros/indigo/share
0.000842   /home/marco/catkin_ws/install/share
0.000016 * /opt/ros/indigo/share/doc
0.000002 * /opt/ros/indigo/share/doc/liborocos-kdl
edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by tfoote
close date 2015-11-02 01:20:58.046935

Comments

Did you source the resulting setup.bash file? How did you build your package?

William gravatar imageWilliam ( 2015-02-09 21:25:13 -0600 )edit

Yes, I have executed source /catkin_ws/install/setup.bash; is this the file you mean? Also, I noticed that when I type roslaunch test_navigation and I press the Tab key, no suggestion comes, while if I type roslaunch amcl and I press Tab, I see the suggestions for amcl.

Marco T. gravatar imageMarco T. ( 2015-02-09 21:46:30 -0600 )edit

I also noticed that catkin_make creates the folders devel and build in my other package subfolder, but in test_navigation the only folder is src.

Marco T. gravatar imageMarco T. ( 2015-02-09 21:51:13 -0600 )edit

I built my package by running catkin_make test_navigation. Does this answer your question?

Marco T. gravatar imageMarco T. ( 2015-02-09 21:53:28 -0600 )edit

Just do catkin_make instead of catkin_make test_navigation and try again?

William gravatar imageWilliam ( 2015-02-09 22:53:37 -0600 )edit

I've done as you suggest, but the result is the same.

Marco T. gravatar imageMarco T. ( 2015-02-09 22:55:40 -0600 )edit

Can you post the output of rospack profile after sourcing the setup.bash file.

William gravatar imageWilliam ( 2015-02-09 23:19:19 -0600 )edit

I added the output in the original question.

Marco T. gravatar imageMarco T. ( 2015-02-10 00:11:57 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-02-10 03:10:27 -0600

dornhege gravatar image

If you source the .../install/setup.bash you need to run catkin_make install.

Usually while developing source ../devel/setup.bash. Then catkin_make is sufficient.

edit flag offensive delete link more

Comments

Hi, none of the above works. It's like if package test_navigation was recognized but had no nodes. Consider that this issue may be more trivial than it is, due to my inexperience. What may the cause be?

Marco T. gravatar imageMarco T. ( 2015-02-10 15:20:22 -0600 )edit

Can you just try rosrun instead and make sure devel/setup.bash is sourced in the shell you do rosrun. There are some possibilities to debug the individual steps. According to the outputs everything is fine.

dornhege gravatar imagedornhege ( 2015-02-11 03:06:58 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2015-02-09 19:36:41 -0600

Seen: 403 times

Last updated: Feb 10 '15