ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

julled's profile - activity

2015-06-26 03:37:46 -0500 received badge  Taxonomist
2014-07-06 12:50:36 -0500 received badge  Famous Question (source)
2014-06-24 16:49:17 -0500 received badge  Scholar (source)
2014-06-24 15:00:43 -0500 received badge  Notable Question (source)
2014-06-24 13:13:24 -0500 commented answer Gmapping stops updating map

Hey domhege, thank you for your answer! You can see a new EDIT at the question. gruß aus Berlin

2014-06-24 08:33:10 -0500 received badge  Popular Question (source)
2014-06-23 07:19:55 -0500 asked a question Gmapping stops updating map

Hey,

after finally getting deeper into ROS and understanding most of the things which are necessary for using the Gmapping-SLAM ( basics like tf, odom etc ) im now at the point of testing the whole thing. There is the Problem that Gmapping stops updating the map after serval scans. But first of all i want to give you a short overview:

What i want to do: Im trying to use a simulated 2D-Scanner in VREP as source for Gmapping.

Systemconfig: I use Groovy on a Ubuntu 12.04 LTS on a old IBM X41 Laptop (1.5Ghz Centrino SinglecoreCPU)

Progress:

  1. I transfered the /scan and /odom-Topic from VREP to ROS.
  2. I wrote some code (odom_baselink_tf.py) for tf of /base_link to /odom:
def metadata_odom(data):
    global p, q, info
    info = data
    p = data.pose.pose.position
    q = data.pose.pose.orientation
    rospy.loginfo(Received odom)
...
broadcaster.sendTransform(
  (p.x, p.y, 0), 
  (q.x, q.y, q.z, q.w),
  rosnow,
  base_lin,
  odom
  )

3 . I use a static tf transform between base_link and LaserScanner_Frame: rosrun tf static_transform_publisher 0 0 0 0 0 0 base_link LaserScanner_Frame 100

This results in the following tf-tree: image description

I use Gmapping with the following Settings:

    <param name="map_update_interval" value="2"/>  <!--2-->
    <param name="maxUrange" value="5.5"/> 
    <param name="sigma" value="0.05"/>
    <param name="kernelSize" value="1.0"/>
    <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.01"/>
    <param name="srt" value="0.02"/><!--1.0-->
    <param name="str" value="0.01"/>
    <param name="stt" value="0.02"/>
    <param name="linearUpdate" value="0.1"/>     
    <param name="angularUpdate" value="0.1"/>  
    <param name="temporalUpdate" value="-1.0"/> 
    <param name="resampleThreshold" value="0.5"/>
    <param name="particles" value="50"/>  <!--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.03"/>
    <param name="llsamplerange" value="0.01"/>
    <param name="llsamplestep" value="0.01"/>
    <param name="lasamplerange" value="0.005"/>
    <param name="lasamplestep" value="0.005"/>

But if i use these settings, there is the problem that Gmapping stops updating the map after serval scans. If i look at the SLAM-Debug-Messages there are serval odd messages:

update frame 7
update ld=0.0495583 ad=0.179583
Laser Pose= 13.7771 3.96148 -0.695156
m_count 7
[DEBUG] [1403512083.321312113]: TF operating on not fully resolved frame id base_link, resolving using local prefix 
[DEBUG] [1403512083.321624443]: TF operating on not fully resolved frame id odom, resolving using local prefix 
Average Scan Matching Score=164.656
neff= 49.8545
Registering Scans:Done
[DEBUG] [1403512083.931338640]: scan processed
[DEBUG] [1403512083.933940439]: new best pose: 13.752 3.943 -0.644
[DEBUG] [1403512083.935263651]: odom pose: 13.777 3.961 -0.695
[DEBUG] [1403512083.936265942]: correction: -0.025 -0.018 0.051
[DEBUG] [1403512083 ...
(more)
2014-05-20 02:11:57 -0500 received badge  Enthusiast
2014-05-15 14:09:53 -0500 received badge  Famous Question (source)
2014-05-15 12:23:50 -0500 commented question Wrong laserscan "mapping" in rvis

Anyone got a idea? I think the problem is frames / tf related but i cant find the error... view_frames output: http://i.imgur.com/VvhjkBf.png

2014-05-15 12:22:41 -0500 commented question Wrong laserscan "mapping" in rvis

Anyone got a idea? I think its frame / tf related but i cant find my error. view_frames output: http://i.imgur.com/VvhjkBf.png

2014-05-15 05:27:46 -0500 commented answer Wrong laserscan "mapping" in rvis

Thank you Isaac! I am running 1.8.17 rviz. Do you think it could be a frame related problem like tfoote thinks?

2014-05-15 05:17:56 -0500 commented answer Wrong laserscan "mapping" in rvis

Im not sure if i get the other question right, but you mean who does the transform from world to kinect? In Vrep its: simExtROS_enablePublisher('tf',1,simros_strmcmd_get_transform,kinect_visionSensor,kinect,'') simExtROS_enablePublisher('tf',1,simros_strmcmd_get_transform,kinect,-1 ,'') -1 is /world

2014-05-15 05:15:26 -0500 commented answer Wrong laserscan "mapping" in rvis

Thank you tfoote for your answer! view_frames output: http://i.imgur.com/VvhjkBf.png The rostopic echo of /scan reveals that the frameid is /kinect

2014-05-09 13:09:25 -0500 received badge  Notable Question (source)
2014-05-09 11:46:36 -0500 received badge  Nice Question (source)
2014-05-09 11:45:24 -0500 received badge  Popular Question (source)
2014-05-08 22:51:15 -0500 received badge  Supporter (source)
2014-05-08 22:47:57 -0500 received badge  Editor (source)
2014-05-08 20:55:34 -0500 received badge  Student (source)
2014-05-08 12:01:44 -0500 asked a question Wrong laserscan "mapping" in rvis

Hi everyone, im pretty new to ROS and i still haven't understand every bit of it. So there are still some things which are a bit strange to me. And i want to say sorry in advance for not writing the best english..

What i want to do: Im trying to use a simulated Kinect in VREP as source for a SLAM-Algorithm in ROS.

Systemconfig: I use Fuerte on a Ubuntu 12.04 LTS

Progress: I transfered the Kinect Pointcloud to ROS via a Topic and used the pointcloud_to_laserscan/CloudToScan nodelet to convert it to a fake-laserscan with the following script:

<launch>

 <!-- openni_manager -->
  <node pkg="nodelet" type="nodelet" name="openni_manager" output="screen" respawn="true" args="manager"/>

  <!-- throttling -->
  <node pkg="nodelet" type="nodelet" name="pointcloud_throttle" args="load pointcloud_to_laserscan/CloudThrottle openni_manager">
    <param name="max_rate" value="20"/>
    <remap from="cloud_in" to="/vrep/KinectPointCloud"/>
    <remap from="cloud_out" to="/cloud_throttled"/>
  </node>

  <!-- fake laser -->
  <node pkg="nodelet" type="nodelet" name="kinect_laser" args="load pointcloud_to_laserscan/CloudToScan openni_manager">
    <param name="output_frame_id" value="/kinect"/> <!-- Question1 -->
    <param name="min_height" value="-0.025"/>
    <param name="max_height" value="0.025"/>
    <remap from="cloud" to="/cloud_throttled"/>
  </node>
</launch>

But if i want to show the laserscan in rviz something strange happens to the pointcloud: (i put some decay on the laserscan to see multiple scans at once)

RVIZ Picture (thank you for the upvote, now i can post the picture)

It seems as the points arent mapped to the "real world". They are "rotating" with the Robot (Kinect). Shouldnt they normally stay at the objectpositions? I really think that the problem is tf-related... The tf-Tree is visible in the rviz screenshot. The /scan Topic (laserscantopic) is transformed via

rosrun tf static_transform_publisher  0 0 0 0 0 0 kinect_visionSensor scan 100

tf echo puts out:

---
transforms: 
  - 
    header: 
      seq: 0
      stamp: 
        secs: 1399584596
        nsecs: 289725537
      frame_id: /kinect
    child_frame_id: /kinect_visionSensor
    transform: 
      translation: 
        x: -0.0141000151634
        y: 0.0292500853539
        z: 0.0323894619942
      rotation: 
        x: 3.98174461205e-08
        y: 0.707106751384
        z: 0.707106810989
        w: -5.22563454972e-08
---
transforms: 
  - 
    header: 
      seq: 0
      stamp: 
        secs: 1399584596
        nsecs: 289725537
      frame_id: /world
    child_frame_id: /kinect
    transform: 
      translation: 
        x: 0.20544680953
        y: -0.454404950142
        z: 0.345994025469
      rotation: 
        x: 4.20090261606e-05
        y: 2.69500965001e-05
        z: -0.479030467743
        w: 0.877798273228
---
transforms: 
  - 
    header: 
      seq: 0
      stamp: 
        secs: 1399584596
        nsecs: 477231988
      frame_id: /kinect_visionSensor
    child_frame_id: /scan
    transform: 
      translation: 
        x: 0.0
        y: 0.0
        z: 0.0
      rotation: 
        x: 0.0
        y: 0.0
        z: 0.0
        w: 1.0
---

After that Messages there are multiple tf-messages just like the last one. After a few seconds the other two get a update.

Questions:

  1. Im not shure what the "output_frame_id" in the script should be. What should i put there?
  2. Is my tf-tree okey? Im really not that sure about that.
  3. fixed Frame = "/world" is ok for rviz?
  4. Do i need more tf-data from VREP?

I think i missed one little piece in the huge ros-puzzle... ?