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

Problems with ros::package::getPath in Fuerte

asked 2012-03-18 14:46:44 -0600

I Heart Robotics gravatar image

updated 2012-03-18 14:48:20 -0600

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?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

answered 2012-03-19 14:30:30 -0600

I Heart Robotics gravatar image

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.

edit flag offensive delete link more
1

answered 2012-03-19 01:14:30 -0600

dornhege gravatar image

This might be a result from REP122/REP124.

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

edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-03-18 14:46:44 -0600

Seen: 730 times

Last updated: Mar 19 '12