the tf transform of gmapping

asked 2019-10-11 03:18:10 -0600

Crowdeal gravatar image

updated 2019-10-11 04:13:15 -0600

Hello everyone!

I am a new to Ros

sorry for my bad english

I have a problem about gmapping

and i use rplidar

my goal is using raspberry pi about building a map and control my robot to navigate

I got some trouble

I want to know how to link my odom and base_footprint

follwing is my all launch file and tf !

rplidar.launch

  <launch>
  <node name="rplidarNode"          pkg="rplidar_ros"  type="rplidarNode" output="screen">
  <param name="serial_port"         type="string" value="/dev/ttyUSB0"/>
  <param name="serial_baudrate"     type="int"    value="115200"/><!--A1/A2 -->
  <!--param name="serial_baudrate"     type="int"    value="256000"--><!--A3 -->
  <param name="frame_id"            type="string" value="laser"/>
  <param name="inverted"            type="bool"   value="false"/>
  <param name="angle_compensate"    type="bool"   v
  <!--param name="serial_baudrate"     type="int"    value="256000"--><!--A3 -->
  <param name="frame_id"            type="string" value="laser"/>
  <param name="inverted"            type="bool"   value="false"/>
  <param name="angle_compensate"    type="bool"   value="true"/>
  </node>
<node pkg="tf" type="static_transform_publisher" name="base_to_laser" args="0.0 0.0 0.18 0.0 0.0 0.0 base_link laser 100"/>
<node pkg="tf" type="static_transform_publisher" name="base_link_footprint" args="0.0 0.0 z 0.0 0.0 0.0 base_footprint  base_link 100"/>

</launch>

slam_gmapping_pr2.launch

<launch>
    <param name="use_sim_time" value="false"/>
    <node pkg="gmapping" type="slam_gmapping" name="slam_gmapping" output="screen">
      <remap from="scan" to="base_scan"/>
      <param name="map_update_interval" value="5.0"/>
      <param name="maxUrange" value="16.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="ymin" value="-50.0"/>
      <param name="xmax" value="50.0"/>
      <param name="ymax" value="50.0"/>
      <param name="delta" value="0.05"/>
      <param name="llsamplerange" value="0.01"/>
      <param name="llsamplestep" value="0.01"/>
      <param name="lasamplerange" value="0.005"/>
      <param name="lasamplestep" value="0.005"/>
    </node>
</launch>

TF TREE

rqt_graph

rqt_graph(all)

tf_tree

thank u guys

edit retag flag offensive close merge delete

Comments

1

If you look at documentation, you can see that you can provide frames as params. But you are missing link between odom -> base_link. For that you can use robot_localization.

Choco93 gravatar image Choco93  ( 2019-10-11 05:05:01 -0600 )edit

Thank u bro I will try it!

Crowdeal gravatar image Crowdeal  ( 2019-10-12 00:39:16 -0600 )edit