0
$\begingroup$

Rosanswers logo

Something like the following used to work in electric but in fuerte it incorrectly yields /opt/ros/fuerte/share/roslaunch/bin/roslaunch instead of /opt/ros/fuerte/bin/roslaunch

std::string roslaunch_path = ros::package::getPath("roslaunch");
sprintf (roslaunch_bin_path, "%s/bin/roslaunch", roslaunch_path.c_str ());

In electric

$rospack find roslaunch 
/opt/ros/electric/stacks/ros_comm/tools/roslaunch
$ls /opt/ros/electric/stacks/ros_comm/tools/roslaunch/bin/roslaunch
/opt/ros/electric/stacks/ros_comm/tools/roslaunch/bin/roslaunch

In Fuerte

$rospack find roslaunch 
/opt/ros/fuerte/share/roslaunch
$ls /opt/ros/fuerte/share/roslaunch
manifest.xml  resources

Is this the desired behavior? If so how do we find the location of the roslaunch binary? Is there a roslaunch API that is stable so we don't need to exec() roslaunch?


Originally posted by I Heart Robotics on ROS Answers with karma: 403 on 2012-03-18

Post score: 1

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

This might be a result from REP122/REP124.

Why can't you just call roslaunch or maybe rosrun roslaunch roslaunch?


Originally posted by dornhege with karma: 31395 on 2012-03-19

This answer was NOT ACCEPTED on the original site

Post score: 1

$\endgroup$
0
$\begingroup$

Rosanswers logo

So, it looks like the solution is to use execvp() instead of execv().

I am vaguely uncomfortable not specifying the full path, but since nothing is setuid or setgid I suppose it is a reasonable solution.


Originally posted by I Heart Robotics with karma: 403 on 2012-03-19

This answer was ACCEPTED on the original site

Post score: 0

$\endgroup$

Your Answer

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