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

Visualize a .ply file with a pointcloud in Rviz

asked 2015-02-17 03:15:26 -0600

JacoPisa gravatar image

updated 2015-02-17 03:47:46 -0600

Hi everybody,

i'm looking for a method that could help me visualize a pointcloud in .ply format, saved from LSD (pressing the "p" while it is mapping) in Rviz. did somebody could help me? thanks

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2015-02-17 03:55:43 -0600

Please read the last section ("Troubleshoot / FAQ") of the LSD documentation. Quote:

How can I get the live-pointcloud in ROS to use with RVIZ?

You cannot, at least not on-line and in real-time. The reason is [...]

They provide a viewer node that you should probably use instead of RViz for this purpose.

If you want to visualize a ply file offline, don't use RViz, use MeshLab or some other ply viewer instead.

edit flag offensive delete link more


thanks, yes i know about the FAQ, i so decide to visualize not in real time the pointcloud using the "p" button and visualize before the mapping. all this cause i need to visualize the ponintcloud in Rviz... yet control the pointcloud with meshlab and it is all right, now i need to see it in Rviz...

JacoPisa gravatar image JacoPisa  ( 2015-02-17 04:14:34 -0600 )edit

So you want to take a previously recorded map (as .ply) and show it in RViz? As it said in the FAQ, this will only work for very small maps. You should write a small node that reads PLY and publishes PointCloud2. This will be useful:

Martin Günther gravatar image Martin Günther  ( 2015-02-17 04:30:25 -0600 )edit

i'm having some problems: for using functions that convert/visualize from a .ply file, i need the ply:io.h for the #include, but i don't have it in my pcl directory. i'm using ros hydro. somebody could helpe me?

JacoPisa gravatar image JacoPisa  ( 2015-02-17 08:32:16 -0600 )edit

This is the include you need:

#include <pcl/io/ply_io.h>

You can get it like this:

sudo apt-get install libpcl-io-1.7-dev

It should be installed here:

Martin Günther gravatar image Martin Günther  ( 2015-02-17 09:16:40 -0600 )edit

i don't have pcl-1.7 this is probably the cause of the missing libraries... but i cannot find it for hydro, all i can find on github for hydro is: and libraries aren't in there

JacoPisa gravatar image JacoPisa  ( 2015-02-17 11:19:59 -0600 )edit

If you have ros-hydro-perception-pcl installed, you should also have the libpcl-* packages installed, since they are dependencies of ros-hydro-perception-pcl. What do you mean you cannot find it for hydro? Did you try the apt-get command from my last comment? Is the file there?

Martin Günther gravatar image Martin Günther  ( 2015-02-17 14:54:12 -0600 )edit

using catkin, i have only the same directories etc that you could see here i'm doing it in the wrong way?? after i use catkin_make and it run, but without the lib ply and i cannot use your apt-get

JacoPisa gravatar image JacoPisa  ( 2015-02-18 02:47:13 -0600 )edit

Question Tools

1 follower


Asked: 2015-02-17 03:15:26 -0600

Seen: 5,368 times

Last updated: Feb 17 '15