slam and rosserial problem

asked 2016-07-25 05:22:32 -0600

ghaith gravatar image

updated 2016-07-27 15:36:22 -0600

hi

i am trying to build map using my robot and it have the following:

1- arduino mega 2560.

2- mpu 6050 connected to mega.

3- motor and encoder.

4- ROS version is indigo.

5-bud rate is 115200.

6- publish rate in ros is 10hz.

the problem is when i launch rosserial no problem occur ,and when launch the base_controller launch and drive the robot no problem occur, but if i launch the slam this problem will occur:

[WARN] [WallTime: 1469440700.533521] Serial Port read returned short (expected 313 bytes, received 120 instead). [WARN] [WallTime: 1469440700.534025] Serial Port read failure: [INFO] [WallTime: 1469440700.534481] Packet Failed : Failed to read msg data [INFO] [WallTime: 1469440700.534846] msg len is 313 [INFO] [WallTime: 1469440700.600580] Setup publisher on rpm [geometry_msgs/Vector3Stamped] [INFO] [WallTime: 1469440700.629758] Setup publisher on imu_data [sensor_msgs/Imu]

and i try to change the publish rate in hz nothing will solve it i asked this question about 5 time and no one give me answer so please help me with this.

more information i hope it will help to solve the problem: slam launch:

<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="5"/>
    <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="100"/>
    <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.4"/>
    <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>

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

this the arduino usage:

Sketch uses 26,028 bytes (10%) of program storage space. Maximum is 253,952 bytes. Global variables use 3,252 bytes (39%) of dynamic memory, leaving 4,940 bytes for local variables. Maximum is 8,192 bytes.

and no problem occur with tf tree image description

and i tried to increase the buffer to 1024 for publisher and 512 for subscriber ,but this not solve this problem.

i hope any one help me to solve this problem it take alot of time from me. thanks.

edit retag flag offensive close merge delete