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)
(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:
- Im not shure what the "output_frame_id" in the script should be. What should i put there?
- Is my tf-tree okey? Im really not that sure about that.
- fixed Frame = "/world" is ok for rviz?
- Do i need more tf-data from VREP?
I think i missed one little piece in the huge ros-puzzle... ?
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
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