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

Roslaunch files from binaries and from source

asked 2016-03-28 14:47:15 -0500

pgigioli gravatar image

updated 2016-03-28 16:48:59 -0500

I have a launch file that is written in my catkin_ws that includes other launch files from binaries (/opt/ros/indigo/ etc.) and from source (/catkin_ws/src/ etc.). In order to run the launch file, I have to source the catkin_ws but if I do this, the nodes from the binary launch file cannot be found. If I source the /opt/ros/indigo/setup.bash, then the launch file can't be found because it is located in the catkin_ws. Do I have to install all packages from source in order to accomplish this?

EDIT:

Here is my launch file:

<launch>

   <include file="$(find turtlebot_bringup)/launch/minimal.launch" />

   <include file="$(find turtlebot_navigation)/launch/gmapping_demo.launch" />

   <include file="$(find frontier_exploration)/launch/global_map.launch" />

   <node name="send_exploration_goal" pkg="turtlebot_demos" type="send_exploration_goal"/>
       <param name="set_linear_vel" value="0.1" />
       <param name="set_angular_vel" value="0.1" />
   </node>

</launch>

The "send_exploration_goal" is a node I created and is located in my catkin_ws. Frontier_exploration is a package I installed using apt-get and is the launch file that fails to launch. The error message states that the two nodes that the launch file is supposed to run cannot be found in the package. The documentation can be found here.

minimal.launch and gmapping_demo.launch work without any errors.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-03-28 15:06:09 -0500

You need to source both. If something isn't defined in the workspace then it will be found the binary install.

edit flag offensive delete link more

Comments

How do I source both? If I source the workspace, then the binary doesnt work but if I source the binary, the workspace doesnt work.

pgigioli gravatar image pgigioli  ( 2016-03-28 15:13:10 -0500 )edit

In the standard ubuntu install for ROS it suggests you add the sourcing of the binary install to your .bashrc file, echo "source /opt/ros/indigo/setup.bash" >> ~/.bashrc

If you do then the binary install is sourced in each shell you open.

nickw gravatar image nickw  ( 2016-03-28 15:32:05 -0500 )edit

Then when you source the workspace it means it will be searched for files before searching the binary install location.

nickw gravatar image nickw  ( 2016-03-28 15:34:04 -0500 )edit

I already have that line in my ~/.bashrc. What's weird is that other binary launch files work such as turtlebot_bringup minimal.launch and turtlebot_navigation gmapping_demo. I think something is wrong with the binaries so I'm just going to reinstall from source into my catkin_ws

pgigioli gravatar image pgigioli  ( 2016-03-28 15:35:47 -0500 )edit

would need more specific details about package names, launch files and their contents - are all the things you are trying to get to work in the same name package, but some in your workspace, and some in /opt/ros ?

nickw gravatar image nickw  ( 2016-03-28 16:02:32 -0500 )edit

I updated the original question with specific details on the launch file I'm running. I have different packages, some from workspace and some from /opt/ros/, but one package cannot be run.

pgigioli gravatar image pgigioli  ( 2016-03-28 16:49:29 -0500 )edit

can you add the actual error message as I am still unclear which nodes cannot be located

nickw gravatar image nickw  ( 2016-03-28 17:40:31 -0500 )edit

I don't have access to my robot right now but the error message is something like "can't locate node [explore_client] in package [frontier_exploration]" and "can't locate node [explore_server] in package [frontier_exploration]."

pgigioli gravatar image pgigioli  ( 2016-03-28 20:19:11 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2016-03-28 14:47:15 -0500

Seen: 1,169 times

Last updated: Mar 28 '16