move_base: does not publish/subscribe anything when roslaunch from local catkin workspace

asked 2017-02-21 12:24:16 -0600

greyeverest gravatar image

Hello all. I'm having trouble getting my own local nodes (in a catkin workspace called arc_ws) to run with the navigation stack.

I have a slightly modified launch file from navigation_stage/launch. It looks as follows:

arc_ws/src/arc_navigation/launch/default.launch:

<launch>
<param name="/use_sim_time" value="true"/>
<include file="$(find navigation_stage)/move_base_config/move_base.xml"/>
<node name="map_server" pkg="map_server" type="map_server" args="$(find navigation_stage)/stage_config/maps/willow-full.pgm 0.1" respawn="false" />
<node pkg="stage_ros" type="stageros" name="stageros" args="$(find navigation_stage)/stage_config/worlds/arc_world.world" respawn="false" >
<param name="base_watchdog_timeout" value="0.2"/></node>
<node name="fake_localization" pkg="fake_localization" type="fake_localization" respawn="false" />
<node name="rviz" pkg="rviz" type="rviz" args="-d $(find navigation_stage)/single_robot.rviz" />
</launch>

This is inside my local catkin workspace. If I run: source /opt/ros/kinetic/setup.bash and then roslaunch on this file, everything shows up fine

The problem, is that if I source my local catkin workspace, by doing: "source arc_ws/devel/setup.bash" , and then I launch this same launch file as before, suddenly the move_base node is NOT publishing/subscribing to anything that it should be (ex: costmap)

I'm using the navigation stack as part of a bigger project, so I need to be able to have a larger launch file such as this:

<launch>
    <include file="$(find arc_behaviour)/launch/default.launch" />-->
    <include file="$(find arc_navigation)/launch/default.launch" /> 
    <include file="$(find arc_stage)/launch/default.launch" />
</launch>

The arc_behaviour, and arc_stage, are my own custom nodes, where as arc_navigation contains the launch file that launches the navigation stack/move_base.

IN SUMMARY:

If I source /opt/ros/kinetic/setup.bash, then I can't load my local nodes arc_behaviour, and arc_stage, because ROS_PACKAGE_PATH doesn't include my local directory....

BUT if I source my local workspace, then everything loads... but move_base doesn't seem to be publishing anything (ex: costmap data)...

Even if I manually export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:/pathtomyworkspace/arc_ws/src move_base will still not publish/subscribe.... I can only get it to work if I explicitly source /opt/ros/kinetic/setup.bash, and ONLY that. I've spent hours on this and can't figure out where I'm going wrong. It must be a namespace issue or something, but I can't figure out how to run both my local nodes and the ros move_base at the same time. Any guidance would be greatly appreciated, thanks all.

edit retag flag offensive close merge delete