ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I've solved using gmapping instead of nav2d. And also, I changed "static_map" to "dynamic_map" in ros.yaml. I'm using Turtlebot3 simulation. But it couldn't create all map in turtlebot3_house.launch environment. I think, the area of world is big. Robot sometimes lost . Maybe costmap parameters can be tunning.

This is main launch file:

<launch>

<!-- Some general parameters -->
<param name="use_sim_time" value="true" />
<param name="/laser_frame" value="base_footprint" />
<rosparam file="$(find nav2d_tutorials)/param/ros.yaml"/>

<!-- Turtlebot3 -->
<arg name="model" default="$(env TURTLEBOT3_MODEL)" doc="model type [burger, waffle, waffle_pi]"/>

<include file="$(find turtlebot3_bringup)/launch/turtlebot3_remote.launch">
    <arg name="model" value="$(arg model)" />
</include>

<!-- Start Gazebo simulator with a given environment -->
<include file="$(find turtlebot3_gazebo)/launch/turtlebot3_house.launch"></include>

<!-- Start Stage simulator with a given environment >
<node name="Stage" pkg="stage_ros" type="stageros" args="$(find nav2d_tutorials)/world/tutorial.world">
    <param name="base_watchdog_timeout" value="0" />
</node-->

<!-- Start the Operator to control the simulated robot -->
<node name="Operator" pkg="nav2d_operator" type="operator" >
    <!--remap from="/base_scan" to="/scan"/-->
    <rosparam file="$(find nav2d_tutorials)/param/operator.yaml"/>
    <rosparam file="$(find nav2d_tutorials)/param/costmap.yaml" ns="local_map" />
</node>

<!--SLAM: Gmapping, Cartographer, Hector, Karto, Frontier_exploration, RTAB-Map -->
<include file="$(find turtlebot3_slam)/launch/turtlebot3_gmapping.launch">
    <rosparam file="$(find nav2d_launch)/param/mapper.yaml"/>
</include>

<!-- 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" />

<!-- RVIZ to view the visualization -->
<node name="RVIZ" pkg="rviz" type="rviz" args=" -d $(find nav2d_tutorials)/param/tutorial3.rviz" />

</launch>

This is ros.yaml file:

###########################################################
# Defines topics services and frames for all modules

### TF frames #############################################
laser_frame: base_laser_link
robot_frame: base_link
odometry_frame: odom
offset_frame: offset
map_frame: map

### ROS topics ############################################
map_topic: map
laser_topic: scan ## ORIG = base_scan

### ROS services ##########################################
map_service: dynamic_map # static_map