ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A answers.ros.org

Do I need to edit CMake_Prefix_Path to point turtlebot_navigation at a different version of a package?

Grasping at straws here -

I'm using Indigo and I've made an overlay of the AMCL package. The path to it is in ROS_PACKAGE_PATH, and when I "roscd amcl", it takes me to the overlay directory. So far, so good.

One of the dependencies of turtlebot_navigation is AMCL, and I want turtlebot_navigation to start using my overlay for AMCL. Even after "sourcing" my overlay, when I run "roslaunch turtlebot_gazebo amcl_demo.launch", it's evident that I'm hitting the usual location of AMCL (/opt/ros/indigo/share/turtlebot_navigation), and not my overlay with some changes to the code. This has also been verified from the output of:

What I've Tried: I've edited the amcl.launch.xml of turtlebot_navigation like so for the part that starts up the AMCL node: <node pkg="$(find amcl)" type="amcl" name="amcl"> hoping that the "$(find amcl)" would pick up whatever it is that "roscd" is picking up that lets it know that AMCL should be found in my overlay folder. This results in the following error:

ERROR: cannot launch node of type [/home/ebrenna8/Overlays/src/amcl]: /home/ebrenna8/Overlays/src/ ROS path [0]=/opt/ros/indigo/share/ros ROS path[1]=/home/ebrenna8/Overlays/src ROS path[2]=/opt/ros/indigo/share ROS path[3]=/opt/ros/indigo/stacks

which I've looked up and appears to mean that it can't find an executable by that name.

*Does anyone have ideas on what I need to do to get turtlebot_navigation to look to my Overlays folder instead of the original? I'm looking at modifying environment variables like CMake_Prefix_Path now. *

Let me know if I should provide additional information.

edit retag close merge delete

Sort by » oldest newest most voted

I was going about this the wrong way. One thing I learned is that my comments in the code (which I wasn't seeing on the screen initially) WERE being published, but I had to add --screen to see my comments:

roslaunch turtlebot_gazebo amcl_demo.launch (map file path) --screen


Another thing I learned is that by sourcing the overlay folder, I was adding my custom AMCL to the front of the classpath, and the overlay was being used the whole time. I discovered this by adding a custom message to the class, and then seeing what was published when I ran AMCL via rostopic list.

So. To do an overlay:

1. Make a workspace/package and get the code from GitHub
3. Do source <path to workspace>/devel/setup.bash
4. Run your normal launch file.

When the launch file looks for a package in the classpath, it will find your overlay (as long as you 'source' beforehand within the same terminal.)

more