I still don't know if I understood your question correctly, but here is how to use navigation & slam together for turtlebot 3 simulation:
Start the simulation as documented
export TURTLEBOT3_MODEL=waffle_pi
roslaunch turtlebot3_gazebo turtlebot3_house.launch
Start SLAM with gmapping as [documented]
(https://emanual.robotis.com/docs/en/p...):
export TURTLEBOT3_MODEL=burger
roslaunch turtlebot3_slam turtlebot3_slam.launch slam_methods:=gmapping
Start the navigation stack:
The documentation says to launch turtlebot3_navigation.launch but this requires a map parameter for the map_server and amcl. But we already have the map from SLAM/gmapping, so we copy turtlebot3_navigation.launch and remove the lines for amcl and map_server:
turtlebot3_navigation_nomap.launch:
<launch>
<!-- Arguments -->
<arg name="model" default="$(env TURTLEBOT3_MODEL)" doc="model type [burger, waffle, waffle_pi]"/>
<arg name="open_rviz" default="true"/>
<arg name="move_forward_only" default="false"/>
<!-- Turtlebot3 -->
<include file="$(find turtlebot3_bringup)/launch/turtlebot3_remote.launch">
<arg name="model" value="$(arg model)" />
</include>
<!-- move_base -->
<include file="$(find turtlebot3_navigation)/launch/move_base.launch">
<arg name="model" value="$(arg model)" />
<arg name="move_forward_only" value="$(arg move_forward_only)"/>
</include>
<!-- rviz -->
<group if="$(arg open_rviz)">
<node pkg="rviz" type="rviz" name="rviz" required="true"
args="-d $(find turtlebot3_navigation)/rviz/turtlebot3_navigation.rviz"/>
</group>
</launch>
and launch it:
export TURTLEBOT3_MODEL=burger
roslaunch turtlebot3_navigation turtlebot3_navigation_nomap.launch
Finally we can start rviz and can now set a goal position for the navigation stack.
You can configure the navigation stack global planner and global costmap to use odom instead of map as global frame, provided you have a painted floor plan. You could also use depthimage_to_laserscan for SLAM so you get a map. Or you can use rtabmap for SLAM.
can you please give me an example launch file of how to set this up? is there a similar turtle launch file I can refer to? I am so far not very sure about how each component should work with each other
Which version? 1) odom as global 2) depthimage_to_laserscan or 3) rtabmap?
I am on ROS noetic.
I meant: Which version do you want the example launch file for?
Oh I'd like to see an example of using odom as global so that I can run SLAM while planning.
Aah sorry, I misunderstood your question, so you are already creating the map with SLAM (e.g. gmapping) and have an area with unknown obstacles but still have a x/y coordinate for your robot to go to, is that correct? If not please rewrite your original question and add more details, e.g. node tree, launch files etc.
The global_planner has a parameter allow_unknown which might resolve your problem. But I have never used that it and have no experience with it.
You didn't misunderstand my question, I am not creating a map at all. All I want is to provide my robot with an RGB-D camera & a given goal location & its location relative to the goal. I want to let it navigate through an unknown space. So in short, using a SLAM package or not, I am not gonna create a map for the robot to use. I just need a ROS planner or a way to make this work.