-
Notifications
You must be signed in to change notification settings - Fork 215
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PointCloud2 doesn't get displayed, NaN values for positions #365
Comments
After reading more yesterday I found out that it is in fact not a huge problem that there are NaN values because according to the internet and also this comment on another GitHub issue it is in fact normal for pointclouds to contain NaN values. That being said - I actually fixed my issue by increasing the point counts because by default according to the JSDoc the "max_pts" is only 10000. So by increasing that to five million I actually see the full pointcloud: Basically you would add a param to your cloud client definition:
Where Beware of how often you are querying though because my old PC melts if I try to update the point cloud too often with this number of points. |
@CodingSaturn does this solution work for you too? |
Possible solution provided by #365 (comment) |
Hello there,
I want to use ros3djs for visualizing a point cloud in the browser.
I took a look at the provided example code with the point cloud. However I don't have a kinnect at hand to try it with live data.
I only have a bagfile from an xtion camera, so I though I could modify the code.
Am I wrong with the assumption, that I only have to change the topic and maybe the fixed_frame value? This is what I did:
If I start all the things from the commandline that are mentioned in the example and then open the page in the browser, I see the "canvas" but no pointcloud. I have tested displaying the pointcloud in rviz and there it works just fine. When opening the console, I get the error:
THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values. This is true. If I take a look into the object, it says that "position" is an array with 30000 float32 values which are all NaN.
UPDATE:
The NaN values are returned from the following lines with the getFloat
The person in this issue seemed to have the same or similar problem. However the only answer is another linked issue and I after looking at it, I am unsure on how to proceed with this issue now.
As I am an absolute beginner, even with ros and rviz, I am unsure what could be wrong here? Is it maybe just superdelayed (I waited a few minutes though) because the point cloud is too big? Is something configured incorrectly? Are the points too small or could there be a problem with the tf_frame?
One other thing I was unsure about is whether or not I need this command if I am using the bagfile:
roslaunch openni_launch openni.launch depth_registration:=true
As when running it, the output is "No devices connected.... waiting for devices to be connected", so I figure, I only need it with a physical kinect?
I would be glad about any idea what I am doing wrong here, thanks in advance!
The text was updated successfully, but these errors were encountered: