two problem arduino and slam

asked 2016-07-17 10:58:25 -0500

ghaith gravatar image

updated 2016-07-18 05:44:01 -0500

hi i am using arduino mega2650 and ros indigo.I have arduino code work in rosserial it's implement the following: 1- publish encoder data. 2-publish imu data. i think the freq is 400k-200k hz. 3- subscribe to cmd_vel topic. first problem: now when i am trying to build the map i launch all the node after some time like 2-3 min , i receive this warn :

[WARN] [WallTime: 1468770290.894770] Serial Port read returned short (expected 313 bytes, received 165 instead).

[WARN] [WallTime: 1468770290.895316] Serial Port read failure:

[INFO] [WallTime: 1468770290.895767] Packet Failed : Failed to read msg data

[INFO] [WallTime: 1468770290.896034] msg len is 313

i try to increase the size of publish buffer this reduce the error but still i have this msg after some time and try to reduce frequency of imu to 100khz and not work. and i try reduce bud rate from 115200 to 57600 also not work.

second problem: this problem in slam or gmapping parameter i have this launch :


<include file="$(find beginner_tutorials)/launch/view_mobile_robot.launch"/>

<node pkg="gmapping" type="slam_gmapping" name="slam_gmapping" output="screen">

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

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

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

    <param name="map_update_interval" value="1"/>

    <param name="maxUrange" value="4.5"/>

    <!--param name="maxRange" value="4.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="minimumScore" value="50"/>

    <param name="srr" value="0.01"/>

    <param name="srt" value="0.02"/>

    <param name="str" value="0.01"/>

    <param name="stt" value="0.02"/>

    <param name="linearUpdate" value="0.5"/>

    <param name="angularUpdate" value="0.4"/>

    <param name="temporalUpdate" value="-1.0"/>

    <param name="resampleThreshold" value="0.5"/>

    <param name="particles" value="80"/>

    <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"/>

    <param name="transform_publish_period" value="0.1"/>


<node pkg="rviz" name="rviz" type="rviz" args="-d $(find beginner_tutorials)/launch/rviz/slam.rviz"/>


when i try to git update like every 20 degree or 30degree the map not update if any one can explaine why the update is to late and if i am doing something wrong how i can solve it.

thanks for your help.

edit retag flag offensive close merge delete