Unable to generate a map using hector slam and gmapping in <osrf/car_demo> simulation

asked 2018-07-03 04:12:57 -0500

Please have a look at both codes i.e, hectorslam and gmapping. i am also attaching computational graph and tree for clarification. Problem is map is received when we are using hector_slam. but map is getting add up to one place. for this also i am providing a link of the screenshot of my desktop.

[Screenshot of desktop]

( https://drive.google.com/open?id=1uV5... )

[Rqt_graph]

( https://drive.google.com/open?id=1hky... )

[tf_tree]

( https://drive.google.com/open?id=1PKe... )

Hector slam

<launch> <arg name="model" default="$(find prius_description)/urdf/prius.urdf"/> <arg name="rvizconfig" default="$(find car_demo)/rviz/demo.rviz"/>

<include file="$(find gazebo_ros)/launch/empty_world.launch"> <arg name="verbose" value="true"/> <arg name="world_name" value="$(find car_demo)/worlds/mcity.world"/> </include>

<node pkg="hector_mapping" type="hector_mapping" name="hector_mapping" output="screen">

    <param name="scan_topic" value="/prius/front_left_laser/scan"/>
    <param name="scan_topic" value="/prius/front_right_laser/scan"/>


    <param name="use_tf_scan_transformation" value="true"/>
    <param name="use_tf_pose_start_estimate" value="false"/>
    <param name="pub_map_odom_transform" value="true"/>

    <param name="map_resolution" value="0.025"/>
    <param name="map_size" value="20000"/>
    <param name="map_start_x" value="0.5"/>
    <param name="map_start_y" value="0.5"/>
    <param name="map_multi_res_levels" value="4"/>

    <param name="update_factor_free" value="0.4"/>
    <param name="update_factor_occupied" value="0.9"/>
    <param name="map_update_distance_thresh" value="0.4"/>
    <param name="map_update_angle_thresh" value="0.06"/>
    <param name="map_pub_period" value="2.0"/>
    <param name="advertise_map_service" value="false"/>

</node>

<node pkg="robot_state_publisher" type="robot_state_publisher" name="robot_state_publisher" &gt;="" <!--="" <remap="" from="robot_description" to="different_robot_description"/> --> </node> <node pkg="tf2_ros" type="static_transform_publisher" name="very_inaccurate_odom" args="0 0 0 0 0 0 odom base_link"/> <node pkg="car_demo" type="joystick_translator" name="joystick_translator"/>

<node pkg="joy" type="joy_node" name="joy_node0"> </node> <node pkg="joy" type="joy_node" name="joy_node1"> </node>

<node name="spawn_urdf" pkg="gazebo_ros" type="spawn_model" args="-param robot_description -urdf -x 3 -y -12 -z 0.5 -model prius"/>

<node name="rviz" pkg="rviz" type="rviz" args="-d $(arg rvizconfig)" required="true"/> </launch>

Gmapping

<launch> <arg name="model" default="$(find prius_description)/urdf/prius.urdf"/> <arg name="rvizconfig" default="$(find car_demo)/rviz/demo.rviz"/>

<include file="$(find gazebo_ros)/launch/empty_world.launch"> <arg name="verbose" value="true"/> <arg name="world_name" value="$(find car_demo)/worlds/mcity.world"/> </include>

<node pkg="gmapping" type="slam_gmapping" name="slam_gmapping" output="screen"> <remap from="scan" to="/prius/front_left_laser/scan"/>

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


<param name="map_update_interval" value="5.0"/>
<param name="maxUrange" value="16.0"/>
<param name="maxRange" value="60.0"/>
<param name="sigma" value="0.05"/>
<param name="kernelSize" value="1"/>
<param name="lstep" value="0.05"/>
<param name="astep" value="0.05"/>
<param name="iterations" value="5"/>
<param name="lsigma" value="0.075"/>
<param name="ogain" value="3.0"/>
<param name="lskip" value="0"/>
<param name="srr" value="0.1"/>
<param name="srt" value="0.2"/>
<param name="str" value="0.1"/>
<param name="stt" value="0.2"/>
<param name="linearUpdate" value="1.0"/>
<param name="angularUpdate" value="0.5"/>
<param name="temporalUpdate" value="3.0"/>
<param name="resampleThreshold" value="0.5"/>
<param name="particles" value="30"/>
<param name="xmin" value="-50.0"/>
<param name ...
(more)
edit retag flag offensive close merge delete