Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to recieve map using turtlebot and kinect

Im trying to use nav2d package with turtlebot and kinect to map an unknown room. But I couldn't recieve /map from Mapper node.

as you can see on my rqt_graph: image description

tf frame: image description

I can't use /StartMapping 3 and /StartExploration 2. These are the /map and the /Operator/local_map/costmap in RVIZ. image description image description

It has costmap, but has no map.

Here is my launch file:

<launch>

<rosparam file="$(find nav2d_tutorials)/param/ros.yaml"/>

<arg name="world_file" default="$(env TURTLEBOT_GAZEBO_WORLD_FILE)"/>

<arg name="base" value="$(optenv TURTLEBOT_BASE kobuki)"/>

 <arg name="battery"   value="$(optenv TURTLEBOT_BATTERY /proc/acpi/battery/BAT0)"/>   <!--/proc/acpi/battery/BAT0 --> 

  <arg name="gui" default="true"/> 

  <arg name="stacks"    value="$(optenv TURTLEBOT_STACKS hexagons)"/>  <!-- circles, hexagons --> 

  <arg name="3d_sensor" value="$(optenv TURTLEBOT_3D_SENSOR kinect)"/>  <!-- kinect, asus_xtion_pro --> 

  <include file="$(find gazebo_ros)/launch/empty_world.launch">

  <arg name="use_sim_time" value="true"/>

  <arg name="debug" value="false"/>

  <arg name="gui" value="$(arg gui)" />

  <arg name="world_name" value="$(arg world_file)"/>

  </include> 

  <include file="$(find turtlebot_gazebo)/launch/includes/$(arg base).launch.xml">

  <arg name="base" value="$(arg base)"/>

  <arg name="stacks" value="$(arg stacks)"/>

  <arg name="3d_sensor" value="$(arg 3d_sensor)"/>

  </include>

 <node pkg="robot_state_publisher" type="robot_state_publisher" name="robot_state_publisher">

       <param name="publish_frequency" type="double" value="30.0" />

 </node>

  <!-- Fake laser -->
  <node pkg="nodelet" type="nodelet" name="laserscan_nodelet_manager" args="manager"/>

  <node pkg="nodelet" type="nodelet" name="depthimage_to_laserscan"

           args="load depthimage_to_laserscan/DepthImageToLaserScanNodelet laserscan_nodelet_manager">

  <param name="scan_height" value="10"/>

  <param name="output_frame_id" value="/camera_depth_frame"/>   <!-- /camera_depth_frame -->

  <param name="range_min" value="0.45"/> 

  <remap from="image" to="/camera/depth/image_raw"/>

  <remap from="scan" to="base_scan"/>  <!-- <remap from="scan" to="base_scan"/>  -->

  </node>

<node name="Operator" pkg="nav2d_operator" type="operator" &gt;<="" p="">

<remap from="scan" to="base_scan"/>

<remap from="cmd_vel" to="cmd_vel_mux/input/teleop" />

<rosparam file="$(find nav2d_tutorials)/param/operator.yaml"/>

<rosparam file="$(find nav2d_tutorials)/param/costmap.yaml" ns="local_map" />

</node>

<node name="Mapper" pkg="nav2d_karto" type="mapper">

 <remap from="scan" to="base_scan"/>   

   <param name="base_frame" value="base_link"/>

<param name="odom_frame" value="odom"/>

<rosparam file="$(find nav2d_tutorials)/param/mapper.yaml"/>

</node>

<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 name="RVIZ" pkg="rviz" type="rviz" args=" -d $(find nav2d_tutorials)/param/tutorial3.rviz"/>

</launch>

ros.yaml:

#

laser_frame: base_laser_link

robot_frame: base_link

odometry_frame: odom

offset_frame: offset

map_frame: map

map_topic: map

laser_topic: scan

map_service: static_map

costmap.yaml:

global_frame: odom

robot_base_frame: base_link

update_frequency: 5.0

publish_frequency: 1.0

publish_voxel_map: true

static_map: false

rolling_window: true

width: 6.0

height: 6.0

resolution: 0.05

map_type: costmap

track_unknown_space: true

transform_tolerance: 0.3

obstacle_range: 4.0

min_obstacle_height: 0.0

max_obstacle_height: 2.0

raytrace_range: 4.5

robot_radius: 0.18 #turtlrbot radius

inflation_radius: 0.5 #origin 0.75

cost_scaling_factor: 2.0

lethal_cost_threshold: 100

observation_sources: scan

scan: {data_type: LaserScan, expected_update_rate: 0.4,

observation_persistence: 0.0, marking: true, clearing: true, max_obstacle_height: 0.4, min_obstacle_height: 0.08}

How to recieve map using turtlebot and kinect

Im trying to use nav2d package with turtlebot and kinect to map an unknown room. But I couldn't recieve /map from Mapper node.

as you can see on my rqt_graph: image description

tf frame: image description

I can't use /StartMapping 3 and /StartExploration 2. These are the /map and the /Operator/local_map/costmap in RVIZ. image description image description

It has costmap, but has no map.

Here is my launch file:

<launch>

<rosparam file="$(find nav2d_tutorials)/param/ros.yaml"/>

<arg name="world_file" default="$(env TURTLEBOT_GAZEBO_WORLD_FILE)"/>

<arg name="base" value="$(optenv TURTLEBOT_BASE kobuki)"/>

 

<arg name="battery" value="$(optenv TURTLEBOT_BATTERY /proc/acpi/battery/BAT0)"/> <!--/proc/acpi/battery/BAT0 -->

  <arg name="gui" default="true"/> 

  <arg name="stacks"    value="$(optenv TURTLEBOT_STACKS hexagons)"/>  <!-- circles, hexagons --> 

  <arg name="3d_sensor" value="$(optenv TURTLEBOT_3D_SENSOR kinect)"/>  <!-- kinect, asus_xtion_pro --> 

  <include file="$(find gazebo_ros)/launch/empty_world.launch">

  <arg name="use_sim_time" value="true"/>

  <arg name="debug" value="false"/>

  <arg name="gui" value="$(arg gui)" />

  <arg name="world_name" value="$(arg world_file)"/>

  </include> 

  <include file="$(find turtlebot_gazebo)/launch/includes/$(arg base).launch.xml">

  <arg name="base" value="$(arg base)"/>

  <arg name="stacks" value="$(arg stacks)"/>

  <arg name="3d_sensor" value="$(arg 3d_sensor)"/>

  </include>

 <node pkg="robot_state_publisher" type="robot_state_publisher" name="robot_state_publisher">

       <param name="publish_frequency" type="double" value="30.0" />

 </node>

  <!-- Fake laser -->
  <node pkg="nodelet" type="nodelet" name="laserscan_nodelet_manager" args="manager"/>

  <node pkg="nodelet" type="nodelet" name="depthimage_to_laserscan"

           args="load depthimage_to_laserscan/DepthImageToLaserScanNodelet laserscan_nodelet_manager">

  <param name="scan_height" value="10"/>

  <param name="output_frame_id" value="/camera_depth_frame"/>   <!-- /camera_depth_frame -->

  <param name="range_min" value="0.45"/> 

  <remap from="image" to="/camera/depth/image_raw"/>

  <remap from="scan" to="base_scan"/>  <!-- <remap from="scan" to="base_scan"/>  -->

  </node>

<node name="Operator" pkg="nav2d_operator" type="operator" &gt;<="" p="">

<remap from="scan" to="base_scan"/>

<remap from="cmd_vel" to="cmd_vel_mux/input/teleop" />

<rosparam file="$(find nav2d_tutorials)/param/operator.yaml"/>

<rosparam file="$(find nav2d_tutorials)/param/costmap.yaml" ns="local_map" />

</node>

<node name="Mapper" pkg="nav2d_karto" type="mapper">

 <remap from="scan" to="base_scan"/>   

   <param name="base_frame" value="base_link"/>

<param name="odom_frame" value="odom"/>

<rosparam file="$(find nav2d_tutorials)/param/mapper.yaml"/>

</node>

<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 name="RVIZ" pkg="rviz" type="rviz" args=" -d $(find nav2d_tutorials)/param/tutorial3.rviz"/>

</launch>

ros.yaml:

#

laser_frame: base_laser_link

robot_frame: base_link

odometry_frame: odom

offset_frame: offset

map_frame: map

map_topic: map

laser_topic: scan

map_service: static_map

costmap.yaml:

global_frame: odom

robot_base_frame: base_link

update_frequency: 5.0

publish_frequency: 1.0

publish_voxel_map: true

static_map: false

rolling_window: true

width: 6.0

height: 6.0

resolution: 0.05

map_type: costmap

track_unknown_space: true

transform_tolerance: 0.3

obstacle_range: 4.0

min_obstacle_height: 0.0

max_obstacle_height: 2.0

raytrace_range: 4.5

robot_radius: 0.18 #turtlrbot radius

inflation_radius: 0.5 #origin 0.75

cost_scaling_factor: 2.0

lethal_cost_threshold: 100

observation_sources: scan

scan: {data_type: LaserScan, expected_update_rate: 0.4,

observation_persistence: 0.0, marking: true, clearing: true, max_obstacle_height: 0.4, min_obstacle_height: 0.08}

How to recieve map using turtlebot and kinect

Im trying to use nav2d package with turtlebot and kinect to map an unknown room. But I couldn't recieve /map from Mapper node.

as you can see on my rqt_graph: image description

tf frame: image description

I can't use /StartMapping 3 and /StartExploration 2. These are the /map and the /Operator/local_map/costmap in RVIZ. image description image description

It has costmap, but has no map.

Here is my launch file:

 <launch>

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

nav2d_tutorials)/param/ros.yaml"/> <arg name="world_file" default="$(env TURTLEBOT_GAZEBO_WORLD_FILE)"/>

TURTLEBOT_GAZEBO_WORLD_FILE)"/> <arg name="base" value="$(optenv TURTLEBOT_BASE kobuki)"/>

<!--create, roomba --> <arg name="battery" value="$(optenv TURTLEBOT_BATTERY /proc/acpi/battery/BAT0)"/>

<!--/proc/acpi/battery/BAT0 --> 

      <arg name="gui" default="true"/> 

   <arg name="stacks"    value="$(optenv TURTLEBOT_STACKS hexagons)"/>  <!-- circles, hexagons --> 

   <arg name="3d_sensor" value="$(optenv TURTLEBOT_3D_SENSOR kinect)"/>  <!-- kinect, asus_xtion_pro --> 

   <include file="$(find gazebo_ros)/launch/empty_world.launch">

   <arg name="use_sim_time" value="true"/>

   <arg name="debug" value="false"/>

   <arg name="gui" value="$(arg gui)" />

   <arg name="world_name" value="$(arg world_file)"/>

   </include> 

   <include file="$(find turtlebot_gazebo)/launch/includes/$(arg base).launch.xml">

   <arg name="base" value="$(arg base)"/>

   <arg name="stacks" value="$(arg stacks)"/>

   <arg name="3d_sensor" value="$(arg 3d_sensor)"/>

   </include>

  <node pkg="robot_state_publisher" type="robot_state_publisher" name="robot_state_publisher">

        <param name="publish_frequency" type="double" value="30.0" />

  </node>

   <!-- Fake laser -->
   <node pkg="nodelet" type="nodelet" name="laserscan_nodelet_manager" args="manager"/>

   <node pkg="nodelet" type="nodelet" name="depthimage_to_laserscan"

            args="load depthimage_to_laserscan/DepthImageToLaserScanNodelet laserscan_nodelet_manager">

   <param name="scan_height" value="10"/>

   <param name="output_frame_id" value="/camera_depth_frame"/>   <!-- /camera_depth_frame -->

   <param name="range_min" value="0.45"/> 

   <remap from="image" to="/camera/depth/image_raw"/>

   <remap from="scan" to="base_scan"/>  <!-- <remap from="scan" to="base_scan"/>  -->

  </node>

</node> <!-- Start the Operator to control the simulated robot --> <node name="Operator" pkg="nav2d_operator" type="operator" &gt;<="" p="">

>

    <remap from="scan" to="base_scan"/>

 <remap from="cmd_vel" to="cmd_vel_mux/input/teleop" />

 <rosparam file="$(find nav2d_tutorials)/param/operator.yaml"/>

 <rosparam file="$(find nav2d_tutorials)/param/costmap.yaml" ns="local_map" />

</node>

</node> <!-- Start Mapper to genreate map from laser scans --> <node name="Mapper" pkg="nav2d_karto" type="mapper">

type="mapper">

     <remap from="scan" to="base_scan"/>   

    <param name="base_frame" value="base_link"/>

 <param name="odom_frame" value="odom"/>

 <rosparam file="$(find nav2d_tutorials)/param/mapper.yaml"/>

</node>

</node> <!-- Start the Navigator to move the robot autonomously --> <node name="Navigator" pkg="nav2d_navigator" type="navigator">

type="navigator">

    <rosparam file="$(find nav2d_tutorials)/param/navigator.yaml"/>

</node>

nav2d_tutorials)/param/navigator.yaml"/> </node> <node name="GetMap" pkg="nav2d_navigator" type="get_map_client"/>

type="get_map_client" /> <node name="Explore" pkg="nav2d_navigator" type="explore_client"/>

type="explore_client" /> <node name="SetGoal" pkg="nav2d_navigator" type="set_goal_client"/>

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>

nav2d_tutorials)/param/tutorial3.rviz" /> </launch>

ros.yaml:

#

laser_frame: base_laser_link

base_laser_link robot_frame: base_link

base_link odometry_frame: odom

odom offset_frame: offset

offset map_frame: map

map map_topic: map

map laser_topic: scan

map_service: static_map

static_map

costmap.yaml:

global_frame: odom

odom robot_base_frame: base_link

base_link update_frequency: 5.0

5.0 publish_frequency: 1.0

1.0 publish_voxel_map: true

true static_map: false

false rolling_window: true

true width: 6.0

6.0 height: 6.0

6.0 resolution: 0.05

0.05 map_type: costmap

costmap track_unknown_space: true

true transform_tolerance: 0.3

0.3 obstacle_range: 4.0

4.0 min_obstacle_height: 0.0

0.0 max_obstacle_height: 2.0

2.0 raytrace_range: 4.5

4.5 robot_radius: 0.18 #turtlrbot radius

radius inflation_radius: 0.5 #origin 0.75

0.75 cost_scaling_factor: 2.0

2.0 lethal_cost_threshold: 100

100 observation_sources: scan

scan scan: {data_type: LaserScan, expected_update_rate: 0.4,

0.4, observation_persistence: 0.0, marking: true, clearing: true, max_obstacle_height: 0.4, min_obstacle_height: 0.08}

0.08}