问题
I am trying to perform a segmentation task with PCL/ROS. I am using the dynamic configuration option in ROS as the number of inputs to my segmentation task is large and would like to study the influence of each param
. There is no problem with my C++ source code, however when I try to run the launch file my file publisher is not able to find the PCD files.
<launch>
<!-- Start segmentation analysis -->
<node pkg="segmentation_analysis" name="region_growing" type="region_growing" output="screen">
<remap from="selected_file" to="/selected_file" />
</node>
<node pkg="file_selection" name="file_publisher" type="file_publisher" args="/home/anirudh/getbot/ros/3d_scene_analysis/segmentation_analysis">
<param name="extension" value="pcd"/>
<remap from="~file" to="/selected_file"/>
</node>
<node pkg="rqt_reconfigure" name="rqt_reconfigure" type="rqt_reconfigure" >
</node>
But when I run the launch file, I am getting the following error:
ERROR: cannot launch node of type [file_selection/file_publisher]: can't locate node [file_publisher] in package [file_selection]
Any help will be appreciated.
回答1:
As far as I can tell, your error is not related to not finding PCD files.
It says
can't locate node [file_publisher] in package [file_selection]
So it cannot find the program file_publisher.
So check that:
- The package file_selection exists.
- The executable file file_publisher exists inside that package.
To check the first item:
If you type:
roscd file_selection
...does the current working directory switch to the file_selection package? If that doesn't work, figure out why. If it does, try the next step:
To check the second item:
roscd file_selection
find . -executable
...and check if the output contains file_publisher.
Go from there.
Edit: Also note that for ROS related questions there is answers.ros.org
来源:https://stackoverflow.com/questions/16759356/ros-dynamic-config-file