no map and odom received in using slam gmapping

asked 2015-12-10 04:26:03 -0600

M.Ahmed gravatar image

i folloed book "learn ros for robotics programming second edition".and i use slam gmapping to build map.i move my robot in gazebo with skidsteer plugnin and no odometry and map received at RVIZ.and there is also no tf between base_link and odom.where is issue. here is my launch file and skid steer plugin code..plz help me

launch File <launch>

<include file="$(find gazebo_ros)/launch/willowgarage_world.launch"/> <arg name="model" default="$(find se2)/urdf/robot1_base_03.xacro"/>

<node name="joint_state_publisher" pkg="joint_state_publisher" type="joint_state_publisher" &gt;<="" node=""> <node pkg="robot_state_publisher" type="robot_state_publisher" name="robot_state_publisher" output="screen" &gt;="" <param="" name="publish_frequency" type="double" value="50.0"/> </node>

<node name="spawn_robot" pkg="gazebo_ros" type="spawn_model" args="-urdf -param robot_description -z 0.1 -model robot_model" respawn="false" output="screen"/>

<node name="rviz" pkg="rviz" type="rviz" args="-d $(find se2)/launch/mapping.rviz"/> <node name="slam_gmapping" pkg="gmapping" type="slam_gmapping"> <remap from="scan" to="/robot/laser/scan"/>

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

</node>

</launch>

Skid Steer plugin in my xacro file

<gazebo> <plugin name="skid_steer_drive_controller" filename="libgazebo_ros_skid_steer_drive.so"> <updaterate>100.0</updaterate> <robotnamespace>/</robotnamespace> <leftfrontjoint>base_to_wheel1</leftfrontjoint> <rightfrontjoint>base_to_wheel3</rightfrontjoint> <leftrearjoint>base_to_wheel2</leftrearjoint> <rightrearjoint>base_to_wheel4</rightrearjoint> <wheelseparation>4</wheelseparation> <wheeldiameter>0.1</wheeldiameter> <robotbaseframe>base_link</robotbaseframe> <torque>1</torque> <commandtopic>nav_msgs</commandtopic> <odometryframe>base_footprint</odometryframe> <odometrytopic>odom</odometrytopic> <topicname>cmd_vel</topicname> <broadcasttf>0</broadcasttf> </plugin> </gazebo>

edit retag flag offensive close merge delete