0
$\begingroup$

Rosanswers logo

Hello there, i'm trying to launch the procrob_funtional face recognition tool via launchfile. By starting the Fserver via rosrun you have to go to the directory in which the "facedata.xml" etc. are stored. How can I realize that in a launchfile? I'm using ros groovy and the following code:

<launch>
  <node name="usb_cam" pkg="usb_cam" type="usb_cam_node" output="screen" >
    <param name="video_device" value="/dev/video0" />
    <param name="image_width" value="640" />
    <param name="image_height" value="480" />
    <param name="pixel_format" value="mjpeg" />
    <param name="camera_frame_id" value="usb_cam" />
    <param name="io_method" value="mmap"/>
  </node>
  <node name="Fserver" pkg="face_recognition" type="Fserver" output="screen"> 
    <param name="haarcascade_frontalface_alt" value="$(find face_recognition)/haarcascade_frontalface_alt.xml"/>
    <param name="facedata" value="$(find face_recognition)/facedata.xml"/>
    <param name="train" value="$(find face_recognition)/train.txt"/>
  </node>
  <node name="Fclient" pkg="face_recognition" type="Fclient" output="screen">
  </node>
</launch>

Thanks for your help!


Originally posted by Bison on ROS Answers with karma: 52 on 2013-02-20

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

you can use the 'cwd' attribute in your launch file. E.g.

This sets the working directory to the directory where the executable is placed. In this case, then you just need to put all required input files ( haarcascade_frontalface_alt.xml, train.txt, facedata.xml and the data folder) in the bin folder of the face_recognition package.


Originally posted by Pouyan with karma: 143 on 2013-06-17

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by Bison on 2013-06-20:
Hi Pouyan, first of all, thanks for your answer. I tried the way you proposed, but when I enter the command for recognition nothing happens.

Comment by Pouyan on 2013-06-23:
Hi Bison. Then the problem should be from somewhere else. Because if the working directory is not set correctly, you get error like "can not find haarcascade_frontalface_alt.xml" or so ..

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.