Robotics StackExchange | Archived questions

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

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:

arcws/src/arcnavigation/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 arcws/devel/setup.bash" , and then I launch this same launch file as before, suddenly the movebase 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 arcbehaviour, and arcstage, are my own custom nodes, where as arcnavigation contains the launch file that launches the navigation stack/movebase.

IN SUMMARY:

If I source /opt/ros/kinetic/setup.bash, then I can't load my local nodes arcbehaviour, and arcstage, because ROSPACKAGEPATH 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 ROSPACKAGEPATH=$ROSPACKAGEPATH:/pathtomyworkspace/arcws/src movebase 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.

Asked by greyeverest on 2017-02-21 13:24:16 UTC

Comments

Answers