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

simulating openni in fuerte

asked 2012-05-16 11:58:28 -0600

seth_g gravatar image

updated 2016-10-24 09:01:19 -0600

ngrennan gravatar image

I've recently made the shift to ROS fuerte and have been in the process of upgrading my simulated models and sensors. Our robot model can use both the XBOX Kinect and the ASUS Xtion. I can bring up both the camera and pointcloud when using a real Kinect/ASUS, but I can't seem to bring up the pointcloud in a simulated environment even though I can pull up the camera no problem. I also can't get the (simulated) PR2 to bring up a pointcloud.

Can someone offer some guidance on simulating the pointcloud?

EDIT 1: I guess I should add that I can echo the /kinect/depth/points topic and see the data but neither the data or messages are received in RVIZ to visualize the points.

EDIT 2: After some digging, it seems it may be an issue with the new Gazebo. Which would make sense if openni works with the physical Kinect but not with a simulated one. Here are some warnings I get when subscribing to the pointcloud in RVIZ:

[ WARN] [1337265919.848795162, 213.880000000]: MessageFilter [target=/base_link ]: Discarding message from [/gazebo] due to empty frame_id.  This message will only print once.

However, when I echo my points topic, the correct frame_id shows up.

Thanks, Seth

edit retag flag offensive close merge delete

Comments

Do you get any errors in rviz when you try to subscribe to those PointCloud2 topics (red status header)? Is there a path in your tf tree between your Kinect's points frame_id and your fixed_frame in rviz?

Eric Perko gravatar image Eric Perko  ( 2012-05-16 14:47:31 -0600 )edit

Yes to both questions. When I subscribe to the topic the drop-down list of errors shows points: [0] points from [0] messages; topic: no messages received; transform [sender=/gazebo] for frame [] Frame [] does no exist. I'm confused on the tf frame error because I can trace the path through the tree

seth_g gravatar image seth_g  ( 2012-05-17 03:55:05 -0600 )edit

What is your fixed_frame and target_frame set to in Rviz (especially - is your fixed_frame empty)? Could you include a snippet from rostopic echo /kinect/depth/points/header? Does the rgb/points topic work in rviz (check the header there as well to see if they are different).

Eric Perko gravatar image Eric Perko  ( 2012-05-17 05:32:25 -0600 )edit

Topic no longer has the frame_id, I may have been looking at the wrong topic when I reported that earlier. fixed and target frame are both base_link, I've also tried fixed_frame as kinect_link since it is the parent of kinect_optical_link. None of the /points topics seem to have a frame_id.

seth_g gravatar image seth_g  ( 2012-05-17 08:42:28 -0600 )edit

That would be the source of your problem. I don't know what Gazebo plugin actually simulates those topics/publishes them, but not having any frame_id at all is definitely a bug. Perhaps it's a parameter that doesn't have a non-empty default?

Eric Perko gravatar image Eric Perko  ( 2012-05-17 08:50:56 -0600 )edit

After I posted that last comment I went through the controller plugin and noticed that the frame_name_ is never set which down the road sets frame_id. I'll look for any parameters on that. I'll also go through all openni_launch calls. If I find a patch or answer then I'll post it here. Thanks Eric.

seth_g gravatar image seth_g  ( 2012-05-17 09:05:12 -0600 )edit

I suggest you file a ticket against whichever package contains that gazebo plugin and then post the link to the ticket as the answer. This way, people can still find the solution (when the ticket is closed) and the problem will be tracked and not forgotten :)

Eric Perko gravatar image Eric Perko  ( 2012-05-18 02:44:41 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
6

answered 2012-05-22 10:44:30 -0600

seth_g gravatar image

After digging I found that a header was not being copied over properly. Once I did a checkout of the source to create a patch, I found that it had been patched a few days ago (revision 39360).

..sigh..

Here is the bug report.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2012-05-16 11:58:28 -0600

Seen: 868 times

Last updated: May 22 '12