nav2d /StartExploration 2 fails (turtlebot2)
I'm trying to implement the nav2d autonomous mapping with my turtlebot2 using this tutorial but I am having issues with my navigator node. So far, I am able to run the rosservice call /StartMapping 3 successfully and an initial map is generated. But when I run rosservice call /StartExploration 2, nothing happens and I receive no errors. I even get the message "success: True; message: Send ExploreGoal to Navigator"
Also, the sending a goal manually using the "2D Nav Goal" tool in rviz works.
EDIT: Using the rqt_console while running the services I get "Navigator is now initialized" when I run /StartMapping 3 and when I run /StartExploration 2 it says "Exploration has finished" even though the robot doesn't move at all.
EDIT 2: I ran rostopic echo on the "/Explore/goal" msg when I run /StartExploration and it looks like the Explore node isn't sending any goal to the navigator. The output is:
header:
seq: 0
stamp:
secs: 1458916639
nsecs: 760211716
frame_id: map
goal_id:
stamp:
secs: 1458916639
nsecs: 760217219
id: /Explore-1-1458916639.760217219
goal:
---
EDIT 3:
Here is the image of the initial map that is created after running /StartMapping 3
Here is my rqt_graph:
Here is my tf view_frames pdf:
Here is my customized tutorial3 launch file:
<launch>
<!-- Some general parameters -->
<param name="use_sim_time" value="false" />
<rosparam file="$(find nav2d_tutorials)/param/ros.yaml"/>
<!-- Start the Operator to control the simulated robot -->
<node name="Operator" pkg="nav2d_operator" type="operator" >
<!-- <remap from="scan" to="base_scan"/> -->
<remap from="cmd_vel" to="mobile_base/commands/velocity"/>
<rosparam file="$(find nav2d_tutorials)/param/operator.yaml"/>
<rosparam file="$(find nav2d_tutorials)/param/costmap.yaml" ns="local_map" />
</node>
<!-- Start Mapper to genreate map from laser scans -->
<node name="Mapper" pkg="nav2d_karto" type="mapper">
<!-- <remap from="scan" to="base_scan"/> -->
<rosparam file="$(find nav2d_tutorials)/param/mapper.yaml"/>
</node>
<!-- Start the Navigator to move the robot autonomously -->
<node name="Navigator" pkg="nav2d_navigator" type="navigator">
<rosparam file="$(find nav2d_tutorials)/param/navigator.yaml"/>
</node>
<node name="GetMap" pkg="nav2d_navigator" type="get_map_client" />
<node name="Explore" pkg="nav2d_navigator" type="explore_client" />
<node name="SetGoal" pkg="nav2d_navigator" type="set_goal_client" >
</node>
</launch>
And here is my launch file to start up the robot with the laser scanner and minimal.launch:
<launch>
<include file="$(find turtlebot_bringup)/launch/minimal.launch"/>
<arg name="custom_param_file" default="$(find turtlebot_navigation)/param/dummy.yaml"/>
<include file="$(find turtlebot_bringup)/launch/3dsensor.launch">
<arg name="rgb_processing" value="false" />
<arg name="depth_registration" value="false" />
<arg name="depth_processing" value="false" />
<!-- We must specify an absolute topic name because if not it will be prefixed by "$(arg camera)".
Probably is a bug in the nodelet manager: https://github.com/ros/nodelet_core/issues/7 -->
<arg name="scan_topic" value="/scan" />
</include>
</launch>
Can anyone help me out?
I am facing the same problem of map not getting published. How did you resolve it? Could you please help out?
I actually was never able to get nav2d working. Instead, I used the frontier_exploration package combined with standard gmapping to get autonomous mapping to work.