Ask Your Question
0

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

asked 2016-05-20 13:11:31 -0500

ElizabethA gravatar image

updated 2016-05-20 16:12:04 -0500

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:

roslaunch-deps -v /opt/ros/indigo/share/turtlebot_navigation/launch/amcl_demo.launch

where I see lines such as: turtlebot_navigation [/opt/ros/indigo/share/turtlebot_navigation/launch/amcl_demo.launch]

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 flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2016-08-12 11:19:23 -0500

ElizabethA gravatar image

updated 2016-08-13 03:36:16 -0500

gvdhoorn gravatar image

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
  2. Edit your code how you want, add messages, etc.
  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.)

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2016-05-20 13:11:31 -0500

Seen: 244 times

Last updated: Aug 13 '16