Issue with stere_image_proc, stage and rviz not displaying PointCloud2

asked 2017-11-14 18:40:50 -0600

Devib gravatar image

Hi everyone!

My first question, hopefully not the last! I had to resort to asking something myself as I'm clueless when it comes to the issue.

Before jumping into real life scenarios I wanted to play around with virtual robot and cameras through stage to get a firm grasp of it. I was trying to simulate robot driving around the world with two cameras (mounted on top of each other) and I was thinking about using stereo_image_proc to display the pointclouds within Rviz. I have managed to successfully display the up / down camera along with disparity map:

https://i.imgur.com/MApfTHS.png

I thought that with no issues I will be able to utilise /points2 topic published by stereo_image_proc to display PointCloud2 within my rviz. And well, it does display points. Just one point to be precise. Placed at the top of the camera. I have also runrostopic echo /points2 which for some reason always results in the exact same data - no matter the movement of the robot.

Here are the snippets from my stage world file:

define cam1 camera
(
  resolution [ 320 200 ]
  range [ 0.2 10 ]
  fov [ 70.0 40.0 ]
  pantilt [0.0 0.0 ]
  color "green"
  size [ 0.01 0.01 0.01 ]
)

define cam2 camera
(
  resolution [ 320 200 ]
  range [ 0.2 10 ]
  fov [ 70.0 40.0 ]
  pantilt [0.0 0.0 ]
  color "green"
  size [ 0.01 0.01 0.01 ]
)
define rob position
(
  size [0.1 0.1 0.1]
  gui_nose 1
  drive "diff"
  [...]
  cam1(pose [ -0.03 0.0 0.02 0.0])
  cam2(pose [ -0.03 0.0 0.15 0.0])
)

Hopefully that explains the problem fully. If not, please let me know and I'll be happy to clarify. I would be extremely grateful for any help as honestly at this point I'm losing so much sleep over it.

edit retag flag offensive close merge delete

Comments

I've given you enough karma so you can attach the image directly to your post. In general we prefer that because imgur does not have infinite retention.

gvdhoorn gravatar imagegvdhoorn ( 2017-11-15 03:46:28 -0600 )edit