Navigation doesn't work when launching robot under a ns
Hey, I'm trying to get multi-robot simulations on noetic. I used to do it in melodic using tf_namespace but now that it has been removed in noetic I cannot run them and the PR for restoring tf_prefix if failing checks. When I launch a robot with navigation in gazebo without a ns, it works fine.
The output from tf2_tools view_frames
is -
The launch file is as follows -
<?xml version='1.0'?>
<launch>
<!-- <group ns="dbot"> -->
<arg name="x" default="0.0"/>
<arg name="y" default="0.0"/>
<arg name="z" default="0.0"/>
<param name="robot_description" command="$(find xacro)/xacro '$(find deliverybot_description)/urdf/dbot.xacro'"/>
<node name="dbot_spawn" pkg="gazebo_ros" type="spawn_model"
output="screen" args="-urdf -param robot_description -model dbot -x $(arg x) -y $(arg y) -z $(arg z)">
</node>
<node name="map_server" pkg="map_server" type="map_server" args="$(find deliverybot_navigation)/maps/willowgarage.yaml">
</node>
<include file="$(find deliverybot_control)/launch/deliverybot_controller.launch">
</include>
<include file="$(find deliverybot_control)/launch/deliverybot_hw_controller.launch">
</include>
<include file="$(find deliverybot_navigation)/launch/move_base.launch">
</include>
<!-- </group> -->
</launch>
Now if I put this in a group under a namespace, this is warning I get -
[ WARN] [1614769555.770850662, 5.008000000]: Timed out waiting for transform from base_link to map to become available before running costmap, tf error: canTransform: target_frame map does not exist.. canTransform returned after 0.101 timeout was 0.1.
and frames -
There is no map frame and the links connected to differential drive controller plugin come under a different namespace than the rest of the links.
How should I proceed?
I'm having a similar issue, have you been able to find a solution?
Nope. I had to go back to melodic. You can follow this Issue for noetic. Once it gets solved we'll be able to do it on noetic. I think it has been fixed on foxy.
I cloned the PR earlier, and it worked fine for the robot_state_publisher itself. My problem is more with the robot_localization not recognizing the namespaces, but it's probably a different issue. Thanks anyway