Gmapping map not received even after taking steps suggested in other forums

asked 2021-07-17 14:47:25 -0500

Yokai- gravatar image

So, I can see it is a very common topic where people can't generate the map due to "map not received". I went through all the answers and comments, applied them but still my map is not generated and map is not received. May be I'm can't understand the problem.Please go easy on me, I'm new and only reposting as I couldn't figure it out.

I designed my own robot with a lidar and a kinect. The lasescan works just fine, and here is the plugin file which is being currently used:

<robot <a="" href="http://xmlns:xacro="http://www.ros.org/wiki/xacro" name="pathfinder">xmlns:xacro="http://www.ros.org/wiki/..." ><="" p=""> </robot>

<xacro:property name="body_color" value="Gazebo/Silver"/>

<gazebo> <plugin filename="libgazebo_ros_control.so" name="control"/> </gazebo>

<gazebo> <plugin name="skid_steer_drive_controller" filename="libgazebo_ros_skid_steer_drive.so"> <updaterate>10.0</updaterate> <robotnamespace>/</robotnamespace> <leftfrontjoint>ll_motor</leftfrontjoint> <rightfrontjoint>fr_motor</rightfrontjoint> <leftrearjoint>rl_motor</leftrearjoint> <rightrearjoint>rr_motor</rightrearjoint>

<robotBaseFrame>base_link</robotBaseFrame>
<torque>20</torque>
<topicName>cmd_vel</topicName>
<broadcastTF>false</broadcastTF>

</plugin> </gazebo>

<gazebo reference="lidar_link_1"> <sensor type="ray" name="rplidar"> <pose>0 0 0 0 0 0</pose> <visualize>false</visualize> <update_rate>10</update_rate> <ray> <scan> <horizontal> <samples>720</samples> <resolution>1</resolution> <min_angle>-3.14159</min_angle> <max_angle>3.14159</max_angle> </horizontal> </scan> <range> <min>0.10</min> <max>20.0</max> <resolution>0.01</resolution> </range> <noise> <type>gaussian</type> <mean>0.0</mean> <stddev>0.01</stddev> </noise> </ray> <plugin name="gazebo_ros_head_hokuyo_controller" filename="libgazebo_ros_laser.so"> <topicname>/scan</topicname> <framename>lidar_link_1</framename> </plugin> </sensor> </gazebo>

</robot>

Here is the Rviz launch file:

<launch> <arg default="$(find pathfinder_description)/urdf/pathfinder.xacro" name="model"/> <arg default="true" name="gui"/> <arg default="$(find pathfinder_description)/launch/urdf.rviz" name="rvizconfig"/> <node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher"/>

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

and after installing gmapping and slam gmapping, I ran the simulation, opened up rviz and added laserScan and then ran the following command:

rosrun gmapping slam_gmapping scan:= /scan # as scan is the topic by laser scan is publishing too.

And no matter how many times I run it, even adding additional values such as odom , it shows the same "map not received" error.

I have literally went through all the answers regarding this issue in the forum but none seemed to help. Please help me find my mistake.

edit retag flag offensive close merge delete